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
Modifier and Type Method Description booleanequals(Object obj)booleanequalsIgnoringTypeParams(TypeSignature other)Compare base types, ignoring generic type parameters.Class<?>getType()Get the type.static BaseTypeSignaturegetTypeSignature(String typeName)Get theBaseTypeSignaturefor a given type name.StringgetTypeSignatureChar()Get the type signature char used to represent the type, e.g.StringgetTypeStr()Get the type as a string.inthashCode()
-
Method Details
-
getTypeStr
Get the type as a string.- Returns:
- The base type, such as "int", "float", or "void".
-
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
Get the type.- Returns:
- The class of the base type, such as int.class, float.class, or void.class.
-
getTypeSignature
Get theBaseTypeSignaturefor a given type name.- Parameters:
typeName- the name of the type.- Returns:
- The
BaseTypeSignatureof the named base type, or null if typeName is not a base type.
-
hashCode
public int hashCode() -
equals
-
equalsIgnoringTypeParams
Description copied from class:TypeSignatureCompare base types, ignoring generic type parameters.- Specified by:
equalsIgnoringTypeParamsin classTypeSignature- Parameters:
other- the otherTypeSignatureto compare to.- Returns:
- True if the two
TypeSignatureobjects are equal, ignoring type parameters.
-