| Modifier and Type | Method and Description |
|---|---|
Type |
MethodDeclaration.getReturnType()
The type of the value returned by the current method.
|
Type |
TypeParameterDeclaration.Bound.getType()
Get the type used in the Bound.
|
Type |
ValueDeclaration.getType()
Type of the declaration.
|
| Modifier and Type | Method and Description |
|---|---|
static TypeParameterDeclaration.Bound |
TypeParameterDeclaration.Bound.extendsBound(Type type)
Create an extends bound with the given type:
|
boolean |
TypeDeclaration.isAssignableBy(Type type)
Can we assign instances of the given type to variables having the type defined
by this declaration?
|
static TypeParameterDeclaration.Bound |
TypeParameterDeclaration.Bound.superBound(Type type)
Create a super bound with the given type:
|
| Modifier and Type | Method and Description |
|---|---|
Type |
MethodUsage.getParamType(int i)
Return the type of the formal argument at the given position.
|
Type |
MethodUsage.returnType() |
| Modifier and Type | Method and Description |
|---|---|
List<Type> |
MethodUsage.getParamTypes() |
| Modifier and Type | Method and Description |
|---|---|
MethodUsage |
MethodUsage.replaceParamType(int i,
Type replaced) |
MethodUsage |
MethodUsage.replaceReturnType(Type returnType) |
MethodUsage |
MethodUsage.replaceTypeParameter(TypeParameterDeclaration typeParameter,
Type type) |
| Constructor and Description |
|---|
MethodUsage(MethodDeclaration declaration,
List<Type> paramTypes,
Type returnType) |
| Constructor and Description |
|---|
MethodUsage(MethodDeclaration declaration,
List<Type> paramTypes,
Type returnType) |
| Modifier and Type | Method and Description |
|---|---|
Type |
Value.getType() |
| Constructor and Description |
|---|
Value(Type type,
String name) |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayType
Array Type.
|
class |
NullType
This is a virtual type used to represent null values.
|
class |
PrimitiveType |
class |
ReferenceType
A ReferenceType like a class, an interface or an enum.
|
class |
TypeVariable
From JLS 4.4: A type variable is introduced by the declaration of a type parameter of a generic class,
interface, method, or constructor (§8.1.2, §9.1.2, §8.4.4, §8.8.4).
|
class |
VoidType
The special type void.
|
class |
Wildcard
A wildcard can be:
- unbounded (?)
- have a lower bound (? super Number)
- have an upper bound (? extends Number)
It is not possible to have both a lower and an upper bound at the same time.
|
| Modifier and Type | Field and Description |
|---|---|
static Type |
VoidType.INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Optional<Type> |
ReferenceType.getFieldType(String name)
The type of the field could be different from the one in the corresponding FieldDeclaration because
type variables would be solved.
|
Optional<Type> |
ReferenceType.getGenericParameterByName(String name)
Get the type associated with the type parameter with the given name.
|
List<javaslang.Tuple2<TypeParameterDeclaration,Type>> |
ReferenceType.getTypeParametersMap()
Get the values for all type parameters declared on this type.
|
List<Type> |
ReferenceType.typeParametersValues()
Get the values for all type parameters declared on this type.
|
Optional<Type> |
ReferenceType.typeParamValue(TypeParameterDeclaration typeParameterDeclaration) |
| Modifier and Type | Method and Description |
|---|---|
static Wildcard |
Wildcard.extendsBound(Type type) |
boolean |
Type.isAssignableBy(Type other)
This method checks if ThisType t = new OtherType() would compile.
|
boolean |
ArrayType.isAssignableBy(Type other) |
boolean |
VoidType.isAssignableBy(Type other) |
abstract boolean |
ReferenceType.isAssignableBy(Type other)
This method checks if ThisType t = new OtherType() would compile.
|
boolean |
NullType.isAssignableBy(Type other) |
boolean |
Wildcard.isAssignableBy(Type other) |
boolean |
PrimitiveType.isAssignableBy(Type other) |
boolean |
TypeVariable.isAssignableBy(Type other) |
default Type |
Type.replaceTypeVariables(TypeParameterDeclaration tp,
Type replaced)
This is like (
replaceTypeVariables(TypeParameterDeclaration, Type, Map) but ignores the inferred values. |
default Type |
Type.replaceTypeVariables(TypeParameterDeclaration tp,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes)
Replace all variables referring to the given TypeParameter with the given value.
|
Type |
ArrayType.replaceTypeVariables(TypeParameterDeclaration tpToReplace,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
Type |
ReferenceType.replaceTypeVariables(TypeParameterDeclaration tpToReplace,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
Type |
Wildcard.replaceTypeVariables(TypeParameterDeclaration tpToReplace,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
Type |
TypeVariable.replaceTypeVariables(TypeParameterDeclaration tpToBeReplaced,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
static Wildcard |
Wildcard.superBound(Type type) |
Type |
TypeTransformer.transform(Type type) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ReferenceType |
ReferenceType.create(TypeDeclaration typeDeclaration,
List<Type> typeParameters,
TypeSolver typeSolver) |
default Type |
Type.replaceTypeVariables(TypeParameterDeclaration tp,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes)
Replace all variables referring to the given TypeParameter with the given value.
|
Type |
ArrayType.replaceTypeVariables(TypeParameterDeclaration tpToReplace,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
Type |
ReferenceType.replaceTypeVariables(TypeParameterDeclaration tpToReplace,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
Type |
Wildcard.replaceTypeVariables(TypeParameterDeclaration tpToReplace,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
Type |
TypeVariable.replaceTypeVariables(TypeParameterDeclaration tpToBeReplaced,
Type replaced,
Map<TypeParameterDeclaration,Type> inferredTypes) |
| Constructor and Description |
|---|
ArrayType(Type baseType) |
| Constructor and Description |
|---|
ReferenceType(TypeDeclaration typeDeclaration,
List<Type> typeParameters,
TypeSolver typeSolver) |
| Modifier and Type | Method and Description |
|---|---|
Type |
TypeParametersMap.getValue(TypeParameterDeclaration typeParameter) |
Type |
TypeParametersMap.replaceAll(Type type) |
default Type |
TypeParameterValueProvider.useThisTypeParametersOnTheGivenType(Type type)
Replace the type typeParametersValues present in the given type with the ones for which this type
has a value.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Type> |
TypeParameterValueProvider.getGenericParameterByName(String name) |
Optional<Type> |
TypeParametersMap.getValueBySignature(String signature) |
Optional<Type> |
TypeParameterValueProvider.typeParamValue(TypeParameterDeclaration typeParameterDeclaration)
Calculate the value for the given type parameter.
|
| Modifier and Type | Method and Description |
|---|---|
Type |
TypeParametersMap.replaceAll(Type type) |
TypeParametersMap.Builder |
TypeParametersMap.Builder.setValue(TypeParameterDeclaration typeParameter,
Type value) |
default Type |
TypeParameterValueProvider.useThisTypeParametersOnTheGivenType(Type type)
Replace the type typeParametersValues present in the given type with the ones for which this type
has a value.
|
Copyright © 2016. All rights reserved.