Class ExpressionCompatibleWithType
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.ConstraintFormula
-
- com.github.javaparser.symbolsolver.resolution.typeinference.constraintformulas.ExpressionCompatibleWithType
-
public class ExpressionCompatibleWithType extends ConstraintFormula
An expression is compatible in a loose invocation context with type T
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.javaparser.symbolsolver.resolution.typeinference.ConstraintFormula
ConstraintFormula.ReductionResult
-
-
Field Summary
Fields Modifier and Type Field Description private Expression
expression
private ResolvedType
T
private TypeSolver
typeSolver
-
Constructor Summary
Constructors Constructor Description ExpressionCompatibleWithType(TypeSolver typeSolver, Expression expression, ResolvedType T)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
private java.util.List<Expression>
getAllReturnExpressions(BlockStmt blockStmt)
private java.util.List<Expression>
getResultExpressions(BlockStmt blockStmt)
int
hashCode()
private boolean
isCompatibleInAssignmentContext(Expression expression, ResolvedType type, TypeSolver typeSolver)
private boolean
isValueCompatibleBlock(Statement statement)
ConstraintFormula.ReductionResult
reduce(BoundSet currentBoundSet)
A formula is reduced to one or both of: i) A bound or bound set, which is to be incorporated with the "current" bound set.private ResolvedType
replaceTypeVariablesWithInferenceVariables(ResolvedType originalType, java.util.Map<ResolvedTypeVariable,InferenceVariable> correspondences)
private MethodType
replaceTypeVariablesWithInferenceVariables(MethodType methodType)
java.lang.String
toString()
-
-
-
Field Detail
-
typeSolver
private TypeSolver typeSolver
-
expression
private Expression expression
-
T
private ResolvedType T
-
-
Constructor Detail
-
ExpressionCompatibleWithType
public ExpressionCompatibleWithType(TypeSolver typeSolver, Expression expression, ResolvedType T)
-
-
Method Detail
-
reduce
public ConstraintFormula.ReductionResult reduce(BoundSet currentBoundSet)
Description copied from class:ConstraintFormula
A formula is reduced to one or both of: i) A bound or bound set, which is to be incorporated with the "current" bound set. Initially, the current bound set is empty. ii) Further constraint formulas, which are to be reduced recursively.- Specified by:
reduce
in classConstraintFormula
-
getResultExpressions
private java.util.List<Expression> getResultExpressions(BlockStmt blockStmt)
-
isCompatibleInAssignmentContext
private boolean isCompatibleInAssignmentContext(Expression expression, ResolvedType type, TypeSolver typeSolver)
-
getAllReturnExpressions
private java.util.List<Expression> getAllReturnExpressions(BlockStmt blockStmt)
-
isValueCompatibleBlock
private boolean isValueCompatibleBlock(Statement statement)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
replaceTypeVariablesWithInferenceVariables
private MethodType replaceTypeVariablesWithInferenceVariables(MethodType methodType)
-
replaceTypeVariablesWithInferenceVariables
private ResolvedType replaceTypeVariablesWithInferenceVariables(ResolvedType originalType, java.util.Map<ResolvedTypeVariable,InferenceVariable> correspondences)
-
-