Class TypeParameter
java.lang.Object
io.github.classgraph.HierarchicalTypeSignature
io.github.classgraph.TypeParameter
A type parameter.
-
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
ConstructorsModifierConstructorDescriptionprotectedTypeParameter(String identifier, ReferenceTypeSignature classBound, List<ReferenceTypeSignature> interfaceBounds) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Add a type annotation.booleanprotected voidfindReferencedClassInfo(Map<String, ClassInfo> classNameToClassInfo, Set<ClassInfo> refdClassInfo, nonapi.io.github.classgraph.utils.LogNode log) GetClassInfoobjects for any classes referenced by this object.protected voidfindReferencedClassNames(Set<String> refdClassNames) Get the names of any classes referenced in the type signature.Get the type parameter class bound.protected ClassInfoprotected StringThe name of the class (used byScanResultObject.getClassInfo()to fetch theClassInfoobject for the class).Get the type parameter interface bound(s).getName()Get the type parameter identifier.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 HierarchicalTypeSignature
addTypeAnnotation, getTypeAnnotationInfo, toString
-
Field Details
-
scanResult
The scan result. -
classRef
The class ref, once the class is loaded.
-
-
Constructor Details
-
TypeParameter
protected TypeParameter(String identifier, ReferenceTypeSignature classBound, List<ReferenceTypeSignature> interfaceBounds) Constructor.- Parameters:
identifier- The type parameter identifier.classBound- The type parameter class bound.interfaceBounds- The type parameter interface bound.
-
-
Method Details
-
getName
-
getClassBound
Get the type parameter class bound.- Returns:
- The type parameter class bound. May be null.
-
getInterfaceBounds
Get the type parameter interface bound(s).- Returns:
- Get the type parameter interface bound(s), which may be the empty list.
-
addTypeAnnotation
protected void addTypeAnnotation(List<io.github.classgraph.Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo) Description copied from class:HierarchicalTypeSignatureAdd a type annotation.- Specified by:
addTypeAnnotationin classHierarchicalTypeSignature- Parameters:
typePath- the type pathannotationInfo- the annotation
-
getClassName
-
getClassInfo
-
findReferencedClassNames
-
hashCode
-
equals
-
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.
-
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
-
toStringWithSimpleNames
Render to string, using only simple names for classes.- Returns:
- the string representation, using simple names for classes.
-
toString
-