Top Description Fields Constructors Methods
io.github.classgraph

public abstract Class TypeSignature

extends HierarchicalTypeSignature
Class Inheritance
Known Direct Subclasses
io.github.classgraph.BaseTypeSignature, io.github.classgraph.ReferenceTypeSignature
Imports
java.util.HashSet, .List, .Map, .Set, io.github.classgraph.Classfile.TypePathNode, nonapi.io.github.classgraph.types.ParseException, .Parser, nonapi.io.github.classgraph.utils.LogNode

A type signature for a reference type or base type. Subclasses are ReferenceTypeSignature (whose own subclasses are ClassRefTypeSignature, TypeVariableSignature, and ArrayTypeSignature), and BaseTypeSignature.

Field Summary

Inherited from io.github.classgraph.HierarchicalTypeSignature:
typeAnnotationInfo

Constructor Summary

AccessConstructor and Description
protected
TypeSignature()

Constructor.

Method Summary

Modifier and TypeMethod and Description
protected abstract void
addTypeAnnotation(List<Classfile.TypePathNode>
The type path.
typePath
,
AnnotationInfo
The annotation to add.
annotationInfo
)

Implements abstract io.github.classgraph.HierarchicalTypeSignature.addTypeAnnotation.

Add a type annotation to this type.

public abstract boolean

Returns:

True if the two TypeSignature objects are equal, ignoring type parameters.
equalsIgnoringTypeParams
(final TypeSignature
the other TypeSignature to compare to.
other
)

Compare base types, ignoring generic type parameters.

protected final void
findReferencedClassInfo(final Map<String, ClassInfo>
the map from class name to ClassInfo.
classNameToClassInfo
,
final Set<ClassInfo>
the referenced class info.
refdClassInfo
,
final LogNode
the log
log
)

Overrides io.github.classgraph.ScanResultObject.findReferencedClassInfo.

Get ClassInfo objects for any classes referenced in the type signature.

protected void
findReferencedClassNames(final Set<String>
the referenced class names.
refdClassNames
)

Get the names of any classes referenced in the type signature.

public AnnotationInfoList

Returns:

a list of AnnotationInfo objects for any type annotations on this type, or null if none.
getTypeAnnotationInfo
()

Overrides io.github.classgraph.HierarchicalTypeSignature.getTypeAnnotationInfo.

Get a list of AnnotationInfo objects for any type annotations on this type, or null if none.

pack-priv static TypeSignature

Returns:

The parsed type descriptor or type signature.
parse
(final Parser
The parser
parser
,
final String
The class containing the type descriptor.
definingClass
)

Parse a type signature.

pack-priv static TypeSignature

Returns:

The parsed type descriptor or type signature.
parse
(final String
The type descriptor or type signature to parse.
typeDescriptor
,
final String
The class containing the type descriptor.
definingClass
)

Parse a type signature.

Inherited from io.github.classgraph.HierarchicalTypeSignature:
addTypeAnnotationsetScanResulttoStringtoStringInternal

Constructor Detail

TypeSignatureback to summary
protected TypeSignature()

Constructor.

Method Detail

addTypeAnnotationback to summary
protected abstract void addTypeAnnotation(List<Classfile.TypePathNode> typePath, AnnotationInfo annotationInfo)

Implements abstract io.github.classgraph.HierarchicalTypeSignature.addTypeAnnotation.

Add a type annotation to this type.

Parameters
typePath:List<Classfile.TypePathNode>

The type path.

annotationInfo:AnnotationInfo

The annotation to add.

Annotations
@Override
equalsIgnoringTypeParamsback to summary
public abstract boolean equalsIgnoringTypeParams(final TypeSignature other)

Compare base types, ignoring generic type parameters.

Parameters
other:TypeSignature

the other TypeSignature to compare to.

Returns:boolean

True if the two TypeSignature objects are equal, ignoring type parameters.

findReferencedClassInfoback to summary
protected final void findReferencedClassInfo(final Map<String, ClassInfo> classNameToClassInfo, final Set<ClassInfo> refdClassInfo, final LogNode log)

Overrides io.github.classgraph.ScanResultObject.findReferencedClassInfo.

Get ClassInfo objects for any classes referenced in the type signature.

Parameters
classNameToClassInfo:Map<String, ClassInfo>

the map from class name to ClassInfo.

refdClassInfo:Set<ClassInfo>

the referenced class info.

log:LogNode

Doc from io.github.classgraph.ScanResultObject.findReferencedClassInfo.

the log

Annotations
@Override
findReferencedClassNamesback to summary
protected void findReferencedClassNames(final Set<String> refdClassNames)

Get the names of any classes referenced in the type signature.

Parameters
refdClassNames:Set<String>

the referenced class names.

getTypeAnnotationInfoback to summary
public AnnotationInfoList getTypeAnnotationInfo()

Overrides io.github.classgraph.HierarchicalTypeSignature.getTypeAnnotationInfo.

Get a list of AnnotationInfo objects for any type annotations on this type, or null if none.

Returns:AnnotationInfoList

a list of AnnotationInfo objects for any type annotations on this type, or null if none.

parseback to summary
pack-priv static TypeSignature parse(final Parser parser, final String definingClass) throws ParseException

Parse a type signature.

Parameters
parser:Parser

The parser

definingClass:String

The class containing the type descriptor.

Returns:TypeSignature

The parsed type descriptor or type signature.

Exceptions
ParseException:
If the type signature could not be parsed.
parseback to summary
pack-priv static TypeSignature parse(final String typeDescriptor, final String definingClass) throws ParseException

Parse a type signature.

Parameters
typeDescriptor:String

The type descriptor or type signature to parse.

definingClass:String

The class containing the type descriptor.

Returns:TypeSignature

The parsed type descriptor or type signature.

Exceptions
ParseException:
If the type signature could not be parsed.