Class BaseTypeSignature


  • public class BaseTypeSignature
    extends TypeSignature
    A type signature for a base type (byte, char, double, float, int, long, short, boolean, or void).
    • 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".
      • getTypeSignatureChar

        public java.lang.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 java.lang.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​(java.lang.String typeName)
        Get the BaseTypeSignature 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.
      • getClassName

        protected java.lang.String getClassName()
        The name of the class (used by getClassInfo() to fetch the ClassInfo object for the class).
        Returns:
        The class name.
      • getClassInfo

        protected ClassInfo getClassInfo()
      • findReferencedClassNames

        protected void findReferencedClassNames​(java.util.Set<java.lang.String> refdClassNames)
        Get the names of any classes referenced in the type signature.
        Overrides:
        findReferencedClassNames in class TypeSignature
        Parameters:
        refdClassNames - the referenced class names.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • 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 class TypeSignature
        Parameters:
        useSimpleNames - whether or not to use simple names for classes.
        Returns:
        the string representation of the type signature, with package names stripped.