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).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
boolean
equalsIgnoringTypeParams(TypeSignature other)
Compare base types, ignoring generic type parameters.Class<?>
getType()
Get the type.static BaseTypeSignature
getTypeSignature(String typeName)
Get theBaseTypeSignature
for a given type name.String
getTypeSignatureChar()
Get the type signature char used to represent the type, e.g.String
getTypeStr()
Get the type as a string.int
hashCode()
-
Methods inherited from class io.github.classgraph.TypeSignature
toString, toStringWithSimpleNames
-
-
-
-
Method Detail
-
getTypeStr
public String getTypeStr()
Get the type as a string.- Returns:
- The base type, such as "int", "float", or "void".
-
getTypeSignatureChar
public String getTypeSignatureChar()
Get the type signature char used to represent the type, e.g. "Z" for int.- Returns:
- the type signature char, as a one-char String.
-
getType
public Class<?> getType()
Get the type.- Returns:
- The class of the base type, such as int.class, float.class, or void.class.
-
getTypeSignature
public static BaseTypeSignature getTypeSignature(String typeName)
Get theBaseTypeSignature
for a given type name.- Parameters:
typeName
- the name of the type.- Returns:
- The
BaseTypeSignature
of the named base type, or null if typeName is not a base type.
-
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.
-
-