< prev index next >

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

Print this page




 120 
 121     /**
 122      * Returns the modifiers of this element, excluding annotations.
 123      * Implicit modifiers, such as the {@code public} and {@code static}
 124      * modifiers of interface members, are included.
 125      *
 126      * @return the modifiers of this element, or an empty set if there are none
 127      */
 128     Set<Modifier> getModifiers();
 129 
 130     /**
 131      * Returns the simple (unqualified) name of this element.  The
 132      * name of a generic type does not include any reference to its
 133      * formal type parameters.
 134      *
 135      * For example, the simple name of the type element {@code
 136      * java.util.Set<E>} is {@code "Set"}.
 137      *
 138      * If this element represents an unnamed {@linkplain
 139      * PackageElement#getSimpleName package} or unnamed {@linkplain
 140      * ModuleElement#getSimpleName module}, an empty name is returned.
 141      *
 142      * If it represents a {@linkplain ExecutableElement#getSimpleName
 143      * constructor}, the name "{@code <init>}" is returned.  If it
 144      * represents a {@linkplain ExecutableElement#getSimpleName static
 145      * initializer}, the name "{@code <clinit>}" is returned.
 146      *
 147      * If it represents an {@linkplain TypeElement#getSimpleName
 148      * anonymous class} or {@linkplain ExecutableElement#getSimpleName
 149      * instance initializer}, an empty name is returned.
 150      *
 151      * @return the simple name of this element
 152      * @see PackageElement#getSimpleName
 153      * @see ExecutableElement#getSimpleName
 154      * @see TypeElement#getSimpleName
 155      * @see VariableElement#getSimpleName
 156      * @see ModuleElement#getSimpleName
 157      * @see RecordComponentElement#getSimpleName
 158      * @revised 9
 159      * @spec JPMS
 160      */
 161     Name getSimpleName();
 162 
 163     /**
 164      * Returns the innermost element
 165      * within which this element is, loosely speaking, enclosed.
 166      * <ul>
 167      * <li> If this element is one whose declaration is lexically enclosed
 168      * immediately within the declaration of another element, that other
 169      * element is returned.




 120 
 121     /**
 122      * Returns the modifiers of this element, excluding annotations.
 123      * Implicit modifiers, such as the {@code public} and {@code static}
 124      * modifiers of interface members, are included.
 125      *
 126      * @return the modifiers of this element, or an empty set if there are none
 127      */
 128     Set<Modifier> getModifiers();
 129 
 130     /**
 131      * Returns the simple (unqualified) name of this element.  The
 132      * name of a generic type does not include any reference to its
 133      * formal type parameters.
 134      *
 135      * For example, the simple name of the type element {@code
 136      * java.util.Set<E>} is {@code "Set"}.
 137      *
 138      * If this element represents an unnamed {@linkplain
 139      * PackageElement#getSimpleName package} or unnamed {@linkplain
 140      * ModuleElement#getSimpleName module}, an <a href=Name.html#empty_name>empty name</a> is returned.
 141      *
 142      * If it represents a {@linkplain ExecutableElement#getSimpleName
 143      * constructor}, the name "{@code <init>}" is returned.  If it
 144      * represents a {@linkplain ExecutableElement#getSimpleName static
 145      * initializer}, the name "{@code <clinit>}" is returned.
 146      *
 147      * If it represents an {@linkplain TypeElement#getSimpleName
 148      * anonymous class} or {@linkplain ExecutableElement#getSimpleName
 149      * instance initializer}, an <a href=Name.html#empty_name>empty name</a> is returned.
 150      *
 151      * @return the simple name of this element
 152      * @see PackageElement#getSimpleName
 153      * @see ExecutableElement#getSimpleName
 154      * @see TypeElement#getSimpleName
 155      * @see VariableElement#getSimpleName
 156      * @see ModuleElement#getSimpleName
 157      * @see RecordComponentElement#getSimpleName
 158      * @revised 9
 159      * @spec JPMS
 160      */
 161     Name getSimpleName();
 162 
 163     /**
 164      * Returns the innermost element
 165      * within which this element is, loosely speaking, enclosed.
 166      * <ul>
 167      * <li> If this element is one whose declaration is lexically enclosed
 168      * immediately within the declaration of another element, that other
 169      * element is returned.


< prev index next >