JDK 15 RFR of JDK-8239092: Provide explicit specification for getKinds methods of javax.lang.model

Pavel Rappo pavel.rappo at oracle.com
Fri Feb 14 18:14:26 UTC 2020


Hi Joe,

Thanks for doing that! I guess the point is that we should provide something
similar in the DocTree (and maybe Tree) API?

=================================================
There's a typo, "OPNES".
Should we terminate <li> elements in the list of items with a full stop?

> On 14 Feb 2020, at 17:41, Joe Darcy <joe.darcy at oracle.com> 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