Class JType
java.lang.Object
org.codehaus.modello.plugin.java.javasource.JType
- Direct Known Subclasses:
JComponentizedType,JStructure
- Version:
- $Revision$ $Date$
- Author:
- Keith Visco
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangePackage(String newPackage) Allows subtypes, such as JClass to alter the package to which this JType belongsfinal JTypeDeprecated.removed in javasource 1.3rc1, replaced by JArrayTypeIf this JType is an array this method will returns the component type of the array, otherwise null will be returned.getName()final booleanisArray()Checks to see if this JType represents an array.booleanChecks to see if this JType represents a primitivetoString()Returns the String representation of this JType, which is simply the name of this type.
-
Field Details
-
BOOLEAN
-
BYTE
-
CHAR
-
DOUBLE
-
FLOAT
-
INT
-
LONG
-
SHORT
-
-
Constructor Details
-
JType
Creates a new JType with the given name- Parameters:
name- the name of the type
-
-
Method Details
-
createArray
Deprecated.removed in javasource 1.3rc1, replaced by JArrayTypeCreates a JType Object representing an array of the current JType.- Returns:
- the new JType which is represents an array.
-
getComponentType
If this JType is an array this method will returns the component type of the array, otherwise null will be returned.- Returns:
- the component JType if this JType is an array, otherwise null.
-
getLocalName
-
getName
-
isArray
public final boolean isArray()Checks to see if this JType represents an array.- Returns:
- true if this JType represents an array, otherwise false
-
isPrimitive
public boolean isPrimitive()Checks to see if this JType represents a primitive- Returns:
- true if this JType represents a primitive, otherwise false
-
toString
Returns the String representation of this JType, which is simply the name of this type. -
changePackage
Allows subtypes, such as JClass to alter the package to which this JType belongs- Parameters:
newPackage- the new package to which this JType belongs
Note: The package name cannot be changed on a primitive type.
-