public interface ResolvedTypeDeclaration extends ResolvedDeclaration
| Modifier and Type | Method and Description |
|---|---|
default ResolvedClassDeclaration |
asClass()
Return this as a ClassDeclaration or throw UnsupportedOperationException.
|
default ResolvedEnumDeclaration |
asEnum()
Return this as a EnumDeclaration or throw UnsupportedOperationException.
|
default ResolvedInterfaceDeclaration |
asInterface()
Return this as a InterfaceDeclaration or throw UnsupportedOperationException.
|
default ResolvedReferenceTypeDeclaration |
asReferenceType() |
default ResolvedTypeDeclaration |
asType()
Return this as a TypeDeclaration or throw an UnsupportedOperationException
|
default ResolvedTypeParameterDeclaration |
asTypeParameter()
Return this as a TypeParameterDeclaration or throw UnsupportedOperationException.
|
Optional<ResolvedReferenceTypeDeclaration> |
containerType()
Get the ReferenceTypeDeclaration enclosing this declaration.
|
String |
getClassName()
The class(es) wrapping this type.
|
default String |
getId()
The ID corresponds most of the type to the qualified name.
|
default ResolvedReferenceTypeDeclaration |
getInternalType(String name)
Returns a type declaration for the internal type based on name.
|
String |
getPackageName()
The package name of the type.
|
String |
getQualifiedName()
The fully qualified name of the type declared.
|
default boolean |
hasInternalType(String name)
Does this type contain an internal type with the given name?
(Does not include internal types inside internal types).
|
default Set<ResolvedReferenceTypeDeclaration> |
internalTypes()
Get the list of types defined inside the current type.
|
default boolean |
isAnonymousClass()
Is this type declaration corresponding to an anonymous class?
This is an example of anonymous class:
|
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?
|
asEnumConstant, asField, asMethod, asParameter, getName, hasName, isEnumConstant, isField, isMethod, isParameter, isVariabledefault Set<ResolvedReferenceTypeDeclaration> internalTypes()
default ResolvedReferenceTypeDeclaration getInternalType(String name)
default boolean hasInternalType(String name)
Optional<ResolvedReferenceTypeDeclaration> containerType()
default boolean isClass()
default boolean isInterface()
default boolean isEnum()
default boolean isTypeParameter()
default boolean isType()
ResolvedDeclarationisType in interface ResolvedDeclarationdefault boolean isAnonymousClass()
HelloWorld frenchGreeting = new HelloWorld() {
String name = "tout le monde";
public void greet() {
greetSomeone("tout le monde");
}
public void greetSomeone(String someone) {
name = someone;
System.out.println("Salut " + name);
}
};
default ResolvedTypeDeclaration asType()
ResolvedDeclarationasType in interface ResolvedDeclarationdefault ResolvedClassDeclaration asClass()
default ResolvedInterfaceDeclaration asInterface()
default ResolvedEnumDeclaration asEnum()
default ResolvedTypeParameterDeclaration asTypeParameter()
default ResolvedReferenceTypeDeclaration asReferenceType()
String getPackageName()
String getClassName()
String getQualifiedName()
default String getId()
Copyright © 2007–2019. All rights reserved.