JPrimitiveType (GWT Javadoc)

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.google.gwt.core.ext.typeinfo
Enum JPrimitiveType

    java.lang.Object
      java.lang.Enum<JPrimitiveType>
          com.google.gwt.core.ext.typeinfo.JPrimitiveType

All Implemented Interfaces:
  JType, java.io.Serializable, java.lang.Comparable<JPrimitiveType>

    public enum JPrimitiveType

extends java.lang.Enum<JPrimitiveType>
implements JType

Represents a primitive type in a declaration.

Enum Constant Summary
`BOOLEAN`
`BYTE`
`CHAR`
`DOUBLE`
`FLOAT`
`INT`
`LONG`
`SHORT`
`VOID`

Method Summary
`JType` | `getErasedType()` Returns this type with no type parameters or type variables.
`java.lang.String` | `getJNISignature()` Returns the "field descriptor" for a type as specified by the Java Virtual Machine Specification.
`JType` | `getLeafType()` For array types, recursively looks for the element type that is not an array.
`java.lang.String` | `getParameterizedQualifiedSourceName()` Returns a type name as it would be specified in Java source, with the package name included.
`java.lang.String` | `getQualifiedBinaryName()` A binary type name as specified by the Java Language Spec, ThirdEdition.
`java.lang.String` | `getQualifiedBoxedSourceName()`
`java.lang.String` | `getQualifiedSourceName()` Returns a type name as it would be specified in Java source, with the package name included.
`java.lang.String` | `getSimpleSourceName()` Returns the name of this class without the package name or enclosing class name.
`java.lang.String` | `getUninitializedFieldExpression()`
`JAnnotationType` | `isAnnotation()` Returns this instance as a `JAnnotationType` if it is an annotation or `null` if it is not.
`JArrayType` | `isArray()`
`JClassType` | `isClass()` Returns this instance if the erased version of this type is a class (as opposed to a primitive, array, or interface) or `null` if it is not.
`JClassType` | `isClassOrInterface()` Returns this instance if the erased version of this type is a class or interface (as opposed to a primitive or array array) or `null` if it is not.
`JEnumType` | `isEnum()` Returns this instance if it is an enumeration or `null` if it is not.
`JGenericType` | `isGenericType()` Returns this instance if it is a real class that has type parameters or `null` if it is not.
`JClassType` | `isInterface()` Returns this instance if it is an interface or `null` if it is not.
`JParameterizedType` | `isParameterized()` Returns this instance as a `JParameterizedType` if it is a parameterized type or `null` if it is not.
`JPrimitiveType` | `isPrimitive()`
`JRawType` | `isRawType()` Returns the raw type if this is a `JRawType`, otherwise returns `null`.
`JTypeParameter` | `isTypeParameter()`
`JWildcardType` | `isWildcard()`
`static JPrimitiveType` | `parse(java.lang.String name)`
`java.lang.String` | `toString()`
`static JPrimitiveType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static JPrimitiveType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### BOOLEAN

    public static final JPrimitiveType BOOLEAN

### BYTE

    public static final JPrimitiveType BYTE

### CHAR

    public static final JPrimitiveType CHAR

### DOUBLE

    public static final JPrimitiveType DOUBLE

### FLOAT

    public static final JPrimitiveType FLOAT

### INT

    public static final JPrimitiveType INT

### LONG

    public static final JPrimitiveType LONG

### SHORT

    public static final JPrimitiveType SHORT

### VOID

    public static final JPrimitiveType VOID

Method Detail

### values

    public static JPrimitiveType[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (JPrimitiveType c : JPrimitiveType.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static JPrimitiveType valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
    `java.lang.NullPointerException` - if the argument is null

### parse

    public static JPrimitiveType parse(java.lang.String name)

### getErasedType

    public JType getErasedType()

  Description copied from interface: `JType`
  Returns this type with no type parameters or type variables. See the JLS Third Edition section on Type Erasure.

  Specified by:
    `getErasedType` in interface `JType`

### getJNISignature

    public java.lang.String getJNISignature()

  Description copied from interface: `JType`
  Returns the "field descriptor" for a type as specified by the Java Virtual Machine Specification. Examples:
  - boolean = `Z`
  - byte[] = `[B`
  - java.lang.String = `Ljava/lang/String;`

  Specified by:
    `getJNISignature` in interface `JType`

### getLeafType

    public JType getLeafType()

  Description copied from interface: `JType`
  For array types, recursively looks for the element type that is not an array. Otherwise, returns this type.

  Specified by:
    `getLeafType` in interface `JType`

### getParameterizedQualifiedSourceName

    public java.lang.String getParameterizedQualifiedSourceName()

  Description copied from interface: `JType`
  Returns a type name as it would be specified in Java source, with the package name included. Includes the type parameters. If called on a type parameter, does not include any bounds. For example, a type Foo declared in com.example would be given as "com.example.Foo", while the same type instantiated with Baz would be "com.example.Foo".

  Specified by:
    `getParameterizedQualifiedSourceName` in interface `JType`

### getQualifiedBinaryName

    public java.lang.String getQualifiedBinaryName()

  Description copied from interface: `JType`
  A binary type name as specified by the Java Language Spec, ThirdEdition.

  Specified by:
    `getQualifiedBinaryName` in interface `JType`

### getQualifiedBoxedSourceName

    public java.lang.String getQualifiedBoxedSourceName()

### getQualifiedSourceName

    public java.lang.String getQualifiedSourceName()

  Description copied from interface: `JType`
  Returns a type name as it would be specified in Java source, with the package name included. Does not include the type parameters. If called on a type parameter, includes any bounds.

  Specified by:
    `getQualifiedSourceName` in interface `JType`

### getSimpleSourceName

    public java.lang.String getSimpleSourceName()

  Description copied from interface: `JType`
  Returns the name of this class without the package name or enclosing class name.

  Specified by:
    `getSimpleSourceName` in interface `JType`

### getUninitializedFieldExpression

    public java.lang.String getUninitializedFieldExpression()

### isAnnotation

    public JAnnotationType isAnnotation()

  Description copied from interface: `JType`
  Returns this instance as a `JAnnotationType` if it is an annotation or `null` if it is not.

  Specified by:
    `isAnnotation` in interface `JType`

### isArray

    public JArrayType isArray()

  Specified by:
    `isArray` in interface `JType`

### isClass

    public JClassType isClass()

  Description copied from interface: `JType`
  Returns this instance if the erased version of this type is a class (as opposed to a primitive, array, or interface) or `null` if it is not.

  Specified by:
    `isClass` in interface `JType`

### isClassOrInterface

    public JClassType isClassOrInterface()

  Description copied from interface: `JType`
  Returns this instance if the erased version of this type is a class or interface (as opposed to a primitive or array array) or `null` if it is not.

  Specified by:
    `isClassOrInterface` in interface `JType`

### isEnum

    public JEnumType isEnum()

  Description copied from interface: `JType`
  Returns this instance if it is an enumeration or `null` if it is not.

  Specified by:
    `isEnum` in interface `JType`

### isGenericType

    public JGenericType isGenericType()

  Description copied from interface: `JType`
  Returns this instance if it is a real class that has type parameters or `null` if it is not.

  Specified by:
    `isGenericType` in interface `JType`

### isInterface

    public JClassType isInterface()

  Description copied from interface: `JType`
  Returns this instance if it is an interface or `null` if it is not.

  Specified by:
    `isInterface` in interface `JType`

### isParameterized

    public JParameterizedType isParameterized()

  Description copied from interface: `JType`
  Returns this instance as a `JParameterizedType` if it is a parameterized type or `null` if it is not.

  Specified by:
    `isParameterized` in interface `JType`

### isPrimitive

    public JPrimitiveType isPrimitive()

  Specified by:
    `isPrimitive` in interface `JType`

### isRawType

    public JRawType isRawType()

  Description copied from interface: `JType`
  Returns the raw type if this is a `JRawType`, otherwise returns `null`.

  Specified by:
    `isRawType` in interface `JType`

### isTypeParameter

    public JTypeParameter isTypeParameter()

  Specified by:
    `isTypeParameter` in interface `JType`

### isWildcard

    public JWildcardType isWildcard()

  Specified by:
    `isWildcard` in interface `JType`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Enum<JPrimitiveType>`

Overview | Package | Class | Use | Deprecated | Help
| GWT 2.7.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD