Class AdditionalArgument
java.lang.Object
org.checkerframework.framework.util.typeinference8.constraint.AdditionalArgument
- All Implemented Interfaces:
Constraint
,ReductionResult
A constraint the represent additional argument constraints generated from a method or constructor
invocation that is a part of a larger inference problem. When this constraint is reduced it will
generate more constraints from the invocaton. This is because created the constraints might use
the type of an implicit lambda parameter for which the larger inference problem has not yet found
a type. So, the additional constraints can be created until after the implicit lambda parameter
has a type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.framework.util.typeinference8.constraint.Constraint
Constraint.Kind
Nested classes/interfaces inherited from interface org.checkerframework.framework.util.typeinference8.constraint.ReductionResult
ReductionResult.ReductionResultPair
-
Field Summary
Fields inherited from interface org.checkerframework.framework.util.typeinference8.constraint.ReductionResult
UNCHECKED_CONVERSION
-
Constructor Summary
ConstructorDescriptionAdditionalArgument
(ExpressionTree methodOrConstructorInvocation) Creates a new constraint. -
Method Summary
Modifier and TypeMethodDescriptiongetKind()
Return the kind of constraint.reduce
(Java8InferenceContext context) Reduce this constraint what this means depends on the kind of constraint.
-
Constructor Details
-
AdditionalArgument
Creates a new constraint.- Parameters:
methodOrConstructorInvocation
- tree for the method or constructor invocation for this constraint
-
-
Method Details
-
getKind
Description copied from interface:Constraint
Return the kind of constraint.- Specified by:
getKind
in interfaceConstraint
- Returns:
- the kind of constraint
-
reduce
Description copied from interface:Constraint
Reduce this constraint what this means depends on the kind of constraint. Reduction can produce new bounds and/or new constraints.Reduction is documented in JLS section 18.2
- Specified by:
reduce
in interfaceConstraint
- Parameters:
context
- Java8InferenceContext- Returns:
- the result of reducing this constraint
-