Class BoundOrConstraint
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.typeresolution.typeinference.BoundOrConstraint
-
- Direct Known Subclasses:
Bound
,Constraint
public abstract class BoundOrConstraint extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected InferenceRuleType
ruleType
-
Constructor Summary
Constructors Constructor Description BoundOrConstraint(JavaTypeDefinition leftProperType, JavaTypeDefinition rightProperType, InferenceRuleType ruleType)
BoundOrConstraint(JavaTypeDefinition leftProperType, Variable rightTypeVariable, InferenceRuleType ruleType)
BoundOrConstraint(Variable leftTypeVariable, JavaTypeDefinition rightProperType, InferenceRuleType ruleType)
BoundOrConstraint(Variable leftTypeVariable, Variable rightTypeVariable, InferenceRuleType ruleType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addVariablesToSet(java.util.Set<Variable> variables)
boolean
equals(java.lang.Object obj)
Variable
getLeftMentionedVariable()
Variable
getRightMentionedVariable()
int
hashCode()
boolean
isLeftArray()
boolean
isLeftClassOrInterface()
boolean
isLeftNull()
boolean
isLeftPrimitive()
boolean
isLeftProper()
boolean
isLeftType()
boolean
isLeftVariable()
boolean
isRightArray()
boolean
isRightClassOrInterface()
boolean
isRightNull()
boolean
isRightPrimitive()
boolean
isRightProper()
boolean
isRightType()
boolean
isRightVariable()
boolean
leftHasMentionedVariable()
JavaTypeDefinition
leftProper()
Variable
leftVariable()
abstract java.util.List<BoundOrConstraint>
reduce()
boolean
rightHasMentionedVariable()
JavaTypeDefinition
rightProper()
Variable
rightVariable()
InferenceRuleType
ruleType()
-
-
-
Field Detail
-
ruleType
protected final InferenceRuleType ruleType
-
-
Constructor Detail
-
BoundOrConstraint
public BoundOrConstraint(JavaTypeDefinition leftProperType, JavaTypeDefinition rightProperType, InferenceRuleType ruleType)
-
BoundOrConstraint
public BoundOrConstraint(JavaTypeDefinition leftProperType, Variable rightTypeVariable, InferenceRuleType ruleType)
-
BoundOrConstraint
public BoundOrConstraint(Variable leftTypeVariable, JavaTypeDefinition rightProperType, InferenceRuleType ruleType)
-
BoundOrConstraint
public BoundOrConstraint(Variable leftTypeVariable, Variable rightTypeVariable, InferenceRuleType ruleType)
-
-
Method Detail
-
isLeftProper
public boolean isLeftProper()
-
isLeftVariable
public boolean isLeftVariable()
-
isLeftNull
public boolean isLeftNull()
-
isLeftType
public boolean isLeftType()
-
isLeftPrimitive
public boolean isLeftPrimitive()
-
isLeftClassOrInterface
public boolean isLeftClassOrInterface()
-
isLeftArray
public boolean isLeftArray()
-
isRightProper
public boolean isRightProper()
-
isRightVariable
public boolean isRightVariable()
-
isRightNull
public boolean isRightNull()
-
isRightType
public boolean isRightType()
-
isRightPrimitive
public boolean isRightPrimitive()
-
isRightClassOrInterface
public boolean isRightClassOrInterface()
-
isRightArray
public boolean isRightArray()
-
leftProper
public JavaTypeDefinition leftProper()
-
leftVariable
public Variable leftVariable()
-
rightProper
public JavaTypeDefinition rightProper()
-
rightVariable
public Variable rightVariable()
-
ruleType
public InferenceRuleType ruleType()
-
reduce
public abstract java.util.List<BoundOrConstraint> reduce()
-
addVariablesToSet
public void addVariablesToSet(java.util.Set<Variable> variables)
-
leftHasMentionedVariable
public boolean leftHasMentionedVariable()
- Returns:
- true, if the left-hand side mentions variables
-
rightHasMentionedVariable
public boolean rightHasMentionedVariable()
- Returns:
- true, if the right-hand side mentions variales
-
getLeftMentionedVariable
public Variable getLeftMentionedVariable()
-
getRightMentionedVariable
public Variable getRightMentionedVariable()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-