Package com.google.gwt.core.ext.typeinfo
Enum JPrimitiveType
- All Implemented Interfaces:
JType,Serializable,Comparable<JPrimitiveType>,java.lang.constant.Constable
Represents a primitive type in a declaration.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns this type with no type parameters or type variables.Returns the "field descriptor" for a type as specified by the Java Virtual Machine Specification.For array types, recursively looks for the element type that is not an array.Returns a type name as it would be specified in Java source, with the package name included.A binary type name as specified by the Java Language Spec, ThirdEdition.Returns a type name as it would be specified in Java source, with the package name included.Returns the name of this class without the package name or enclosing class name.Returns this instance as aJAnnotationTypeif it is an annotation ornullif it is not.isArray()isClass()Returns this instance if the erased version of this type is a class (as opposed to a primitive, array, or interface) ornullif it is not.Returns this instance if the erased version of this type is a class or interface (as opposed to a primitive or array array) ornullif it is not.isEnum()Returns this instance if it is an enumeration ornullif it is not.Returns this instance if it is a real class that has type parameters ornullif it is not.Returns this instance if it is an interface ornullif it is not.Returns this instance as aJParameterizedTypeif it is a parameterized type ornullif it is not.Returns the raw type if this is aJRawType, otherwise returnsnull.static JPrimitiveTypetoString()static JPrimitiveTypeReturns 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.
-
Enum Constant Details
-
BOOLEAN
-
BYTE
-
CHAR
-
DOUBLE
-
FLOAT
-
INT
-
LONG
-
SHORT
-
VOID
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
parse
-
getErasedType
Description copied from interface:JTypeReturns this type with no type parameters or type variables. See the JLS Third Edition section on Type Erasure.- Specified by:
getErasedTypein interfaceJType
-
getJNISignature
Description copied from interface:JTypeReturns 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:
getJNISignaturein interfaceJType
- boolean =
-
getLeafType
Description copied from interface:JTypeFor array types, recursively looks for the element type that is not an array. Otherwise, returns this type.- Specified by:
getLeafTypein interfaceJType
-
getParameterizedQualifiedSourceName
Description copied from interface:JTypeReturns 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 Foodeclared in com.example would be given as "com.example.Foo ", while the same type instantiated with Baz would be "com.example.Foo<com.example.Baz>". - Specified by:
getParameterizedQualifiedSourceNamein interfaceJType
-
getQualifiedBinaryName
Description copied from interface:JTypeA binary type name as specified by the Java Language Spec, ThirdEdition.- Specified by:
getQualifiedBinaryNamein interfaceJType
-
getQualifiedBoxedSourceName
-
getQualifiedSourceName
Description copied from interface:JTypeReturns 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:
getQualifiedSourceNamein interfaceJType
-
getSimpleSourceName
Description copied from interface:JTypeReturns the name of this class without the package name or enclosing class name.- Specified by:
getSimpleSourceNamein interfaceJType
-
getUninitializedFieldExpression
-
isAnnotation
Description copied from interface:JTypeReturns this instance as aJAnnotationTypeif it is an annotation ornullif it is not.- Specified by:
isAnnotationin interfaceJType
-
isArray
-
isClass
Description copied from interface:JTypeReturns this instance if the erased version of this type is a class (as opposed to a primitive, array, or interface) ornullif it is not. -
isClassOrInterface
Description copied from interface:JTypeReturns this instance if the erased version of this type is a class or interface (as opposed to a primitive or array array) ornullif it is not.- Specified by:
isClassOrInterfacein interfaceJType
-
isEnum
Description copied from interface:JTypeReturns this instance if it is an enumeration ornullif it is not. -
isGenericType
Description copied from interface:JTypeReturns this instance if it is a real class that has type parameters ornullif it is not.- Specified by:
isGenericTypein interfaceJType
-
isInterface
Description copied from interface:JTypeReturns this instance if it is an interface ornullif it is not.- Specified by:
isInterfacein interfaceJType
-
isParameterized
Description copied from interface:JTypeReturns this instance as aJParameterizedTypeif it is a parameterized type ornullif it is not.- Specified by:
isParameterizedin interfaceJType
-
isPrimitive
- Specified by:
isPrimitivein interfaceJType
-
isRawType
Description copied from interface:JTypeReturns the raw type if this is aJRawType, otherwise returnsnull. -
isTypeParameter
- Specified by:
isTypeParameterin interfaceJType
-
isWildcard
- Specified by:
isWildcardin interfaceJType
-
toString
- Overrides:
toStringin classEnum<JPrimitiveType>
-