Class HierarchicalTypeSignature
java.lang.Object
io.github.classgraph.HierarchicalTypeSignature
- Direct Known Subclasses:
ClassTypeSignature, MethodTypeSignature, TypeArgument, TypeParameter, TypeSignature
A Java type signature. Subclasses are ClassTypeSignature, MethodTypeSignature, and TypeSignature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?> The class ref, once the class is loaded.protected ScanResultThe scan result.protected AnnotationInfoList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTypeAnnotation(AnnotationInfo annotationInfo) Add a type annotation.protected abstract voidaddTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation.protected voidfindReferencedClassInfo(Map<String, ClassInfo> classNameToClassInfo, Set<ClassInfo> refdClassInfo, nonapi.io.github.classgraph.utils.LogNode log) GetClassInfoobjects for any classes referenced by this object.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.protected voidtoString(boolean useSimpleNames, StringBuilder buf) Render type signature to string.protected abstract voidtoStringInternal(boolean useSimpleNames, AnnotationInfoList annotationsToExclude, StringBuilder buf) Render type signature to string.Render to string, using only simple names for classes.
-
Field Details
-
typeAnnotationInfo
-
scanResult
The scan result. -
classRef
The class ref, once the class is loaded.
-
-
Constructor Details
-
HierarchicalTypeSignature
public HierarchicalTypeSignature()
-
-
Method Details
-
addTypeAnnotation
Add a type annotation.- Parameters:
annotationInfo- the annotation
-
getTypeAnnotationInfo
Get a list ofAnnotationInfoobjects for any type annotations on this type, or null if none.- Returns:
- a list of
AnnotationInfoobjects for any type annotations on this type, or null if none.
-
addTypeAnnotation
protected abstract void addTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation.- Parameters:
typePath- the type pathannotationInfo- the annotation
-
toStringInternal
protected abstract void toStringInternal(boolean useSimpleNames, AnnotationInfoList annotationsToExclude, StringBuilder buf) Render type signature to string.- 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.
-
toString
Render type signature to string.- Parameters:
useSimpleNames- whether to use simple names for classes.buf- theStringBuilderto write to.
-
findReferencedClassInfo
protected void findReferencedClassInfo(Map<String, ClassInfo> classNameToClassInfo, Set<ClassInfo> refdClassInfo, nonapi.io.github.classgraph.utils.LogNode log) GetClassInfoobjects for any classes referenced by this object.- Parameters:
classNameToClassInfo- the map from class name toClassInfo.refdClassInfo- the referenced class infolog- the log
-
getClassName
-
toStringWithSimpleNames
Render to string, using only simple names for classes.- Returns:
- the string representation, using simple names for classes.
-
toString
-