Package io.github.classgraph
Class BaseTypeSignature
- java.lang.Object
-
- io.github.classgraph.HierarchicalTypeSignature
-
- io.github.classgraph.TypeSignature
-
- io.github.classgraph.BaseTypeSignature
-
public class BaseTypeSignature extends TypeSignature
A type signature for a base type (byte, char, double, float, int, long, short, boolean, or void).
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>
classRef
The class ref, once the class is loaded.protected ScanResult
scanResult
The scan result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
equalsIgnoringTypeParams(TypeSignature other)
Compare base types, ignoring generic type parameters.protected ClassInfo
getClassInfo()
protected java.lang.String
getClassName()
The name of the class (used bygetClassInfo()
to fetch theClassInfo
object for the class).java.lang.Class<?>
getType()
Get the type.java.lang.String
getTypeStr()
Get the type as a string.int
hashCode()
protected java.lang.String
toStringInternal(boolean useSimpleNames)
TypeSignature.toString()
method, possibly returning simple names for classes (i.e.-
Methods inherited from class io.github.classgraph.TypeSignature
toString, toStringWithSimpleNames
-
-
-
-
Field Detail
-
scanResult
protected transient ScanResult scanResult
The scan result.
-
classRef
protected transient java.lang.Class<?> classRef
The class ref, once the class is loaded.
-
-
Method Detail
-
getTypeStr
public java.lang.String getTypeStr()
Get the type as a string.- Returns:
- The base type, such as "int", "float", or "void".
-
getType
public java.lang.Class<?> getType()
Get the type.- Returns:
- The class of the base type, such as int.class, float.class, or void.class.
-
getClassName
protected java.lang.String getClassName()
The name of the class (used bygetClassInfo()
to fetch theClassInfo
object for the class).- Returns:
- The class name.
-
getClassInfo
protected ClassInfo getClassInfo()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
equalsIgnoringTypeParams
public boolean equalsIgnoringTypeParams(TypeSignature other)
Description copied from class:TypeSignature
Compare base types, ignoring generic type parameters.- Specified by:
equalsIgnoringTypeParams
in classTypeSignature
- Parameters:
other
- the otherTypeSignature
to compare to.- Returns:
- True if the two
TypeSignature
objects are equal, ignoring type parameters.
-
toStringInternal
protected java.lang.String toStringInternal(boolean useSimpleNames)
Description copied from class:TypeSignature
TypeSignature.toString()
method, possibly returning simple names for classes (i.e. if useSimpleNames is true, the package names of classes are stripped).- Specified by:
toStringInternal
in classTypeSignature
- Parameters:
useSimpleNames
- whether or not to use simple names for classes.- Returns:
- the string representation of the type signature, with package names stripped.
-
-