< prev index next >

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

Print this page

        

@@ -154,10 +154,42 @@
      * if there are none
      */
     List<? extends TypeParameterElement> getTypeParameters();
 
     /**
+     * Returns the state description elements of this type element
+     * in declaration order.
+     *
+     * @implSpec The default implementations of this method returns an
+     * empty and unmodifiable list.
+     *
+     * @return the state description elements, or an empty list
+     * if there are none
+     *
+     * @since 13
+     */
+    default List<? extends VariableElement> getStateDescription() {
+        return List.of();
+    }
+
+    /**
+     * Returns the permitted subtypes of this type element in
+     * declaration order.
+     *
+     * @implSpec The default implementations of this method returns an
+     * empty and unmodifiable list.
+     *
+     * @return the permitted subtypes, or an empty list
+     * if there are none
+     *
+     * @since 13
+     */
+    default List<? extends TypeMirror> getPermittedSubtypes() {
+        return List.of();
+    }
+
+    /**
      * Returns the package of a top-level type and returns the
      * immediately lexically enclosing element for a {@linkplain
      * NestingKind#isNested nested} type.
      *
      * @return the package of a top-level type, the immediately
< prev index next >