Class MethodTypeSignature
java.lang.Object
io.github.classgraph.HierarchicalTypeSignature
io.github.classgraph.MethodTypeSignature
A method type signature (called "MethodSignature" in the classfile documentation).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Class<?> The class ref, once the class is loaded.protected ScanResultThe scan result.Fields inherited from class HierarchicalTypeSignature
typeAnnotationInfo -
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 in the type descriptor or type signature.protected voidfindReferencedClassNames(Set<String> refdClassNames) Get the names of any classes referenced in the type signature.protected ClassInfoprotected StringThe name of the class (used byScanResultObject.getClassInfo()to fetch theClassInfoobject for the class).Get type annotations on the explicit receiver parameter, or null if none.Get the result type for the method.Get the throws type(s) for the method.Get the type parameters for the method, if this is a generic method.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.
-
-
Method Details
-
getTypeParameters
Get the type parameters for the method, if this is a generic method.- Returns:
- The type parameters for the method, if any, otherwise null.
-
getResultType
Get the result type for the method.- Returns:
- The result type for the method, as a
TypeSignatureparsed type object.
-
getThrowsSignatures
Get the throws type(s) for the method.- Returns:
- The throws types for the method, as
TypeSignatureparsed type objects.
-
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
-
getReceiverTypeAnnotationInfo
Get type annotations on the explicit receiver parameter, or null if none.- Returns:
- type annotations on the explicit receiver parameter, or null if none.
-
getClassName
-
getClassInfo
-
findReferencedClassNames
-
findReferencedClassInfo
protected void findReferencedClassInfo(Map<String, ClassInfo> classNameToClassInfo, Set<ClassInfo> refdClassInfo, nonapi.io.github.classgraph.utils.LogNode log) GetClassInfoobjects for any classes referenced in the type descriptor or type signature.- Parameters:
classNameToClassInfo- the map from class name toClassInfo.refdClassInfo- the referenced class infolog- the log
-
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.
-
toStringWithSimpleNames
Render to string, using only simple names for classes.- Returns:
- the string representation, using simple names for classes.
-
toString
-