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 Expressionexpressionprivate ResolvedTypeTprivate TypeSolvertypeSolver
-
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 booleanequals(java.lang.Object o)private java.util.List<Expression>getAllReturnExpressions(BlockStmt blockStmt)private java.util.List<Expression>getResultExpressions(BlockStmt blockStmt)inthashCode()private booleanisCompatibleInAssignmentContext(Expression expression, ResolvedType type, TypeSolver typeSolver)private booleanisValueCompatibleBlock(Statement statement)ConstraintFormula.ReductionResultreduce(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 ResolvedTypereplaceTypeVariablesWithInferenceVariables(ResolvedType originalType, java.util.Map<ResolvedTypeVariable,InferenceVariable> correspondences)private MethodTypereplaceTypeVariablesWithInferenceVariables(MethodType methodType)java.lang.StringtoString()
-
-
-
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:ConstraintFormulaA 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:
reducein 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
replaceTypeVariablesWithInferenceVariables
private MethodType replaceTypeVariablesWithInferenceVariables(MethodType methodType)
-
replaceTypeVariablesWithInferenceVariables
private ResolvedType replaceTypeVariablesWithInferenceVariables(ResolvedType originalType, java.util.Map<ResolvedTypeVariable,InferenceVariable> correspondences)
-
-