public final class TypeVariableSignature extends ClassRefOrTypeVariableSignature
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<?> |
classRef
The class ref, once the class is loaded.
|
protected ScanResult |
scanResult
The scan result.
|
typeAnnotationInfo| Modifier and Type | Method and Description |
|---|---|
protected void |
addTypeAnnotation(java.util.List<io.github.classgraph.Classfile.TypePathNode> typePath,
AnnotationInfo annotationInfo)
Add a type annotation to this type.
|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsIgnoringTypeParams(TypeSignature other)
Compare base types, ignoring generic type parameters.
|
protected void |
findReferencedClassNames(java.util.Set<java.lang.String> refdClassNames)
Get the names of any classes referenced in the type signature.
|
protected java.lang.String |
getClassName()
Return definingClassName, so that getClassInfo() returns the
ClassInfo object for the containing
class. |
java.lang.String |
getName()
Get the name of the type variable.
|
int |
hashCode() |
TypeParameter |
resolve()
Look up a type variable (e.g.
|
java.lang.String |
toString()
Render to string.
|
protected void |
toStringInternal(boolean useSimpleNames,
AnnotationInfoList annotationsToExclude,
java.lang.StringBuilder buf)
Render type signature to string.
|
java.lang.String |
toStringWithSimpleNames()
Render to string, using only simple
names for classes.
|
java.lang.String |
toStringWithTypeBound()
Returns the type variable along with its type bound, if available (e.g.
|
findReferencedClassInfo, getTypeAnnotationInfoaddTypeAnnotation, toStringprotected transient ScanResult scanResult
protected transient java.lang.Class<?> classRef
public java.lang.String getName()
public TypeParameter resolve()
java.lang.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.protected void addTypeAnnotation(java.util.List<io.github.classgraph.Classfile.TypePathNode> typePath,
AnnotationInfo annotationInfo)
TypeSignatureaddTypeAnnotation in class TypeSignaturetypePath - The type path.annotationInfo - The annotation to add.protected java.lang.String getClassName()
ClassInfo object for the containing
class.protected void findReferencedClassNames(java.util.Set<java.lang.String> refdClassNames)
findReferencedClassNames in class TypeSignaturerefdClassNames - the referenced class names.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean equalsIgnoringTypeParams(TypeSignature other)
TypeSignatureequalsIgnoringTypeParams in class TypeSignatureother - the other TypeSignature to compare to.TypeSignature objects are equal, ignoring type parameters.public java.lang.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).protected void toStringInternal(boolean useSimpleNames,
AnnotationInfoList annotationsToExclude,
java.lang.StringBuilder buf)
HierarchicalTypeSignaturetoStringInternal in class HierarchicalTypeSignatureuseSimpleNames - whether to use simple names for classes.annotationsToExclude - toplevel annotations to exclude, to eliminate duplication (toplevel annotations are both
class/field/method annotations and type annotations).buf - the StringBuilder to write to.public java.lang.String toStringWithSimpleNames()
public java.lang.String toString()
toString in class java.lang.Object