TypeElement
.@Deprecated public interface TypeDeclaration extends MemberDeclaration
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
Modifier and Type | Method and Description |
---|---|
Collection<FieldDeclaration> |
getFields()
Deprecated.
Returns the fields that are directly declared by this class or
interface.
|
Collection<TypeParameterDeclaration> |
getFormalTypeParameters()
Deprecated.
Returns the formal type parameters of this class or interface.
|
Collection<? extends MethodDeclaration> |
getMethods()
Deprecated.
Returns the methods that are directly declared by this class or
interface.
|
Collection<TypeDeclaration> |
getNestedTypes()
Deprecated.
Returns the declarations of the nested classes and interfaces
that are directly declared by this class or interface.
|
PackageDeclaration |
getPackage()
Deprecated.
Returns the package within which this type is declared.
|
String |
getQualifiedName()
Deprecated.
Returns the fully qualified name of this class or interface
declaration.
|
Collection<InterfaceType> |
getSuperinterfaces()
Deprecated.
Returns the interface types directly implemented by this class
or extended by this interface.
|
getDeclaringType
accept, equals, getAnnotation, getAnnotationMirrors, getDocComment, getModifiers, getPosition, getSimpleName
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
Copyright © 2004, 2014, Oracle and/or its affiliates. All rights reserved.