Top Description Fields Constructors Methods
io.github.classgraph

public Class ArrayClassInfo

extends ClassInfo
Class Inheritance
Imports
java.util.Map, .Set, nonapi.io.github.classgraph.utils.LogNode

Holds metadata about an array class. This class extends ClassInfo with additional methods relevant to array classes, in particular getArrayTypeSignature(), getTypeSignatureStr(), getElementTypeSignature(), getElementClassInfo(), loadElementClass(), and getNumDimensions().

An ArrayClassInfo object will not have any methods, fields or annotations. ClassInfo#isArrayClass() will return true for this subclass of ClassInfo.

Field Summary

Modifier and TypeField and Description
private ArrayTypeSignature
arrayTypeSignature

The array type signature.

private ClassInfo
elementClassInfo

The element class info.

Inherited from io.github.classgraph.ClassInfo:
annotationDefaultParamValuesannotationDefaultParamValuesHasBeenConvertedToPrimitiveannotationInfoclassfileResourceclassLoaderclasspathElementfieldInfoisExternalClassisInheritedisScannedClassmethodInfomoduleInfonamepackageInfotypeAnnotationDecoratorstypeSignatureStr

Constructor Summary

AccessConstructor and Description
pack-priv
ArrayClassInfo()

Default constructor for deserialization.

pack-priv
ArrayClassInfo(final ArrayTypeSignature
the array type signature
arrayTypeSignature
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the other object
obj
)

Overrides io.github.classgraph.ClassInfo.equals.

Use class name for equals().

protected void
findReferencedClassInfo(final Map<String, ClassInfo>
the map from class name to ClassInfo.
classNameToClassInfo
,
final Set<ClassInfo>
the referenced class info
refdClassInfo
,
final LogNode
the log
log
)

Overrides io.github.classgraph.ClassInfo.findReferencedClassInfo.

Get ClassInfo objects for any classes referenced in the type descriptor or type signature.

public ArrayTypeSignature

Returns:

The class type signature, if available, otherwise returns null.
getArrayTypeSignature
()

Get the type signature of the class.

public ClassInfo

Returns:

the ClassInfo instance for the array element type. Returns null if the element type was not found during the scan. In particular, will return null for arrays that have a primitive element type.
getElementClassInfo
()

Get the ClassInfo instance for the array element type.

public TypeSignature

Returns:

The type signature of the array elements.
getElementTypeSignature
()

Get the type signature of the array elements.

public int

Returns:

The number of dimensions of the array.
getNumDimensions
()

Get the number of dimensions of the array.

public ClassTypeSignature

Returns:

null (always).
getTypeSignature
()

Overrides io.github.classgraph.ClassInfo.getTypeSignature.

Returns null, because array classes do not have a ClassTypeSignature.

public String

Returns:

The raw type signature string of the array class.
getTypeSignatureStr
()

Overrides io.github.classgraph.ClassInfo.getTypeSignatureStr.

Get the raw type signature string of the array class, e.g. "[[I" for "int[][]".

public int
hashCode()

Overrides io.github.classgraph.ClassInfo.hashCode.

Use hash code of class name.

public Class<?>

Returns:

The class reference, or null, if ignoreExceptions is true and there was an exception or error loading the class.
loadClass
(final boolean
Whether or not to ignore exceptions
ignoreExceptions
)

Overrides io.github.classgraph.ClassInfo.loadClass.

Obtain a Class<?

public Class<?>

Returns:

The class reference.
loadClass
()

Overrides io.github.classgraph.ClassInfo.loadClass.

Obtain a Class<?

public Class<?>

Returns:

a Class<?> reference for the array element type. Also works for arrays of primitive element type.
loadElementClass
(final boolean
Whether or not to ignore exceptions.
ignoreExceptions
)

Get a Class<?

public Class<?>

Returns:

a Class<?> reference for the array element type. Also works for arrays of primitive element type.
loadElementClass
()

Get a Class<?

pack-priv void
setScanResult(final ScanResult
the scan result
scanResult
)

Overrides io.github.classgraph.ClassInfo.setScanResult.

Set ScanResult backreferences in info objects after scan has completed.

Inherited from io.github.classgraph.ClassInfo:
addAnnotationParamDefaultValuesaddClassAnnotationaddClassContainmentaddFieldInfoaddFullyQualifiedDefiningMethodNameaddImplementedInterfaceaddMethodInfoaddReferencedClassNamesaddRelatedClassaddScannedClassaddSuperclassaddTypeDecoratorscompareToextendsSuperclassextendsSuperclassgetAllAnnotationClassesgetAllClassesgetAllEnumsgetAllImplementedInterfaceClassesgetAllInterfacesOrAnnotationClassesgetAllRecordsgetAllStandardClassesgetAnnotationDefaultParameterValuesgetAnnotationInfogetAnnotationInfogetAnnotationInfogetAnnotationInfoRepeatablegetAnnotationInfoRepeatablegetAnnotationsgetClassDependenciesgetClassesImplementinggetClassesWithAnnotationgetClassesWithAnnotationDirectOnlygetClassesWithFieldAnnotationgetClassesWithFieldAnnotationDirectOnlygetClassesWithMethodAnnotationgetClassesWithMethodAnnotationDirectOnlygetClassesWithMethodParameterAnnotationgetClassesWithMethodParameterAnnotationDirectOnlygetClassfileMajorVersiongetClassfileMinorVersiongetClassInfogetClassNamegetClasspathElementFilegetClasspathElementURIgetClasspathElementURLgetConstructorInfogetDeclaredConstructorInfogetDeclaredFieldInfogetDeclaredFieldInfogetDeclaredMethodAndConstructorInfogetDeclaredMethodInfogetDeclaredMethodInfogetEnumConstantObjectsgetEnumConstantsgetFieldAnnotationsgetFieldInfogetFieldInfogetFullyQualifiedDefiningMethodNamegetInnerClassesgetInterfacesgetMethodAndConstructorInfogetMethodAnnotationsgetMethodInfogetMethodInfogetMethodParameterAnnotationsgetModifiersgetModifiersStrgetModuleInfogetModuleRefgetNamegetOrCreateClassInfogetOuterClassesgetPackageInfogetPackageNamegetResourcegetSimpleNamegetSimpleNamegetSourceFilegetSubclassesgetSuperclassgetSuperclassesgetTypeDescriptorgetTypeSignatureOrTypeDescriptorhandleRepeatableAnnotationshasAnnotationhasAnnotationhasDeclaredFieldhasDeclaredFieldAnnotationhasDeclaredFieldAnnotationhasDeclaredMethodhasDeclaredMethodAnnotationhasDeclaredMethodAnnotationhasDeclaredMethodParameterAnnotationhasDeclaredMethodParameterAnnotationhasFieldhasFieldAnnotationhasFieldAnnotationhasMethodhasMethodAnnotationhasMethodAnnotationhasMethodParameterAnnotationhasMethodParameterAnnotationimplementsInterfaceimplementsInterfaceisAbstractisAnnotationisAnonymousInnerClassisArrayClassisEnumisExternalClassisFinalisImplementedInterfaceisInnerClassisInterfaceisInterfaceOrAnnotationisOuterClassisPackageVisibleisPrivateisProtectedisPublicisRecordisStandardClassisStaticisSyntheticloadClassloadClasssetClassfileVersionsetIsAnnotationsetIsInterfacesetIsRecordsetModifierssetReferencedClassessetSourceFilesetTypeSignaturetoString

Field Detail

arrayTypeSignatureback to summary
private ArrayTypeSignature arrayTypeSignature

The array type signature.

elementClassInfoback to summary
private ClassInfo elementClassInfo

The element class info.

Constructor Detail

ArrayClassInfoback to summary
pack-priv ArrayClassInfo()

Default constructor for deserialization.

ArrayClassInfoback to summary
pack-priv ArrayClassInfo(final ArrayTypeSignature arrayTypeSignature)

Constructor.

Parameters
arrayTypeSignature:ArrayTypeSignature

the array type signature

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides io.github.classgraph.ClassInfo.equals.

Doc from io.github.classgraph.ClassInfo.equals.

Use class name for equals().

Parameters
obj:Object

the other object

Returns:boolean

Whether the objects were equal.

Annotations
@Override
findReferencedClassInfoback to summary
protected void findReferencedClassInfo(final Map<String, ClassInfo> classNameToClassInfo, final Set<ClassInfo> refdClassInfo, final LogNode log)

Overrides io.github.classgraph.ClassInfo.findReferencedClassInfo.

Get ClassInfo objects for any classes referenced in the type descriptor or type signature.

Parameters
classNameToClassInfo:Map<String, ClassInfo>

the map from class name to ClassInfo.

refdClassInfo:Set<ClassInfo>

the referenced class info

log:LogNode

Doc from io.github.classgraph.ClassInfo.findReferencedClassInfo.

the log

Annotations
@Override
getArrayTypeSignatureback to summary
public ArrayTypeSignature getArrayTypeSignature()

Get the type signature of the class.

Returns:ArrayTypeSignature

The class type signature, if available, otherwise returns null.

getElementClassInfoback to summary
public ClassInfo getElementClassInfo()

Get the ClassInfo instance for the array element type.

Returns:ClassInfo

the ClassInfo instance for the array element type. Returns null if the element type was not found during the scan. In particular, will return null for arrays that have a primitive element type.

getElementTypeSignatureback to summary
public TypeSignature getElementTypeSignature()

Get the type signature of the array elements.

Returns:TypeSignature

The type signature of the array elements.

getNumDimensionsback to summary
public int getNumDimensions()

Get the number of dimensions of the array.

Returns:int

The number of dimensions of the array.

getTypeSignatureback to summary
public ClassTypeSignature getTypeSignature()

Overrides io.github.classgraph.ClassInfo.getTypeSignature.

Returns null, because array classes do not have a ClassTypeSignature. Call getArrayTypeSignature() instead.

Returns:ClassTypeSignature

null (always).

Annotations
@Override
getTypeSignatureStrback to summary
public String getTypeSignatureStr()

Overrides io.github.classgraph.ClassInfo.getTypeSignatureStr.

Get the raw type signature string of the array class, e.g. "[[I" for "int[][]".

Returns:String

The raw type signature string of the array class.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides io.github.classgraph.ClassInfo.hashCode.

Doc from io.github.classgraph.ClassInfo.hashCode.

Use hash code of class name.

Returns:int

the hashcode

Annotations
@Override
loadClassback to summary
public Class<?> loadClass(final boolean ignoreExceptions)

Overrides io.github.classgraph.ClassInfo.loadClass.

Obtain a 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.

Parameters
ignoreExceptions:boolean

Whether or not to ignore exceptions

Returns:Class<?>

The class reference, or null, if ignoreExceptions is true and there was an exception or error loading the class.

Annotations
@Override
Exceptions
IllegalArgumentException:
if ignoreExceptions is false and there were problems loading the class.
loadClassback to summary
public Class<?> loadClass()

Overrides io.github.classgraph.ClassInfo.loadClass.

Obtain a 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.

Returns:Class<?>

The class reference.

Annotations
@Override
Exceptions
IllegalArgumentException:
if there were problems loading the class.
loadElementClassback to summary
public Class<?> loadElementClass(final boolean ignoreExceptions)

Get a Class<?> reference for the array element type. Causes the ClassLoader to load the element class, if it is not already loaded.

Parameters
ignoreExceptions:boolean

Whether or not to ignore exceptions.

Returns:Class<?>

a Class<?> reference for the array element type. Also works for arrays of primitive element type.

loadElementClassback to summary
public Class<?> loadElementClass()

Get a Class<?> reference for the array element type. Causes the ClassLoader to load the element class, if it is not already loaded.

Returns:Class<?>

a Class<?> reference for the array element type. Also works for arrays of primitive element type.

setScanResultback to summary
pack-priv void setScanResult(final ScanResult scanResult)

Overrides io.github.classgraph.ClassInfo.setScanResult.

Doc from io.github.classgraph.ScanResultObject.setScanResult.

Set ScanResult backreferences in info objects after scan has completed.

Parameters
scanResult:ScanResult

the scan result

Annotations
@Override