Class Bound
- java.lang.Object
-
- com.github.javaparser.symbolsolver.resolution.typeinference.Bound
-
- Direct Known Subclasses:
CapturesBound
,FalseBound
,SameAsBound
,SubtypeOfBound
,ThrowsBound
public abstract class Bound extends java.lang.Object
Bounds are defined for Inference Variables.
-
-
Constructor Summary
Constructors Constructor Description Bound()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static Bound
falseBound()
boolean
isADependency()
Other bounds relate two inference variables, or an inference variable to a type that contains inference variables.java.util.Optional<Instantiation>
isAnInstantiation()
Given a bound of the form α = T or T = α, we say T is an instantiation of α.(package private) boolean
isAnInstantiationFor(InferenceVariable v)
java.util.Optional<ProperLowerBound>
isProperLowerBound()
Given a bound of the form T <: α, we say T is a proper lower bound of α.(package private) java.util.Optional<ProperLowerBound>
isProperLowerBoundFor(InferenceVariable inferenceVariable)
java.util.Optional<ProperUpperBound>
isProperUpperBound()
Given a bound of the form α <: T, we say T is a proper upper bound of α.(package private) java.util.Optional<ProperUpperBound>
isProperUpperBoundFor(InferenceVariable inferenceVariable)
abstract boolean
isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.(package private) boolean
isThrowsBoundOn(InferenceVariable inferenceVariable)
abstract java.util.Set<InferenceVariable>
usedInferenceVariables()
-
-
-
Method Detail
-
falseBound
static Bound falseBound()
-
isSatisfied
public abstract boolean isSatisfied(InferenceVariableSubstitution inferenceVariableSubstitution)
A bound is satisfied by an inference variable substitution if, after applying the substitution, the assertion is true.
-
isAnInstantiation
public java.util.Optional<Instantiation> isAnInstantiation()
Given a bound of the form α = T or T = α, we say T is an instantiation of α. Return empty if it is not an instantiation. Otherwise it returns the variable of which this is an instantiation.
-
isAnInstantiationFor
boolean isAnInstantiationFor(InferenceVariable v)
-
isProperUpperBound
public java.util.Optional<ProperUpperBound> isProperUpperBound()
Given a bound of the form α <: T, we say T is a proper upper bound of α. Return empty if it is not a proper upper bound. Otherwise it returns the variable of which this is an proper upper bound.
-
isProperLowerBound
public java.util.Optional<ProperLowerBound> isProperLowerBound()
Given a bound of the form T <: α, we say T is a proper lower bound of α. Return empty if it is not a proper lower bound. Otherwise it returns the variable of which this is an proper lower bound.
-
isProperLowerBoundFor
java.util.Optional<ProperLowerBound> isProperLowerBoundFor(InferenceVariable inferenceVariable)
-
isProperUpperBoundFor
java.util.Optional<ProperUpperBound> isProperUpperBoundFor(InferenceVariable inferenceVariable)
-
isADependency
public boolean isADependency()
Other bounds relate two inference variables, or an inference variable to a type that contains inference variables. Such bounds, of the form S = T or S <: T, are called dependencies.
-
isThrowsBoundOn
boolean isThrowsBoundOn(InferenceVariable inferenceVariable)
-
usedInferenceVariables
public abstract java.util.Set<InferenceVariable> usedInferenceVariables()
-
-