< prev index next >

src/java.compiler/share/classes/javax/lang/model/util/Elements.java

Print this page

        

*** 612,617 **** --- 612,661 ---- * @return {@code true} if the element is a functional interface, {@code false} otherwise * @jls 9.8 Functional Interfaces * @since 1.8 */ boolean isFunctionalInterface(TypeElement type); + + /** + * Returns the executable element for the getter associated with the given variable element. + * + * @implSpec The default implementation of this method returns + * {@code null}. + * + * @param variableElement the field for which the getter is to be found. + * @return the field's getter; otherwise {@code null} if there is no getter. + * @since amber + */ + default ExecutableElement getterFor(VariableElement variableElement) { + return null; + } + + /** + * Returns the executable element for the setter associated with the given variable element. + * + * @implSpec The default implementation of this method returns + * {@code null}. + * + * @param variableElement the field for which the setter is to be found. + * @return the field's setter; otherwise {@code null} if there is no getter. + * @since amber + */ + default ExecutableElement setterFor(VariableElement variableElement) { + return null; + } + + /** + * Return {@code true} if the type element is sealed, {@code + * false} otherwise. This method takes into account non-sealing of + * types. + * + * @implSpec The default implementation of this method returns + * {@code false}. + * + * @param type the type element being examined + * @return {@code true} if the type element is sealed, {@code false} otherwise + * @since amber + */ + default boolean isSealed(TypeElement type) { + return false; + } }
< prev index next >