TypeReference instances.
| Modifier and Type | Method and Description |
|---|---|
| public TypeReference | Returns: a type reference representing the "any type".The any type is the type of the null pointer and has no concrete representation in Java. |
| public TypeReference | Returns: a type reference forList with the given type argument.the type argument for the type reference param)
|
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | |
| public TypeReference | Returns: a type reference forSet with the given type argument.the type argument for the type reference param)
|
| public TypeReference | |
| public TypeReference | Returns: an array type referencethe component type of the array type reference componentType)Creates a new array type reference using the given component type. |
| public TypeReference | Returns: a reference to the given type declarationthe raw type for the newly produced reference typeDeclaration)Returns a new self type reference for the given typeDeclaration, e.g. if you have a class like
class Foo<T> {}
|
| public TypeReference | Returns: aTypeReference pointing to the type with given name, or null if no such type could be found.the name of the type to point to typeName, TypeReference... the type arguments typeArguments)Creates a new type reference for the given name and the given type arguments. |
| public TypeReference | Returns: aTypeReference pointing to the given type.the type to point to typeDeclaration, TypeReference... the type arguments typeArguments)Creates a new type reference for the given typeDeclaration and the type arguments. |
| public TypeReference | Returns: aTypeReference pointing to the given type or null if the type is not on the class path of the compiled project.the clazz to point to clazz, TypeReference... the type arguments typeArguments)Creates a new type reference for the given |
| public TypeReference | |
| public TypeReference | Returns: a wildcard type references with the given upperBound.the upper bound of the wildcard type upperBound)
|
| public TypeReference | Returns: a wildcard type references with the given lowerBound.the lower bound of the wildcard type lowerBound)
|
| getAnyType | back to summary |
|---|---|
| public TypeReference getAnyType() The any type is the type of the null pointer and has no concrete representation in Java. It is assignable to every reference type.
| |
| getList | back to summary |
|---|---|
public TypeReference getList(TypeReference param)
| |
| getObject | back to summary |
|---|---|
public TypeReference getObject()
| |
| getPrimitiveBoolean | back to summary |
|---|---|
public TypeReference getPrimitiveBoolean()
| |
| getPrimitiveByte | back to summary |
|---|---|
public TypeReference getPrimitiveByte()
| |
| getPrimitiveChar | back to summary |
|---|---|
public TypeReference getPrimitiveChar()
| |
| getPrimitiveDouble | back to summary |
|---|---|
public TypeReference getPrimitiveDouble()
| |
| getPrimitiveFloat | back to summary |
|---|---|
public TypeReference getPrimitiveFloat()
| |
| getPrimitiveInt | back to summary |
|---|---|
public TypeReference getPrimitiveInt()
| |
| getPrimitiveLong | back to summary |
|---|---|
public TypeReference getPrimitiveLong()
| |
| getPrimitiveShort | back to summary |
|---|---|
public TypeReference getPrimitiveShort()
| |
| getPrimitiveVoid | back to summary |
|---|---|
public TypeReference getPrimitiveVoid()
| |
| getSet | back to summary |
|---|---|
public TypeReference getSet(TypeReference param)
| |
| getString | back to summary |
|---|---|
public TypeReference getString()
| |
| newArrayTypeReference | back to summary |
|---|---|
| public TypeReference newArrayTypeReference(TypeReference componentType) Creates a new array type reference using the given component type. If the component type is itself an array this method adds a dimension.
| |
| newSelfTypeReference | back to summary |
|---|---|
| public TypeReference newSelfTypeReference(Type typeDeclaration) Returns a new self type reference for the given typeDeclaration, e.g. if you have a class like
class Foo<T> {}
And you want to add a method that returns the instance itself, you would use the self type as the method's return type.
class Foo<T> {
def Foo<T> mySelf() {
this
}
}
In contrast, newTypeReference(Type, TypeReference. without any arguments would return the raw type only and would result in code with warnings:
class Foo<T> {
def Foo mySelf() {
this
}
}
| |
| newTypeReference | back to summary |
|---|---|
| public TypeReference newTypeReference(String typeName, TypeReference... typeArguments) Creates a new type reference for the given name and the given type arguments.
| |
| newTypeReference | back to summary |
|---|---|
| public TypeReference newTypeReference(Type typeDeclaration, TypeReference... typeArguments) Creates a new type reference for the given typeDeclaration and the type arguments.
| |
| newTypeReference | back to summary |
|---|---|
| public TypeReference newTypeReference(Class<?> clazz, TypeReference... typeArguments) Creates a new type reference for the given
| |
| newWildcardTypeReference | back to summary |
|---|---|
public TypeReference newWildcardTypeReference()
| |
| newWildcardTypeReference | back to summary |
|---|---|
public TypeReference newWildcardTypeReference(TypeReference upperBound)
| |
| newWildcardTypeReferenceWithLowerBound | back to summary |
|---|---|
public TypeReference newWildcardTypeReferenceWithLowerBound(TypeReference lowerBound)
| |