| Modifier and Type | Method and Description |
|---|---|
| public default ResolvedReferenceTypeDeclaration | |
| public default boolean | canBeAssignedTo(ResolvedReferenceTypeDeclaration other)
Can we assign instances of the type defined by this declaration to variables having the type defined by the given type? |
| public default Optional | findTypeParameter(String name)
Implements com. |
| public default List | |
| public List | |
| public Set | getAllMethods()
Return a list of all the methods declared of this type declaration, either declared or inherited. |
| public default List | |
| public default List | |
| public default List | Returns: The list of resolved ancestors.Resolves the types of all direct ancestors (i.e., the directly extended class and the directly implemented interfaces) and returns the list of ancestors as a list of resolved reference types. |
| public List | Returns: The list of resolved ancestors.When set to acceptIncompleteList)false, this method throws an UnsolvedSymbolException if
one or more ancestor could not be resolved. When set to true, this method
does not throw an UnsolvedSymbolException, but the list of returned ancestors
may be incomplete in case one or more ancestor could not be resolved.Resolves the types of all direct ancestors (i.e., the directly extended class and the directly implemented interfaces) and returns the list of ancestors as a list of resolved reference types. |
| public List | |
| public default List | |
| public Set | |
| public default ResolvedFieldDeclaration | |
| public default ResolvedFieldDeclaration | |
| public default List | getVisibleFields()
Return a list of all fields declared and the inherited ones which are not private. |
| public default boolean | hasAnnotation(String qualifiedName)
Has the type at least one annotation declared or inherited having the specified qualified name? |
| public boolean | hasDirectlyAnnotation(String qualifiedName)
Has the type at least one annotation declared having the specified qualified name? |
| public default boolean | |
| public default boolean | |
| public boolean | isAssignableBy(ResolvedType type)
Can we assign instances of the given type to variables having the type defined by this declaration? |
| public boolean | isAssignableBy(ResolvedReferenceTypeDeclaration other)
Can we assign instances of the given type to variables having the type defined by this declaration? |
| public boolean |
| asReferenceType | back to summary |
|---|---|
| public default ResolvedReferenceTypeDeclaration asReferenceType() Overrides default com.
| |
| canBeAssignedTo | back to summary |
|---|---|
| public default boolean canBeAssignedTo(ResolvedReferenceTypeDeclaration other) Can we assign instances of the type defined by this declaration to variables having the type defined by the given type? | |
| findTypeParameter | back to summary |
|---|---|
| public default Optional Implements com. Doc from com. Find the closest TypeParameterDeclaration with the given name. It first look on this element itself and then on the containers.
| |
| getAllAncestors | back to summary |
|---|---|
| public default List The list of all the ancestors of the current declaration, direct and indirect. This list does not contains duplicates with the exacting same type parameters. | |
| getAllFields | back to summary |
|---|---|
| public List Return a list of all fields, either declared in this declaration or inherited. | |
| getAllMethods | back to summary |
|---|---|
| public Set Return a list of all the methods declared of this type declaration, either declared or inherited. Note that it should not include overridden methods. | |
| getAllNonStaticFields | back to summary |
|---|---|
| public default List Return a list of all the non static fields, either declared or inherited. | |
| getAllStaticFields | back to summary |
|---|---|
| public default List Return a list of all the static fields, either declared or inherited. | |
| getAncestors | back to summary |
|---|---|
| public default List Resolves the types of all direct ancestors (i.e., the directly extended class and the directly implemented interfaces) and returns the list of ancestors as a list of resolved reference types.
In case any ancestor cannot be resolved, an Note that an ancestor can be parametrized types with values specified. For example: class A implements Comparable<String> {} In this case the ancestor is Comparable<String>
| |
| getAncestors | back to summary |
|---|---|
| public List Resolves the types of all direct ancestors (i.e., the directly extended class and the directly implemented interfaces) and returns the list of ancestors as a list of resolved reference types.
If
| |
| getConstructors | back to summary |
|---|---|
| public List | |
| getDeclaredFields | back to summary |
|---|---|
| public default List Return a list of all the fields declared in this type. | |
| getDeclaredMethods | back to summary |
|---|---|
| public Set Return a list of all the methods declared in this type declaration. | |
| getField | back to summary |
|---|---|
| public default ResolvedFieldDeclaration getField(String name) Note that the type of the field should be expressed using the type variables of this particular type. Consider for example:
class Foo
class Bar extends Foo
When calling getField("field") on Foo I should get a FieldDeclaration with type E, while calling it on
Bar I should get a FieldDeclaration with type String.
| |
| getVisibleField | back to summary |
|---|---|
| public default ResolvedFieldDeclaration getVisibleField(String name) Consider only field or inherited field which is not private. | |
| getVisibleFields | back to summary |
|---|---|
| public default List Return a list of all fields declared and the inherited ones which are not private. | |
| hasAnnotation | back to summary |
|---|---|
| public default boolean hasAnnotation(String qualifiedName) Has the type at least one annotation declared or inherited having the specified qualified name? | |
| hasDirectlyAnnotation | back to summary |
|---|---|
| public boolean hasDirectlyAnnotation(String qualifiedName) Has the type at least one annotation declared having the specified qualified name? | |
| hasField | back to summary |
|---|---|
| public default boolean hasField(String name) Has this type a field with the given name? | |
| hasVisibleField | back to summary |
|---|---|
| public default boolean hasVisibleField(String name) Either a declared field or inherited field which is not private. | |
| isAssignableBy | back to summary |
|---|---|
| public boolean isAssignableBy(ResolvedType type) Can we assign instances of the given type to variables having the type defined by this declaration? | |
| isAssignableBy | back to summary |
|---|---|
| public boolean isAssignableBy(ResolvedReferenceTypeDeclaration other) Can we assign instances of the given type to variables having the type defined by this declaration? | |
| isFunctionalInterface | back to summary |
|---|---|
| public boolean isFunctionalInterface() This means that the type has a functional method. Conceptually, a functional interface has exactly one abstract method. Typically these classes has the FunctionInterface annotation but this is not mandatory. | |