public final class TypeVariableSignature extends ClassRefOrTypeVariableSignature
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
equalsIgnoringTypeParams(TypeSignature other)
Compare base types, ignoring generic type parameters.
|
String |
getName()
Get the name of the type variable.
|
int |
hashCode() |
TypeParameter |
resolve()
Look up a type variable (e.g.
|
String |
toStringWithTypeBound()
Returns the type variable along with its type bound, if available (e.g.
|
toString, toStringWithSimpleNames
public String getName()
public TypeParameter resolve()
IllegalArgumentException
- if a type parameter with the same name as the type variable could not be found in the defining
method or the enclosing class.public boolean equalsIgnoringTypeParams(TypeSignature other)
TypeSignature
equalsIgnoringTypeParams
in class TypeSignature
other
- the other TypeSignature
to compare to.TypeSignature
objects are equal, ignoring type parameters.public String toStringWithTypeBound()
resolve()
. Returns just the type variable if there is no type
bound, or if no type bound is known (i.e. if resolve()
returns null).Copyright © 2020. All rights reserved.