Class JType

    • Constructor Summary

      Constructors 
      Constructor Description
      JType​(java.lang.String name)
      Creates a new JType with the given name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLocalName()
      Returns the unqualified Java type name (i.e.
      java.lang.String getName()
      Returns the qualified Java type name.
      boolean isArray()
      Returns true if this type represents an Array.
      boolean isPrimitive()
      Returns true if this type represents a Java primitive type.
      protected void setName​(java.lang.String name)
      Sets the qualified name of this type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BOOLEAN

        public static final JPrimitiveType BOOLEAN
        JType for a boolean (Boolean).
      • BYTE

        public static final JPrimitiveType BYTE
        JType instance for a byte (Byte).
      • CHAR

        public static final JPrimitiveType CHAR
        JType instance for a char (Char).
      • DOUBLE

        public static final JPrimitiveType DOUBLE
        JType instance for a double (Double).
      • FLOAT

        public static final JPrimitiveType FLOAT
        JType instance for a float (Float).
      • INT

        public static final JPrimitiveType INT
        JType instance for a int (Integer).
      • LONG

        public static final JPrimitiveType LONG
        JType instance for a long (Long).
      • SHORT

        public static final JPrimitiveType SHORT
        JType instance for a short (Short).
    • Constructor Detail

      • JType

        public JType​(java.lang.String name)
        Creates a new JType with the given name.
        Parameters:
        name - The name of the type.
    • Method Detail

      • getLocalName

        public final java.lang.String getLocalName()
        Returns the unqualified Java type name (i.e. without package).
        Returns:
        The unqualified Java type name.
      • getName

        public final java.lang.String getName()
        Returns the qualified Java type name.
        Returns:
        The qualified Java type name.
      • isArray

        public final boolean isArray()
        Returns true if this type represents an Array.
        Returns:
        True if this type represents an Array.
      • isPrimitive

        public final boolean isPrimitive()
        Returns true if this type represents a Java primitive type.
        Returns:
        True if this type represents a Java primitive type.
      • setName

        protected void setName​(java.lang.String name)
        Sets the qualified name of this type.
        Parameters:
        name - the (qualified) name of the type