Class TypeSignature
java.lang.Object
io.github.classgraph.HierarchicalTypeSignature
io.github.classgraph.TypeSignature
- Direct Known Subclasses:
BaseTypeSignature, ReferenceTypeSignature
A type signature for a reference type or base type. Subclasses are
ReferenceTypeSignature (whose own
subclasses are ClassRefTypeSignature, TypeVariableSignature, and ArrayTypeSignature), and
BaseTypeSignature.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?> The class ref, once the class is loaded.protected ScanResultThe scan result.Fields inherited from class HierarchicalTypeSignature
typeAnnotationInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation to this type.abstract booleanCompare base types, ignoring generic type parameters.protected final voidfindReferencedClassInfo(Map<String, ClassInfo> classNameToClassInfo, Set<ClassInfo> refdClassInfo, nonapi.io.github.classgraph.utils.LogNode log) GetClassInfoobjects for any classes referenced in the type signature.protected voidfindReferencedClassNames(Set<String> refdClassNames) Get the names of any classes referenced in the type signature.protected abstract StringThe name of the class (used byScanResultObject.getClassInfo()to fetch theClassInfoobject for the class).Get a list ofAnnotationInfoobjects for any type annotations on this type, or null if none.toString()Render to string.Render to string, using only simple names for classes.Methods inherited from class HierarchicalTypeSignature
addTypeAnnotation, toString, toStringInternal
-
Field Details
-
scanResult
The scan result. -
classRef
The class ref, once the class is loaded.
-
-
Constructor Details
-
TypeSignature
protected TypeSignature()Constructor.
-
-
Method Details
-
findReferencedClassNames
-
findReferencedClassInfo
protected final void findReferencedClassInfo(Map<String, ClassInfo> classNameToClassInfo, Set<ClassInfo> refdClassInfo, nonapi.io.github.classgraph.utils.LogNode log) GetClassInfoobjects for any classes referenced in the type signature.- Parameters:
classNameToClassInfo- the map from class name toClassInfo.refdClassInfo- the referenced class info.log- the log
-
getTypeAnnotationInfo
Get a list ofAnnotationInfoobjects for any type annotations on this type, or null if none.- Overrides:
getTypeAnnotationInfoin classHierarchicalTypeSignature- Returns:
- a list of
AnnotationInfoobjects for any type annotations on this type, or null if none.
-
equalsIgnoringTypeParams
Compare base types, ignoring generic type parameters.- Parameters:
other- the otherTypeSignatureto compare to.- Returns:
- True if the two
TypeSignatureobjects are equal, ignoring type parameters.
-
addTypeAnnotation
protected abstract void addTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation to this type.- Specified by:
addTypeAnnotationin classHierarchicalTypeSignature- Parameters:
typePath- The type path.annotationInfo- The annotation to add.
-
getClassName
-
toStringWithSimpleNames
Render to string, using only simple names for classes.- Returns:
- the string representation, using simple names for classes.
-
toString
-