< prev index next >

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

Print this page




 597     void printElements(java.io.Writer w, Element... elements);
 598 
 599     /**
 600      * Return a name with the same sequence of characters as the
 601      * argument.
 602      *
 603      * @param cs the character sequence to return as a name
 604      * @return a name with the same sequence of characters as the argument
 605      */
 606     Name getName(CharSequence cs);
 607 
 608     /**
 609      * Returns {@code true} if the type element is a functional interface, {@code false} otherwise.
 610      *
 611      * @param type the type element being examined
 612      * @return {@code true} if the element is a functional interface, {@code false} otherwise
 613      * @jls 9.8 Functional Interfaces
 614      * @since 1.8
 615      */
 616     boolean isFunctionalInterface(TypeElement type);












































 617 }


 597     void printElements(java.io.Writer w, Element... elements);
 598 
 599     /**
 600      * Return a name with the same sequence of characters as the
 601      * argument.
 602      *
 603      * @param cs the character sequence to return as a name
 604      * @return a name with the same sequence of characters as the argument
 605      */
 606     Name getName(CharSequence cs);
 607 
 608     /**
 609      * Returns {@code true} if the type element is a functional interface, {@code false} otherwise.
 610      *
 611      * @param type the type element being examined
 612      * @return {@code true} if the element is a functional interface, {@code false} otherwise
 613      * @jls 9.8 Functional Interfaces
 614      * @since 1.8
 615      */
 616     boolean isFunctionalInterface(TypeElement type);
 617 
 618     /**
 619      * Returns the executable element for the getter associated with the given variable element.
 620      *
 621      * @implSpec The default implementation of this method returns
 622      * {@code null}.
 623      *
 624      * @param variableElement the field for which the getter is to be found.
 625      * @return the field's getter; otherwise {@code null} if there is no getter.
 626      * @since amber
 627      */
 628     default ExecutableElement getterFor(VariableElement variableElement) {
 629         return null;
 630     }
 631 
 632     /**
 633      * Returns the executable element for the setter associated with the given variable element.
 634      *
 635      * @implSpec The default implementation of this method returns
 636      * {@code null}.
 637      *
 638      * @param variableElement the field for which the setter is to be found.
 639      * @return the field's setter; otherwise {@code null} if there is no getter.
 640      * @since amber
 641      */
 642     default ExecutableElement setterFor(VariableElement variableElement) {
 643         return null;
 644     }
 645 
 646     /**
 647      * Return {@code true} if the type element is sealed, {@code
 648      * false} otherwise. This method takes into account non-sealing of
 649      * types.
 650      *
 651      * @implSpec The default implementation of this method returns
 652      * {@code false}.
 653      *
 654      * @param type the type element being examined
 655      * @return {@code true} if the type element is sealed, {@code false} otherwise
 656      * @since amber
 657      */
 658     default boolean isSealed(TypeElement type) {
 659         return false;
 660     }
 661 }
< prev index next >