org.exolab.javasource
Class JType
java.lang.Object
org.exolab.javasource.JType
public class JType
extends java.lang.Object
Represents a primitive or class type.
$Revision: 6324 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $static JType | BOOLEAN - JType for a boolean (Boolean).
|
static JType | BYTE - JType instance for a byte (Byte).
|
static JType | CHAR - JType instance for a char (Char).
|
static JType | DOUBLE - JType instance for a double (Double).
|
static JType | FLOAT - JType instance for a float (Float).
|
static JType | INT - JType instance for a int (Integer).
|
static JType | LONG - JType instance for a long (Long).
|
static JType | SHORT - JType instance for a short (Short).
|
JType(String name) - Creates a new JType with the given name.
|
protected void | changePackage(String newPackage) - Change the package this JType belongs to.
|
String | getLocalName() - Returns the unqualified Java type name (i.e.
|
String | getName() - Returns the qualified Java type name.
|
String | getWrapperName() - Return the name of the wrapper object for a primitive type, null for
non-primitive types.
|
boolean | isArray() - Returns true if this type represents an Array.
|
boolean | isPrimitive() - Checks to see if this JType represents a primitive type.
|
String | toString() - Returns the String representation of this JType, which is simply the name
of this type.
|
BOOLEAN
public static final JType BOOLEAN
JType for a boolean (Boolean).
BYTE
public static final JType BYTE
JType instance for a byte (Byte).
CHAR
public static final JType CHAR
JType instance for a char (Char).
DOUBLE
public static final JType DOUBLE
JType instance for a double (Double).
FLOAT
public static final JType FLOAT
JType instance for a float (Float).
INT
public static final JType INT
JType instance for a int (Integer).
LONG
public static final JType LONG
JType instance for a long (Long).
SHORT
public static final JType SHORT
JType instance for a short (Short).
JType
protected JType(String name)
Creates a new JType with the given name.
name
- the name of the type
changePackage
protected final void changePackage(String newPackage)
Change the package this JType belongs to. This method is protected to
allow subtypes, such as JClass to alter the package to which this JType
belongs.
newPackage
- the new package to which this JType belongs
Note: The package name cannot be changed on a
primitive type.
getLocalName
public final String getLocalName()
Returns the unqualified Java type name (i.e. without package).
- the unqualified Java type name.
getName
public final String getName()
Returns the qualified Java type name.
- the qualified Java type name.
getWrapperName
public final String getWrapperName()
Return the name of the wrapper object for a primitive type, null for
non-primitive types.
- the name of the wrapper object for a primitive type, null for
non-primitive types.
isArray
public boolean isArray()
Returns true if this type represents an Array. Always returns false
unless overridden by an extending class.
- true if this type represents an Array.
isPrimitive
public final boolean isPrimitive()
Checks to see if this JType represents a primitive type.
- true if this JType represents a primitive type, otherwise false.
toString
public String toString()
Returns the String representation of this JType, which is simply the name
of this type.
- the String representation of this JType.
Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com