Modifier and Type | Method and Description |
---|---|
ResolvedType |
Expression.calculateResolvedType()
returns the type associated with the node.
|
Modifier and Type | Method and Description |
---|---|
ResolvedType |
SymbolResolver.calculateType(Expression expression)
For an expression it would find the corresponding resolved type.
|
ResolvedType |
Solver.classToResolvedType(Class<?> clazz)
Convert a
Class into the corresponding ResolvedType . |
ResolvedType |
MethodUsage.getParamType(int i)
Return the type of the formal argument at the given position.
|
ResolvedType |
MethodUsage.returnType() |
ResolvedType |
Solver.solveTypeUsage(String name,
Context context) |
Modifier and Type | Method and Description |
---|---|
List<ResolvedType> |
MethodUsage.exceptionTypes() |
List<ResolvedType> |
MethodUsage.getParamTypes() |
default Optional<ResolvedType> |
Context.solveGenericType(String name)
Default to no generics available in this context, delegating solving to the parent context.
|
default Optional<ResolvedType> |
Context.solveGenericTypeInParentContext(String name) |
Modifier and Type | Method and Description |
---|---|
MethodUsage |
MethodUsage.replaceExceptionType(int i,
ResolvedType replaced) |
MethodUsage |
MethodUsage.replaceParamType(int i,
ResolvedType replaced) |
MethodUsage |
MethodUsage.replaceReturnType(ResolvedType returnType) |
MethodUsage |
MethodUsage.replaceTypeParameter(ResolvedTypeParameterDeclaration typeParameter,
ResolvedType type) |
Modifier and Type | Method and Description |
---|---|
default SymbolReference<ResolvedConstructorDeclaration> |
Context.solveConstructor(List<ResolvedType> argumentsTypes)
We find the method declaration which is the best match for the given name and list of typeParametersValues.
|
default SymbolReference<ResolvedMethodDeclaration> |
Context.solveMethod(String name,
List<ResolvedType> argumentsTypes,
boolean staticOnly)
We find the method declaration which is the best match for the given name and list of typeParametersValues.
|
MethodUsage |
Solver.solveMethod(String methodName,
List<ResolvedType> argumentsTypes,
Context context) |
MethodUsage |
Solver.solveMethod(String methodName,
List<ResolvedType> argumentsTypes,
Node node) |
Optional<MethodUsage> |
Context.solveMethodAsUsage(String name,
List<ResolvedType> argumentsTypes)
Similar to solveMethod but we return a MethodUsage.
|
default SymbolReference<ResolvedMethodDeclaration> |
Context.solveMethodInParentContext(String name,
List<ResolvedType> argumentsTypes,
boolean staticOnly) |
default SymbolReference<ResolvedTypeDeclaration> |
Context.solveType(String name,
List<ResolvedType> typeArguments)
Method used to solve a name with an expected list of type arguments.
|
default SymbolReference<ResolvedTypeDeclaration> |
Context.solveTypeInParentContext(String name,
List<ResolvedType> typeArguments)
Solve a name with type arguments in the parent context.
|
Constructor and Description |
---|
MethodUsage(ResolvedMethodDeclaration declaration,
List<ResolvedType> paramTypes,
ResolvedType returnType) |
MethodUsage(ResolvedMethodDeclaration declaration,
List<ResolvedType> paramTypes,
ResolvedType returnType,
List<ResolvedType> exceptionTypes) |
Constructor and Description |
---|
MethodUsage(ResolvedMethodDeclaration declaration,
List<ResolvedType> paramTypes,
ResolvedType returnType) |
MethodUsage(ResolvedMethodDeclaration declaration,
List<ResolvedType> paramTypes,
ResolvedType returnType,
List<ResolvedType> exceptionTypes) |
MethodUsage(ResolvedMethodDeclaration declaration,
List<ResolvedType> paramTypes,
ResolvedType returnType,
List<ResolvedType> exceptionTypes) |
Modifier and Type | Method and Description |
---|---|
default ResolvedType |
ResolvedTypeParameterDeclaration.getLowerBound()
Get the type used as lower bound.
|
ResolvedType |
ResolvedMethodDeclaration.getReturnType()
The type of the value returned by the current method.
|
ResolvedType |
ResolvedMethodLikeDeclaration.getSpecifiedException(int index)
Type of the corresponding entry in the throws clause.
|
ResolvedType |
ResolvedValueDeclaration.getType()
Type of the declaration.
|
ResolvedType |
ResolvedTypeParameterDeclaration.Bound.getType()
Get the type used in the Bound.
|
default ResolvedType |
ResolvedTypeParameterDeclaration.getUpperBound()
Get the type used as upper bound.
|
Modifier and Type | Method and Description |
---|---|
default List<ResolvedType> |
ResolvedMethodLikeDeclaration.formalParameterTypes() |
default List<ResolvedType> |
ResolvedMethodLikeDeclaration.getSpecifiedExceptions() |
Modifier and Type | Method and Description |
---|---|
static ResolvedTypeParameterDeclaration.Bound |
ResolvedTypeParameterDeclaration.Bound.extendsBound(ResolvedType type)
Create an extends bound with the given type:
extends "given type"
|
boolean |
ResolvedReferenceTypeDeclaration.isAssignableBy(ResolvedType type)
Can we assign instances of the given type to variables having the type defined
by this declaration?
|
default boolean |
ResolvedMethodDeclaration.isReturnTypeSubstituable(ResolvedType otherResolvedType) |
static ResolvedTypeParameterDeclaration.Bound |
ResolvedTypeParameterDeclaration.Bound.superBound(ResolvedType type)
Create a super bound with the given type:
super "given type"
|
Modifier and Type | Class and Description |
---|---|
class |
InferenceVariableType
An element using during type inference.
|
Modifier and Type | Method and Description |
---|---|
ResolvedType |
InferenceContext.addPair(ResolvedType target,
ResolvedType actual) |
ResolvedType |
InferenceContext.addSingle(ResolvedType actual) |
ResolvedType |
InferenceVariableType.equivalentType() |
static ResolvedType |
MethodResolutionLogic.replaceTypeParam(ResolvedType type,
ResolvedTypeParameterDeclaration tp,
TypeSolver typeSolver) |
ResolvedType |
InferenceContext.resolve(ResolvedType type) |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
InferenceContext.addPair(ResolvedType target,
ResolvedType actual) |
ResolvedType |
InferenceContext.addSingle(ResolvedType actual) |
static Optional<MethodUsage> |
FunctionalInterfaceLogic.getFunctionalMethod(ResolvedType type)
Get the functional method defined by the type, if any.
|
boolean |
InferenceVariableType.isAssignableBy(ResolvedType other) |
static boolean |
MethodResolutionLogic.isAssignableMatchTypeParameters(ResolvedType expected,
ResolvedType actual,
Map<String,ResolvedType> matchedParameters) |
static boolean |
FunctionalInterfaceLogic.isFunctionalInterfaceType(ResolvedType type) |
void |
InferenceVariableType.registerEquivalentType(ResolvedType type) |
static ResolvedType |
MethodResolutionLogic.replaceTypeParam(ResolvedType type,
ResolvedTypeParameterDeclaration tp,
TypeSolver typeSolver) |
ResolvedType |
InferenceContext.resolve(ResolvedType type) |
Modifier and Type | Method and Description |
---|---|
static SymbolReference<ResolvedConstructorDeclaration> |
ConstructorResolutionLogic.findMostApplicable(List<ResolvedConstructorDeclaration> constructors,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver) |
static SymbolReference<ResolvedConstructorDeclaration> |
ConstructorResolutionLogic.findMostApplicable(List<ResolvedConstructorDeclaration> constructors,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver,
boolean wildcardTolerance) |
static SymbolReference<ResolvedMethodDeclaration> |
MethodResolutionLogic.findMostApplicable(List<ResolvedMethodDeclaration> methods,
String name,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver) |
static SymbolReference<ResolvedMethodDeclaration> |
MethodResolutionLogic.findMostApplicable(List<ResolvedMethodDeclaration> methods,
String name,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver,
boolean wildcardTolerance) |
static Optional<MethodUsage> |
MethodResolutionLogic.findMostApplicableUsage(List<MethodUsage> methods,
String name,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver) |
static boolean |
MethodResolutionLogic.isApplicable(MethodUsage methodUsage,
String needleName,
List<ResolvedType> needleParameterTypes,
TypeSolver typeSolver)
Note the specific naming here -- parameters are part of the method declaration,
while arguments are the values passed when calling a method.
|
static boolean |
ConstructorResolutionLogic.isApplicable(ResolvedConstructorDeclaration constructor,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver) |
static boolean |
MethodResolutionLogic.isApplicable(ResolvedMethodDeclaration method,
String name,
List<ResolvedType> argumentsTypes,
TypeSolver typeSolver) |
static boolean |
MethodResolutionLogic.isAssignableMatchTypeParameters(ResolvedReferenceType expected,
ResolvedReferenceType actual,
Map<String,ResolvedType> matchedParameters) |
static boolean |
MethodResolutionLogic.isAssignableMatchTypeParameters(ResolvedType expected,
ResolvedType actual,
Map<String,ResolvedType> matchedParameters) |
protected static boolean |
MethodResolutionLogic.isExactMatch(ResolvedMethodLikeDeclaration method,
List<ResolvedType> argumentsTypes) |
SymbolReference<ResolvedMethodDeclaration> |
MethodResolutionCapability.solveMethod(String name,
List<ResolvedType> argumentsTypes,
boolean staticOnly) |
static SymbolReference<ResolvedMethodDeclaration> |
MethodResolutionLogic.solveMethodInType(ResolvedTypeDeclaration typeDeclaration,
String name,
List<ResolvedType> argumentsTypes) |
static SymbolReference<ResolvedMethodDeclaration> |
MethodResolutionLogic.solveMethodInType(ResolvedTypeDeclaration typeDeclaration,
String name,
List<ResolvedType> argumentsTypes,
boolean staticOnly) |
Constructor and Description |
---|
ConflictingGenericTypesException(ResolvedType formalType,
ResolvedType actualType) |
Modifier and Type | Class and Description |
---|---|
class |
LambdaArgumentTypePlaceholder
Placeholder used to represent a lambda argument type while it is being
calculated.
|
Modifier and Type | Method and Description |
---|---|
ResolvedType |
Value.getType() |
Modifier and Type | Method and Description |
---|---|
boolean |
LambdaArgumentTypePlaceholder.isAssignableBy(ResolvedType other) |
Constructor and Description |
---|
Value(ResolvedType type,
String name) |
Modifier and Type | Class and Description |
---|---|
class |
LazyType |
class |
NullType
This is a virtual type used to represent null values.
|
class |
ReferenceTypeImpl |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
LazyType.getType() |
ResolvedType |
LazyType.replaceTypeVariables(ResolvedTypeParameterDeclaration tp,
ResolvedType replaced) |
ResolvedType |
LazyType.replaceTypeVariables(ResolvedTypeParameterDeclaration tp,
ResolvedType replaced,
Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes) |
ResolvedType |
ReferenceTypeImpl.toRawType() |
ResolvedType |
ReferenceTypeImpl.transformTypeParameters(ResolvedTypeTransformer transformer)
Execute a transformation on all the type parameters of this element.
|
Modifier and Type | Method and Description |
---|---|
boolean |
ReferenceTypeImpl.isAssignableBy(ResolvedType other)
This method checks if ThisType t = new OtherType() would compile.
|
boolean |
NullType.isAssignableBy(ResolvedType other) |
boolean |
LazyType.isAssignableBy(ResolvedType other) |
ResolvedType |
LazyType.replaceTypeVariables(ResolvedTypeParameterDeclaration tp,
ResolvedType replaced) |
ResolvedType |
LazyType.replaceTypeVariables(ResolvedTypeParameterDeclaration tp,
ResolvedType replaced,
Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes) |
Modifier and Type | Method and Description |
---|---|
protected ResolvedReferenceType |
ReferenceTypeImpl.create(ResolvedReferenceTypeDeclaration typeDeclaration,
List<ResolvedType> typeParametersCorrected) |
ResolvedType |
LazyType.replaceTypeVariables(ResolvedTypeParameterDeclaration tp,
ResolvedType replaced,
Map<ResolvedTypeParameterDeclaration,ResolvedType> inferredTypes) |
Constructor and Description |
---|
LazyType(Function<Void,ResolvedType> provider) |
ReferenceTypeImpl(ResolvedReferenceTypeDeclaration typeDeclaration,
List<ResolvedType> typeArguments) |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
ConditionalExprHandler.resolveType() |
Modifier and Type | Class and Description |
---|---|
class |
ResolvedArrayType
Array Type.
|
class |
ResolvedIntersectionType
An intersection type is defined in java as list of types separates by ampersands.
|
class |
ResolvedLambdaConstraintType |
class |
ResolvedPrimitiveType |
class |
ResolvedReferenceType
A ReferenceType like a class, an interface or an enum.
|
class |
ResolvedTypeVariable
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 |
ResolvedUnionType
A union type is defined in java as list of types separates by pipes.
|
class |
ResolvedVoidType
The special type void.
|
class |
ResolvedWildcard
A wildcard can be:
- unbounded (?)
|
Modifier and Type | Field and Description |
---|---|
static ResolvedType |
ResolvedVoidType.INSTANCE |
Modifier and Type | Method and Description |
---|---|
static Optional<ResolvedType> |
ResolvedPrimitiveType.byBoxTypeQName(String qName) |
List<ResolvedType> |
ResolvedUnionType.getElements() |
List<ResolvedType> |
ResolvedIntersectionType.getElements() |
Optional<ResolvedType> |
ResolvedReferenceType.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<ResolvedType> |
ResolvedReferenceType.getGenericParameterByName(String name)
Get the type associated with the type parameter with the given name.
|
List<Pair<ResolvedTypeParameterDeclaration,ResolvedType>> |
ResolvedReferenceType.getTypeParametersMap()
Get the values for all type parameters declared on this type.
|
List<ResolvedType> |
ResolvedReferenceType.typeParametersValues()
Get the values for all type parameters declared on this type.
|
Optional<ResolvedType> |
ResolvedReferenceType.typeParamValue(ResolvedTypeParameterDeclaration typeParameterDeclaration) |
Constructor and Description |
---|
ResolvedArrayType(ResolvedType baseType) |
Constructor and Description |
---|
ResolvedIntersectionType(Collection<ResolvedType> elements) |
ResolvedReferenceType(ResolvedReferenceTypeDeclaration typeDeclaration,
List<ResolvedType> typeArguments) |
ResolvedUnionType(List<ResolvedType> elements) |
Modifier and Type | Method and Description |
---|---|
ResolvedType |
ResolvedTypeParametersMap.getValue(ResolvedTypeParameterDeclaration typeParameter) |
ResolvedType |
ResolvedTypeParametersMap.replaceAll(ResolvedType type) |
default ResolvedType |
ResolvedTypeParameterValueProvider.useThisTypeParametersOnTheGivenType(ResolvedType 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<ResolvedType> |
ResolvedTypeParameterValueProvider.getGenericParameterByName(String name) |
List<ResolvedType> |
ResolvedTypeParametersMap.getTypes() |
Optional<ResolvedType> |
ResolvedTypeParametersMap.getValueBySignature(String signature) |
Optional<ResolvedType> |
ResolvedTypeParameterValueProvider.typeParamValue(ResolvedTypeParameterDeclaration typeParameterDeclaration)
Calculate the value for the given type parameter.
|
Modifier and Type | Method and Description |
---|---|
ResolvedType |
ResolvedTypeParametersMap.replaceAll(ResolvedType type) |
ResolvedTypeParametersMap.Builder |
ResolvedTypeParametersMap.Builder.setValue(ResolvedTypeParameterDeclaration typeParameter,
ResolvedType value) |
default ResolvedType |
ResolvedTypeParameterValueProvider.useThisTypeParametersOnTheGivenType(ResolvedType type)
Replace the type typeParametersValues present in the given type with the ones for which this type
has a value.
|
Copyright © 2007–2024. All rights reserved.