JDK 15 RFR of JDK-8239092: Provide explicit specification for getKinds methods of javax.lang.model
Jonathan Gibbons
jonathan.gibbons at oracle.com
Fri Feb 14 18:44:49 UTC 2020
Joe,
I fixed a few grammatical and typographic errors in the CSR for you.
I guess I had considered (as an alternative) adding a sentence to the
class-level comment for each subtype, or maybe using a <table> to
describe the mapping, but the narrative list is OK too, and at least
makes it easier to describe the "non-standard" entries in the mapping.
CSR reviewed.
-- Jon
On 02/14/2020 09:41 AM, Joe Darcy wrote:
> Hello,
>
> As discussed in the review of Pavel's JDK-8238598, the getKind methods
> in javax.lang.model don't give an explicit type-to-kind mapping.
> Please review the webrev and CSR to add such a mapping:
>
> JDK-8239092: Provide explicit specification for getKinds methods
> of javax.lang.model
> http://cr.openjdk.java.net/~darcy/8239092.0/
> https://bugs.openjdk.java.net/browse/JDK-8239093
>
> The text as rendered is below.
>
> Thanks,
>
> -Joe
>
> ElementKind getKind()
> Returns the kind of this element.
>
> The kind of a package is PACKAGE.
> The kind of a module is MODULE.
> The kind of a type element is one of ANNOTATION, CLASS, ENUM,
> INTERFACE, or RECORD.
> The kind of a variable is one of ENUM_CONSTANT,
> EXCEPTION_PARAMETER, FIELD, LOCAL_VARIABLE, PARAMETER,
> RESOURCE_VARIABLE, or BINDING_VARIABLE.
> The kind of an executable is one of CONSTRUCTOR, INSTANCE_INIT,
> METHOD, or STATIC_INIT.
> The kind of a type parameter is TYPE_PARAMETER.
> The kind of a record component is RECORD_COMPONENT.
>
> ModuleElement.DirectiveKind getKind()
> Returns the kind of this directive.
>
> The kind of an requires directive is REQUIRES.
> The kind of an exports directive is EXPORTS.
> The kind of an opens directive is OPNES.
> The kind of an uses directive is USES.
> The kind of an provides directive is PROVIDES.
>
>
> TypeKind getKind()
> Returns the kind of this type.
>
> The kind of a primitive type is one of the kinds for which
> TypeKind.isPrimitive() returns true.
> The kind of a null type is NULL.
> The kind of an array type is ARRAY.
> The kind of an declared type is DECLARED.
> The kind of an error type is ERROR.
> The kind of a type variable is TYPEVAR.
> The kind of a wildcard type is WILDCARD.
> The kind of an executable type is EXECUTABLE.
> The kind of an pseudo-type type is one of VOID, PACKAGE, MODULE,
> or NONE.
> The kind of an union typeis UNION.
> The kind of an intersection type is INTERSECTION.
>
More information about the compiler-dev
mailing list