|
Mirror API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TypeDeclaration
Represents the declaration of a class or interface. Provides access to information about the type and its members. Note that an enum is a kind of class, and an annotation type is a kind of interface.
While a TypeDeclaration represents the declaration
of a class or interface, a DeclaredType
represents a class
or interface type, the latter being a use
(or invocation) of the former.
The distinction is most apparent with generic types,
for which a single declaration can define a whole
family of types. For example, the declaration of
java.util.Set
corresponds to the parameterized types
java.util.Set<String>
and java.util.Set<Number>
(and many others), and to the raw type java.util.Set
.
DeclarationFilter
provides a simple way to select just the items of interest
when a method returns a collection of declarations.
DeclaredType
Method Summary | |
---|---|
Collection<FieldDeclaration> |
getFields()
Returns the fields that are directly declared by this class or interface. |
Collection<TypeParameterDeclaration> |
getFormalTypeParameters()
Returns the formal type parameters of this class or interface. |
Collection<? extends MethodDeclaration> |
getMethods()
Returns the methods that are directly declared by this class or interface. |
Collection<TypeDeclaration> |
getNestedTypes()
Returns the declarations of the nested classes and interfaces that are directly declared by this class or interface. |
PackageDeclaration |
getPackage()
Returns the package within which this type is declared. |
String |
getQualifiedName()
Returns the fully qualified name of this class or interface declaration. |
Collection<InterfaceType> |
getSuperinterfaces()
Returns the interface types directly implemented by this class or extended by this interface. |
Methods inherited from interface com.sun.mirror.declaration.MemberDeclaration |
---|
getDeclaringType |
Methods inherited from interface com.sun.mirror.declaration.Declaration |
---|
accept, equals, getAnnotation, getAnnotationMirrors, getDocComment, getModifiers, getPosition, getSimpleName |
Method Detail |
---|
PackageDeclaration getPackage()
String getQualifiedName()
java.util.Set<E>
is "java.util.Set".
Collection<TypeParameterDeclaration> getFormalTypeParameters()
Collection<InterfaceType> getSuperinterfaces()
DeclarationFilter
Collection<FieldDeclaration> getFields()
DeclarationFilter
Collection<? extends MethodDeclaration> getMethods()
DeclarationFilter
Collection<TypeDeclaration> getNestedTypes()
DeclarationFilter
|
Mirror API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |