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 InferenceRuleTyperuleType
-
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 voidaddVariablesToSet(java.util.Set<Variable> variables)booleanequals(java.lang.Object obj)VariablegetLeftMentionedVariable()VariablegetRightMentionedVariable()inthashCode()booleanisLeftArray()booleanisLeftClassOrInterface()booleanisLeftNull()booleanisLeftPrimitive()booleanisLeftProper()booleanisLeftType()booleanisLeftVariable()booleanisRightArray()booleanisRightClassOrInterface()booleanisRightNull()booleanisRightPrimitive()booleanisRightProper()booleanisRightType()booleanisRightVariable()booleanleftHasMentionedVariable()JavaTypeDefinitionleftProper()VariableleftVariable()abstract java.util.List<BoundOrConstraint>reduce()booleanrightHasMentionedVariable()JavaTypeDefinitionrightProper()VariablerightVariable()InferenceRuleTyperuleType()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-