94 * Returns the fully qualified name of this type element. 95 * More precisely, it returns the <i>canonical</i> name. 96 * For local and anonymous classes, which do not have canonical names, 97 * an empty name is returned. 98 * 99 * <p>The name of a generic type does not include any reference 100 * to its formal type parameters. 101 * For example, the fully qualified name of the interface 102 * {@code java.util.Set<E>} is "{@code java.util.Set}". 103 * Nested types use "{@code .}" as a separator, as in 104 * "{@code java.util.Map.Entry}". 105 * 106 * @return the fully qualified name of this class or interface, or 107 * an empty name if none 108 * 109 * @see Elements#getBinaryName 110 * @jls 6.7 Fully Qualified Names and Canonical Names 111 */ 112 Name getQualifiedName(); 113 114 115 /** 116 * Returns the simple name of this type element. 117 * 118 * For an anonymous class, an empty name is returned. 119 * 120 * @return the simple name of this class or interface, 121 * an empty name for an anonymous class 122 * 123 */ 124 @Override 125 Name getSimpleName(); 126 127 /** 128 * Returns the direct superclass of this type element. 129 * If this type element represents an interface or the class 130 * {@code java.lang.Object}, then a {@link NoType} 131 * with kind {@link TypeKind#NONE NONE} is returned. 132 * 133 * @return the direct superclass, or a {@code NoType} if there is none 134 */ 135 TypeMirror getSuperclass(); 136 137 /** 138 * Returns the interface types directly implemented by this class 139 * or extended by this interface. 140 * 141 * @return the interface types directly implemented by this class 142 * or extended by this interface, or an empty list if there are none 143 */ 144 List<? extends TypeMirror> getInterfaces(); 145 146 /** 147 * Returns the formal type parameters of this type element 148 * in declaration order. 149 * 150 * @return the formal type parameters, or an empty list 151 * if there are none 152 */ 153 List<? extends TypeParameterElement> getTypeParameters(); 154 155 156 /** 157 * Returns the package of a top-level type and returns the 158 * immediately lexically enclosing element for a {@linkplain 159 * NestingKind#isNested nested} type. 160 * 161 * @return the package of a top-level type, the immediately 162 * lexically enclosing element for a nested type 163 */ 164 @Override 165 Element getEnclosingElement(); 166 } | 94 * Returns the fully qualified name of this type element. 95 * More precisely, it returns the <i>canonical</i> name. 96 * For local and anonymous classes, which do not have canonical names, 97 * an empty name is returned. 98 * 99 * <p>The name of a generic type does not include any reference 100 * to its formal type parameters. 101 * For example, the fully qualified name of the interface 102 * {@code java.util.Set<E>} is "{@code java.util.Set}". 103 * Nested types use "{@code .}" as a separator, as in 104 * "{@code java.util.Map.Entry}". 105 * 106 * @return the fully qualified name of this class or interface, or 107 * an empty name if none 108 * 109 * @see Elements#getBinaryName 110 * @jls 6.7 Fully Qualified Names and Canonical Names 111 */ 112 Name getQualifiedName(); 113 114 /** 115 * Returns the simple name of this type element. 116 * 117 * For an anonymous class, an empty name is returned. 118 * 119 * @return the simple name of this class or interface, 120 * an empty name for an anonymous class 121 * 122 */ 123 @Override 124 Name getSimpleName(); 125 126 /** 127 * Returns the direct superclass of this type element. 128 * If this type element represents an interface or the class 129 * {@code java.lang.Object}, then a {@link NoType} 130 * with kind {@link TypeKind#NONE NONE} is returned. 131 * 132 * @return the direct superclass, or a {@code NoType} if there is none 133 */ 134 TypeMirror getSuperclass(); 135 136 /** 137 * Returns the interface types directly implemented by this class 138 * or extended by this interface. 139 * 140 * @return the interface types directly implemented by this class 141 * or extended by this interface, or an empty list if there are none 142 */ 143 List<? extends TypeMirror> getInterfaces(); 144 145 /** 146 * Returns the formal type parameters of this type element 147 * in declaration order. 148 * 149 * @return the formal type parameters, or an empty list 150 * if there are none 151 */ 152 List<? extends TypeParameterElement> getTypeParameters(); 153 154 /** 155 * Returns the package of a top-level type and returns the 156 * immediately lexically enclosing element for a {@linkplain 157 * NestingKind#isNested nested} type. 158 * 159 * @return the package of a top-level type, the immediately 160 * lexically enclosing element for a nested type 161 */ 162 @Override 163 Element getEnclosingElement(); 164 } |