javax.lang.model.element
public enum class: ElementKind [javadoc |
source]
java.lang.Enum
javax.lang.model.element.ElementKind
The {@code kind} of an element.
Note that it is possible additional element kinds will be added
to accommodate new, currently unknown, language structures added to
future versions of the Java™ programming language.
Also see:
- Element
- author:
Joseph
- D. Darcy
- author:
Scott
- Seligman
- author:
Peter
- von der Ahé
- since:
1.6
-
Field Summary |
---|
public ElementKind | PACKAGE | A package. |
public ElementKind | ENUM | An enum type. |
public ElementKind | CLASS | A class not described by a more specific kind (like {@code ENUM}). |
public ElementKind | ANNOTATION_TYPE | An annotation type. |
public ElementKind | INTERFACE | An interface not described by a more specific kind (like
{@code ANNOTATION_TYPE}). |
public ElementKind | ENUM_CONSTANT | An enum constant. |
public ElementKind | FIELD | A field not described by a more specific kind (like
{@code ENUM_CONSTANT}). |
public ElementKind | PARAMETER | A parameter of a method or constructor. |
public ElementKind | LOCAL_VARIABLE | A local variable. |
public ElementKind | EXCEPTION_PARAMETER | A parameter of an exception handler. |
public ElementKind | METHOD | A method. |
public ElementKind | CONSTRUCTOR | A constructor. |
public ElementKind | STATIC_INIT | A static initializer. |
public ElementKind | INSTANCE_INIT | An instance initializer. |
public ElementKind | TYPE_PARAMETER | A type parameter. |
public ElementKind | OTHER | An implementation-reserved element. This is not the element
you are looking for. |
public ElementKind | RESOURCE_VARIABLE | A resource variable. |
Method from javax.lang.model.element.ElementKind Detail: |
public boolean isClass() {
return this == CLASS || this == ENUM;
}
Returns {@code true} if this is a kind of class:
either {@code CLASS} or {@code ENUM}. |
public boolean isField() {
return this == FIELD || this == ENUM_CONSTANT;
}
Returns {@code true} if this is a kind of field:
either {@code FIELD} or {@code ENUM_CONSTANT}. |
public boolean isInterface() {
return this == INTERFACE || this == ANNOTATION_TYPE;
}
Returns {@code true} if this is a kind of interface:
either {@code INTERFACE} or {@code ANNOTATION_TYPE}. |