Package io.github.classgraph
Class HierarchicalTypeSignature
java.lang.Object
io.github.classgraph.ScanResultObject
io.github.classgraph.HierarchicalTypeSignature
- Direct Known Subclasses:
ClassTypeSignature
,MethodTypeSignature
,TypeArgument
,TypeParameter
,TypeSignature
A Java type signature. Subclasses are ClassTypeSignature, MethodTypeSignature, and TypeSignature.
-
Field Summary
FieldsFields inherited from class io.github.classgraph.ScanResultObject
classRef, scanResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTypeAnnotation
(AnnotationInfo annotationInfo) Add a type annotation.protected abstract void
addTypeAnnotation
(List<Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation.Get a list ofAnnotationInfo
objects for any type annotations on this type, or null if none.(package private) void
setScanResult
(ScanResult scanResult) Set ScanResult backreferences in info objects after scan has completed.protected void
toString
(boolean useSimpleNames, StringBuilder buf) Render type signature to string.protected abstract void
toStringInternal
(boolean useSimpleNames, AnnotationInfoList annotationsToExclude, StringBuilder buf) Render type signature to string.Methods inherited from class io.github.classgraph.ScanResultObject
findReferencedClassInfo, findReferencedClassInfo, getClassInfo, getClassName, loadClass, loadClass, loadClass, loadClass, toString, toString, toStringWithSimpleNames
-
Field Details
-
typeAnnotationInfo
-
-
Constructor Details
-
HierarchicalTypeSignature
public HierarchicalTypeSignature()
-
-
Method Details
-
addTypeAnnotation
Add a type annotation.- Parameters:
annotationInfo
- the annotation
-
setScanResult
Description copied from class:ScanResultObject
Set ScanResult backreferences in info objects after scan has completed.- Overrides:
setScanResult
in classScanResultObject
- Parameters:
scanResult
- the scan result
-
getTypeAnnotationInfo
Get a list ofAnnotationInfo
objects for any type annotations on this type, or null if none.- Returns:
- a list of
AnnotationInfo
objects for any type annotations on this type, or null if none.
-
addTypeAnnotation
protected abstract void addTypeAnnotation(List<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
- theStringBuilder
to write to.
-
toString
Render type signature to string.- Specified by:
toString
in classScanResultObject
- Parameters:
useSimpleNames
- whether to use simple names for classes.buf
- theStringBuilder
to write to.
-