public class JType extends Object
Modifier and Type | Field and Description |
---|---|
static JPrimitiveType |
BOOLEAN
JType for a boolean (Boolean).
|
static JPrimitiveType |
BYTE
JType instance for a byte (Byte).
|
static JPrimitiveType |
CHAR
JType instance for a char (Char).
|
static JPrimitiveType |
DOUBLE
JType instance for a double (Double).
|
static JPrimitiveType |
FLOAT
JType instance for a float (Float).
|
static JPrimitiveType |
INT
JType instance for a int (Integer).
|
static JPrimitiveType |
LONG
JType instance for a long (Long).
|
static JPrimitiveType |
SHORT
JType instance for a short (Short).
|
Constructor and Description |
---|
JType(String name)
Creates a new JType with the given name.
|
Modifier and Type | Method and Description |
---|---|
String |
getLocalName()
Returns the unqualified Java type name (i.e.
|
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(String name)
Sets the qualified name of this type.
|
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 JType(String name)
name
- The name of the type.public final String getLocalName()
public final String getName()
public final boolean isArray()
public final boolean isPrimitive()
protected void setName(String name)
name
- the (qualified) name of the typeCopyright © 2018. All rights reserved.