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

Print this page




 180      * instance initializer}, an empty name is returned.
 181      *
 182      * @return the simple name of this element
 183      */
 184     Name getSimpleName();
 185 
 186     /**
 187      * Returns the innermost element
 188      * within which this element is, loosely speaking, enclosed.
 189      * <ul>
 190      * <li> If this element is one whose declaration is lexically enclosed
 191      * immediately within the declaration of another element, that other
 192      * element is returned.
 193      *
 194      * <li> If this is a {@linkplain TypeElement#getEnclosingElement
 195      * top-level type}, its package is returned.
 196      *
 197      * <li> If this is a {@linkplain
 198      * PackageElement#getEnclosingElement package}, {@code null} is
 199      * returned.
 200 
 201      * <li> If this is a {@linkplain
 202      * TypeParameterElement#getEnclosingElement type parameter},
 203      * {@code null} is returned.
 204 

 205      * </ul>
 206      *
 207      * @return the enclosing element, or {@code null} if there is none
 208      * @see Elements#getPackageOf
 209      */
 210     Element getEnclosingElement();
 211 
 212     /**
 213      * Returns the elements that are, loosely speaking, directly
 214      * enclosed by this element.
 215      *
 216      * A class or interface is considered to enclose the fields,
 217      * methods, constructors, and member types that it directly
 218      * declares.  This includes any (implicit) default constructor and
 219      * the implicit {@code values} and {@code valueOf} methods of an
 220      * enum type.
 221      *
 222      * A package encloses the top-level classes and interfaces within
 223      * it, but is not considered to enclose subpackages.
 224      *




 180      * instance initializer}, an empty name is returned.
 181      *
 182      * @return the simple name of this element
 183      */
 184     Name getSimpleName();
 185 
 186     /**
 187      * Returns the innermost element
 188      * within which this element is, loosely speaking, enclosed.
 189      * <ul>
 190      * <li> If this element is one whose declaration is lexically enclosed
 191      * immediately within the declaration of another element, that other
 192      * element is returned.
 193      *
 194      * <li> If this is a {@linkplain TypeElement#getEnclosingElement
 195      * top-level type}, its package is returned.
 196      *
 197      * <li> If this is a {@linkplain
 198      * PackageElement#getEnclosingElement package}, {@code null} is
 199      * returned.
 200      *
 201      * <li> If this is a {@linkplain
 202      * TypeParameterElement#getEnclosingElement type parameter},
 203      * {@linkplain TypeParameterElement#getGenericElement the
 204      * generic element} of the type parameter is returned.
 205      *
 206      * </ul>
 207      *
 208      * @return the enclosing element, or {@code null} if there is none
 209      * @see Elements#getPackageOf
 210      */
 211     Element getEnclosingElement();
 212 
 213     /**
 214      * Returns the elements that are, loosely speaking, directly
 215      * enclosed by this element.
 216      *
 217      * A class or interface is considered to enclose the fields,
 218      * methods, constructors, and member types that it directly
 219      * declares.  This includes any (implicit) default constructor and
 220      * the implicit {@code values} and {@code valueOf} methods of an
 221      * enum type.
 222      *
 223      * A package encloses the top-level classes and interfaces within
 224      * it, but is not considered to enclose subpackages.
 225      *