public class JType
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private JType |
_componentType
used for array types
|
private boolean |
_isArray |
static JType |
BOOLEAN |
static JType |
BYTE |
static JType |
CHAR |
static JType |
DOUBLE |
static JType |
FLOAT |
static JType |
INT |
static JType |
LONG |
private java.lang.String |
name |
static JType |
SHORT |
Constructor and Description |
---|
JType(java.lang.String name)
Creates a new JType with the given name
|
Modifier and Type | Method and Description |
---|---|
protected void |
changePackage(java.lang.String newPackage)
Allows subtypes, such as JClass to alter the package to which
this JType belongs
|
JType |
createArray()
Deprecated.
removed in javasource 1.3rc1, replaced by JArrayType
|
JType |
getComponentType()
If this JType is an array this method will returns the component type
of the array, otherwise null will be returned.
|
java.lang.String |
getLocalName() |
java.lang.String |
getName() |
boolean |
isArray()
Checks to see if this JType represents an array.
|
boolean |
isPrimitive()
Checks to see if this JType represents a primitive
|
java.lang.String |
toString()
Returns the String representation of this JType, which is
simply the name of this type.
|
public static final JType BOOLEAN
public static final JType BYTE
public static final JType CHAR
public static final JType DOUBLE
public static final JType FLOAT
public static final JType INT
public static final JType LONG
public static final JType SHORT
private java.lang.String name
private boolean _isArray
private JType _componentType
public JType(java.lang.String name)
name
- the name of the typepublic final JType createArray()
public JType getComponentType()
public java.lang.String getLocalName()
public java.lang.String getName()
public final boolean isArray()
public boolean isPrimitive()
public java.lang.String toString()
toString
in class java.lang.Object
protected void changePackage(java.lang.String newPackage)
newPackage
- the new package to which this JType belongs