public enum JPrimitiveType extends java.lang.Enum<JPrimitiveType> implements JType
| Enum Constant and Description |
|---|
BOOLEAN |
BYTE |
CHAR |
DOUBLE |
FLOAT |
INT |
LONG |
SHORT |
VOID |
| Modifier and Type | Method and Description |
|---|---|
JType |
getErasedType()
Returns this type with no type parameters or type variables.
|
java.lang.String |
getJNISignature()
Returns the turns 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() |
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() |
JClassType |
isClassOrInterface() |
JEnumType |
isEnum()
Returns this instance if it is an enumeration or
null if it is
not. |
JGenericType |
isGenericType() |
JClassType |
isInterface() |
JParameterizedType |
isParameterized() |
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.
|
public static final JPrimitiveType BOOLEAN
public static final JPrimitiveType BYTE
public static final JPrimitiveType CHAR
public static final JPrimitiveType DOUBLE
public static final JPrimitiveType FLOAT
public static final JPrimitiveType INT
public static final JPrimitiveType LONG
public static final JPrimitiveType SHORT
public static final JPrimitiveType VOID
public static JPrimitiveType[] values()
for (JPrimitiveType c : JPrimitiveType.values()) System.out.println(c);
public static JPrimitiveType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namejava.lang.NullPointerException - if the argument is nullpublic static JPrimitiveType parse(java.lang.String name)
public JType getErasedType()
JTypegetErasedType in interface JTypepublic java.lang.String getJNISignature()
JTypeZ[BLjava/lang/String;getJNISignature in interface JTypepublic JType getLeafType()
JTypegetLeafType in interface JTypepublic java.lang.String getParameterizedQualifiedSourceName()
getParameterizedQualifiedSourceName in interface JTypepublic java.lang.String getQualifiedBinaryName()
JTypegetQualifiedBinaryName in interface JTypepublic java.lang.String getQualifiedBoxedSourceName()
public java.lang.String getQualifiedSourceName()
JTypegetQualifiedSourceName in interface JTypepublic java.lang.String getSimpleSourceName()
JTypegetSimpleSourceName in interface JTypepublic java.lang.String getUninitializedFieldExpression()
public JAnnotationType isAnnotation()
JTypeJAnnotationType if it is an annotation
or null if it is not.isAnnotation in interface JTypepublic JArrayType isArray()
public JClassType isClass()
public JClassType isClassOrInterface()
isClassOrInterface in interface JTypepublic JEnumType isEnum()
JTypenull if it is
not.public JGenericType isGenericType()
isGenericType in interface JTypepublic JClassType isInterface()
isInterface in interface JTypepublic JParameterizedType isParameterized()
isParameterized in interface JTypepublic JPrimitiveType isPrimitive()
isPrimitive in interface JTypepublic JRawType isRawType()
JTypeJRawType, otherwise returns
null.public JTypeParameter isTypeParameter()
isTypeParameter in interface JTypepublic JWildcardType isWildcard()
isWildcard in interface JTypepublic java.lang.String toString()
toString in class java.lang.Enum<JPrimitiveType>