46 * {@code java.util.Set<String>} and {@code java.util.Set<Number>} 47 * (and many others), and to the raw type {@code java.util.Set}. 48 * 49 * <p> Each method of this interface that returns a list of elements 50 * will return them in the order that is natural for the underlying 51 * source of program information. For example, if the underlying 52 * source of information is Java source code, then the elements will be 53 * returned in source code order. 54 * 55 * @author Joseph D. Darcy 56 * @author Scott Seligman 57 * @author Peter von der Ahé 58 * @see DeclaredType 59 * @since 1.6 60 */ 61 public interface TypeElement extends Element, Parameterizable, QualifiedNameable { 62 /** 63 * Returns the fields, methods, constructors, and member types 64 * that are directly declared in this class or interface. 65 * 66 * This includes any (implicit) default constructor and 67 * the implicit {@code values} and {@code valueOf} methods of an 68 * enum type. 69 * 70 * @apiNote As a particular instance of the {@linkplain 71 * javax.lang.model.element general accuracy requirements} and the 72 * ordering behavior required of this interface, the list of 73 * enclosed elements will be returned in the natural order for the 74 * originating source of information about the type. For example, 75 * if the information about the type is originating from a source 76 * file, the elements will be returned in source code order. 77 * (However, in that case the the ordering of {@linkplain Elements.Origin#MANDATED mandated} 78 * elements, such as a default constructor, is not specified.) 79 * 80 * @return the enclosed elements in proper order, or an empty list if none 81 */ 82 @Override 83 List<? extends Element> getEnclosedElements(); 84 85 /** 86 * Returns the <i>nesting kind</i> of this type element. 87 * 88 * @return the nesting kind of this type element 89 */ 90 NestingKind getNestingKind(); 91 92 /** 93 * Returns the fully qualified name of this type element. 94 * More precisely, it returns the <i>canonical</i> name. 95 * For local and anonymous classes, which do not have canonical names, 96 * an empty name is returned. 97 * 98 * <p>The name of a generic type does not include any reference 99 * to its formal type parameters. 100 * For example, the fully qualified name of the interface | 46 * {@code java.util.Set<String>} and {@code java.util.Set<Number>} 47 * (and many others), and to the raw type {@code java.util.Set}. 48 * 49 * <p> Each method of this interface that returns a list of elements 50 * will return them in the order that is natural for the underlying 51 * source of program information. For example, if the underlying 52 * source of information is Java source code, then the elements will be 53 * returned in source code order. 54 * 55 * @author Joseph D. Darcy 56 * @author Scott Seligman 57 * @author Peter von der Ahé 58 * @see DeclaredType 59 * @since 1.6 60 */ 61 public interface TypeElement extends Element, Parameterizable, QualifiedNameable { 62 /** 63 * Returns the fields, methods, constructors, and member types 64 * that are directly declared in this class or interface. 65 * 66 * This includes any {@linkplain Elements.Origin#MANDATED 67 * mandated} elements such as the (implicit) default constructor 68 * and the implicit {@code values} and {@code valueOf} methods of 69 * an enum type. 70 * 71 * @apiNote As a particular instance of the {@linkplain 72 * javax.lang.model.element general accuracy requirements} and the 73 * ordering behavior required of this interface, the list of 74 * enclosed elements will be returned in the natural order for the 75 * originating source of information about the type. For example, 76 * if the information about the type is originating from a source 77 * file, the elements will be returned in source code order. 78 * (However, in that case the the ordering of elements, such as a 79 * default constructor, is not specified.) 80 * 81 * @return the enclosed elements in proper order, or an empty list if none 82 * 83 * @jls 8.8.9 Default Constructor 84 * @jls 8.9.3 Enum Members 85 */ 86 @Override 87 List<? extends Element> getEnclosedElements(); 88 89 /** 90 * Returns the <i>nesting kind</i> of this type element. 91 * 92 * @return the nesting kind of this type element 93 */ 94 NestingKind getNestingKind(); 95 96 /** 97 * Returns the fully qualified name of this type element. 98 * More precisely, it returns the <i>canonical</i> name. 99 * For local and anonymous classes, which do not have canonical names, 100 * an empty name is returned. 101 * 102 * <p>The name of a generic type does not include any reference 103 * to its formal type parameters. 104 * For example, the fully qualified name of the interface |