public class ArrayTypeSignature extends ReferenceTypeSignature
| 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.
|
ArrayClassInfo |
getArrayClassInfo()
Return an
ArrayClassInfo instance for the array class, cast to its superclass. |
protected ClassInfo |
getClassInfo()
Get the
ClassInfo object for the referenced class, or null if the referenced class was not
encountered during scanning (i.e. no ClassInfo object was created for the class during scanning). |
protected java.lang.String |
getClassName()
The name of the class (used by
getClassInfo() to fetch the ClassInfo object for the class). |
TypeSignature |
getElementTypeSignature()
Get the type signature of the innermost element type of the array.
|
TypeSignature |
getNestedType()
Get the nested type, which is another
ArrayTypeSignature with one dimension fewer, if this array has
2 or more dimensions, otherwise this returns the element type. |
int |
getNumDimensions()
Get the number of dimensions of the array.
|
AnnotationInfoList |
getTypeAnnotationInfo()
Get a list of
AnnotationInfo objects for the type annotations on this array type, or null if none. |
java.lang.String |
getTypeSignatureStr()
Get the raw array type signature string, e.g.
|
int |
hashCode() |
java.lang.Class<?> |
loadClass()
Obtain a {@code Class
|
java.lang.Class<?> |
loadClass(boolean ignoreExceptions)
Obtain a {@code Class
|
java.lang.Class<?> |
loadElementClass()
Get a {@code Class
|
java.lang.Class<?> |
loadElementClass(boolean ignoreExceptions)
Get a {@code Class
|
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.
|
findReferencedClassInfoaddTypeAnnotation, toStringprotected transient ScanResult scanResult
protected transient java.lang.Class<?> classRef
public java.lang.String getTypeSignatureStr()
public TypeSignature getElementTypeSignature()
public int getNumDimensions()
public TypeSignature getNestedType()
ArrayTypeSignature with one dimension fewer, if this array has
2 or more dimensions, otherwise this returns the element type.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.public AnnotationInfoList getTypeAnnotationInfo()
AnnotationInfo objects for the type annotations on this array type, or null if none.getTypeAnnotationInfo in class TypeSignatureAnnotationInfo objects for the type annotations of on this array type, or null if
none.if you want to read for type annotations on inner (nested) dimensions of the array
type.protected java.lang.String getClassName()
getClassInfo() to fetch the ClassInfo object for the class).protected ClassInfo getClassInfo()
ClassInfo object for the referenced class, or null if the referenced class was not
encountered during scanning (i.e. no ClassInfo object was created for the class during scanning). N.B. even
if this method returns null, loadClass() may be able to load the referenced class by name.ClassInfo object for the referenced class.public ArrayClassInfo getArrayClassInfo()
ArrayClassInfo instance for the array class, cast to its superclass.ArrayClassInfo instance.protected void findReferencedClassNames(java.util.Set<java.lang.String> refdClassNames)
findReferencedClassNames in class TypeSignaturerefdClassNames - the referenced class names.public java.lang.Class<?> loadElementClass(boolean ignoreExceptions)
Class<?> reference for the innermost array element type. Causes the ClassLoader to load the
class, if it is not already loaded.ignoreExceptions - Whether or not to ignore exceptions.Class<?> reference for the innermost array element type. Also works for arrays of primitive
element type.public java.lang.Class<?> loadElementClass()
Class<?> reference for the array element type. Causes the ClassLoader to load the element
class, if it is not already loaded.Class<?> reference for the array element type. Also works for arrays of primitive element
type.public java.lang.Class<?> loadClass(boolean ignoreExceptions)
Class<?> reference for the array class named by this ArrayClassInfo object. Causes
the ClassLoader to load the element class, if it is not already loaded.ignoreExceptions - Whether or not to ignore exceptions.java.lang.IllegalArgumentException - if ignoreExceptions is false and there were problems loading the class.public java.lang.Class<?> loadClass()
Class<?> reference for the array class named by this ArrayClassInfo object. Causes
the ClassLoader to load the element class, if it is not already loaded.java.lang.IllegalArgumentException - if there were problems loading the class.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.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