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
public abstract class HierarchicalTypeSignature extends ScanResultObject
A Java type signature. Subclasses are ClassTypeSignature, MethodTypeSignature, and TypeSignature.
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotationInfoListtypeAnnotationInfo-
Fields inherited from class io.github.classgraph.ScanResultObject
classRef, scanResult
-
-
Constructor Summary
Constructors Constructor Description HierarchicalTypeSignature()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddTypeAnnotation(AnnotationInfo annotationInfo)Add a type annotation.protected abstract voidaddTypeAnnotation(java.util.List<Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo)Add a type annotation.AnnotationInfoListgetTypeAnnotationInfo()Get a list ofAnnotationInfoobjects for any type annotations on this type, or null if none.(package private) voidsetScanResult(ScanResult scanResult)Set ScanResult backreferences in info objects after scan has completed.protected voidtoString(boolean useSimpleNames, java.lang.StringBuilder buf)Render type signature to string.protected abstract voidtoStringInternal(boolean useSimpleNames, AnnotationInfoList annotationsToExclude, java.lang.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 Detail
-
typeAnnotationInfo
protected AnnotationInfoList typeAnnotationInfo
-
-
Method Detail
-
addTypeAnnotation
protected void addTypeAnnotation(AnnotationInfo annotationInfo)
Add a type annotation.- Parameters:
annotationInfo- the annotation
-
setScanResult
void setScanResult(ScanResult scanResult)
Description copied from class:ScanResultObjectSet ScanResult backreferences in info objects after scan has completed.- Overrides:
setScanResultin classScanResultObject- Parameters:
scanResult- the scan result
-
getTypeAnnotationInfo
public AnnotationInfoList 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(java.util.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, java.lang.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
protected void toString(boolean useSimpleNames, java.lang.StringBuilder buf)Render type signature to string.- Specified by:
toStringin classScanResultObject- Parameters:
useSimpleNames- whether to use simple names for classes.buf- theStringBuilderto write to.
-
-