Class BaseTypeSignature
java.lang.Object
io.github.classgraph.HierarchicalTypeSignature
io.github.classgraph.TypeSignature
io.github.classgraph.BaseTypeSignature
A type signature for a base type (byte, char, double, float, int, long, short, boolean, or void).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?> The class ref, once the class is loaded.protected ScanResultThe scan result.Fields inherited from class HierarchicalTypeSignature
typeAnnotationInfo -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation to this type.booleanbooleanCompare base types, ignoring generic type parameters.protected voidfindReferencedClassNames(Set<String> refdClassNames) Get the names of any classes referenced in the type signature.protected ClassInfoprotected StringThe name of the class (used byScanResultObject.getClassInfo()to fetch theClassInfoobject for the class).Class<?> getType()Get the type.charGet the type signature char used to represent the type, e.g.Get the name of the type as a string.inthashCode()toString()Render to string.protected voidtoStringInternal(boolean useSimpleNames, AnnotationInfoList annotationsToExclude, StringBuilder buf) Render type signature to string.Render to string, using only simple names for classes.Methods inherited from class TypeSignature
findReferencedClassInfo, getTypeAnnotationInfoMethods inherited from class HierarchicalTypeSignature
addTypeAnnotation, toString
-
Field Details
-
scanResult
The scan result. -
classRef
The class ref, once the class is loaded.
-
-
Method Details
-
getTypeSignatureChar
public char getTypeSignatureChar()Get the type signature char used to represent the type, e.g. 'I' for int.- Returns:
- the type signature char, as a one-char String.
-
getTypeStr
Get the name of the type as a string.- Returns:
- The name of the type, such as "int", "float", or "void".
-
getType
Get the type.- Returns:
- The class of the base type, such as int.class, float.class, or void.class.
-
addTypeAnnotation
protected void addTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Description copied from class:TypeSignatureAdd a type annotation to this type.- Specified by:
addTypeAnnotationin classTypeSignature- Parameters:
typePath- The type path.annotationInfo- The annotation to add.
-
getClassName
-
getClassInfo
-
findReferencedClassNames
Get the names of any classes referenced in the type signature.- Overrides:
findReferencedClassNamesin classTypeSignature- Parameters:
refdClassNames- the referenced class names.
-
hashCode
-
equals
-
equalsIgnoringTypeParams
Description copied from class:TypeSignatureCompare base types, ignoring generic type parameters.- Specified by:
equalsIgnoringTypeParamsin classTypeSignature- Parameters:
other- the otherTypeSignatureto compare to.- Returns:
- True if the two
TypeSignatureobjects are equal, ignoring type parameters.
-
toStringInternal
protected void toStringInternal(boolean useSimpleNames, AnnotationInfoList annotationsToExclude, StringBuilder buf) Description copied from class:HierarchicalTypeSignatureRender type signature to string.- Specified by:
toStringInternalin classHierarchicalTypeSignature- Parameters:
useSimpleNames- 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- theStringBuilderto write to.
-
toStringWithSimpleNames
Render to string, using only simple names for classes.- Returns:
- the string representation, using simple names for classes.
-
toString
-