< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java

Print this page

        

@@ -44,12 +44,16 @@
     PACKAGE,
 
     // Declared types
     /** An enum type. */
     ENUM,
-    /** A class not described by a more specific kind (like {@code ENUM}). */
+    /**
+     * A class not described by a more specific kind (like {@code
+     * ENUM} or {@code RECORD}).
+     */
     CLASS,
+
     /** An annotation type. */
     ANNOTATION_TYPE,
     /**
      * An interface not described by a more specific kind (like
      * {@code ANNOTATION_TYPE}).

@@ -88,10 +92,12 @@
      * An implementation-reserved element.  This is not the element
      * you are looking for.
      */
     OTHER,
 
+    // Constants added since initial release
+
     /**
      * A resource variable.
      * @since 1.7
      */
      RESOURCE_VARIABLE,

@@ -99,21 +105,33 @@
     /**
      * A module.
      * @since 9
      * @spec JPMS
      */
-     MODULE;
+     MODULE,
 
+    /**
+     * A record type.
+     * @since amber
+     */
+    RECORD,
+
+    // Neither fish nor fowl; necessary?
+    /**
+     * A state component of a {@code record}.
+     * @since amber
+     */
+    STATE_COMPONENT;
 
     /**
      * Returns {@code true} if this is a kind of class:
-     * either {@code CLASS} or {@code ENUM}.
+     * either {@code CLASS} or {@code ENUM} or {@code RECORD}.
      *
      * @return {@code true} if this is a kind of class
      */
     public boolean isClass() {
-        return this == CLASS || this == ENUM;
+        return this == CLASS || this == ENUM || this == RECORD;
     }
 
     /**
      * Returns {@code true} if this is a kind of interface:
      * either {@code INTERFACE} or {@code ANNOTATION_TYPE}.
< prev index next >