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.
|
java.lang.String |
getPackageName()
The package name of the type.
|
java.lang.String |
getQualifiedName()
The fully qualified name of the type declared.
|
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, isParameter
default java.util.Set<ReferenceTypeDeclaration> internalTypes()
default java.util.Optional<ReferenceTypeDeclaration> containerType()
default boolean isClass()
default boolean isInterface()
default boolean isEnum()
default boolean isTypeParameter()
default boolean isType()
Declaration
isType
in interface Declaration
default TypeDeclaration asType()
Declaration
asType
in interface Declaration
default 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()