public class TypeVariablePattern extends PatternNode
For example:
end, sourceContext, start
Constructor and Description |
---|
TypeVariablePattern(java.lang.String variableName)
Create a named type variable with upper bound Object and no lower bounds.
|
TypeVariablePattern(java.lang.String variableName,
TypePattern upperBound)
Create a named type variable with the given upper bound and no lower bounds Use this constructor for the T extends Foo case
|
TypeVariablePattern(java.lang.String variableName,
TypePattern upperLimit,
TypePattern[] interfaceBounds,
TypePattern lowerBound) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(PatternNodeVisitor visitor,
java.lang.Object data) |
boolean |
equals(java.lang.Object obj) |
TypePattern[] |
getAdditionalInterfaceBounds() |
TypePattern |
getLowerBound() |
java.lang.String |
getName() |
TypePattern |
getRawTypePattern() |
TypePattern |
getUpperBound() |
boolean |
hasAdditionalInterfaceBounds() |
int |
hashCode() |
boolean |
hasLowerBound() |
boolean |
isAnythingPattern() |
static TypeVariablePattern |
read(VersionedDataInputStream s,
ISourceContext context) |
java.lang.String |
toString() |
void |
write(CompressingDataOutputStream s) |
copyLocationFrom, getEnd, getFileName, getSourceContext, getSourceLocation, getStart, readLocation, setLocation, traverse, writeLocation
public TypeVariablePattern(java.lang.String variableName)
public TypeVariablePattern(java.lang.String variableName, TypePattern upperBound)
variableName
- upperBound
- public TypeVariablePattern(java.lang.String variableName, TypePattern upperLimit, TypePattern[] interfaceBounds, TypePattern lowerBound)
public java.lang.Object accept(PatternNodeVisitor visitor, java.lang.Object data)
accept
in class PatternNode
public java.lang.String getName()
public boolean isAnythingPattern()
public TypePattern getRawTypePattern()
public TypePattern getUpperBound()
public boolean hasLowerBound()
public TypePattern getLowerBound()
public boolean hasAdditionalInterfaceBounds()
public TypePattern[] getAdditionalInterfaceBounds()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void write(CompressingDataOutputStream s) throws java.io.IOException
write
in class PatternNode
java.io.IOException
public static TypeVariablePattern read(VersionedDataInputStream s, ISourceContext context) throws java.io.IOException
java.io.IOException