public interface TypeDeclaration extends Declaration
| Modifier and Type | Method and Description |
|---|---|
default ClassDeclaration |
asClass()
Return this as a ClassDeclaration or throw UnsupportedOperationException.
|
default EnumDeclaration |
asEnum()
Return this as a EnumDeclaration or throw UnsupportedOperationException.
|
default InterfaceDeclaration |
asInterface()
Return this as a InterfaceDeclaration or throw UnsupportedOperationException.
|
default ReferenceTypeDeclaration |
asReferenceType() |
default TypeDeclaration |
asType()
Return this as a TypeDeclaration or throw an UnsupportedOperationException
|
default TypeParameterDeclaration |
asTypeParameter()
Return this as a TypeParameterDeclaration or throw UnsupportedOperationException.
|
default java.util.Optional<ReferenceTypeDeclaration> |
containerType()
Get the TypeDeclaration enclosing this declaration.
|
java.lang.String |
getClassName()
The class(es) wrapping this type.
|
default java.lang.String |
getId()
The ID corresponds most of the type to the qualified name.
|
default ReferenceTypeDeclaration |
getInternalType(java.lang.String name)
Returns a type declaration for the internal type based on name.
|
java.lang.String |
getPackageName()
The package name of the type.
|
java.lang.String |
getQualifiedName()
The fully qualified name of the type declared.
|
default boolean |
hasInternalType(java.lang.String name)
Does this type contain an internal type with the given name?
(Does not include internal types inside internal types).
|
default java.util.Set<ReferenceTypeDeclaration> |
internalTypes()
Get the list of types defined inside the current type.
|
default boolean |
isClass()
Is this the declaration of a class?
Note that an Enum is not considered a Class in this case.
|
default boolean |
isEnum()
Is this the declaration of an enum?
|
default boolean |
isInterface()
Is this the declaration of an interface?
|
default boolean |
isType()
Does this declaration represents a type?
|
default boolean |
isTypeParameter()
Is this the declaration of a type parameter?
|
asField, asMethod, asParameter, getName, hasName, isField, isMethod, isParameterdefault java.util.Set<ReferenceTypeDeclaration> internalTypes()
default ReferenceTypeDeclaration getInternalType(java.lang.String name)
default boolean hasInternalType(java.lang.String name)
default java.util.Optional<ReferenceTypeDeclaration> containerType()
default boolean isClass()
default boolean isInterface()
default boolean isEnum()
default boolean isTypeParameter()
default boolean isType()
DeclarationisType in interface Declarationdefault TypeDeclaration asType()
DeclarationasType in interface Declarationdefault ClassDeclaration asClass()
default InterfaceDeclaration asInterface()
default EnumDeclaration asEnum()
default TypeParameterDeclaration asTypeParameter()
default ReferenceTypeDeclaration asReferenceType()
java.lang.String getPackageName()
java.lang.String getClassName()
java.lang.String getQualifiedName()
default java.lang.String getId()