Package org.exolab.javasource
Class JType
java.lang.Object
org.exolab.javasource.JType
- Direct Known Subclasses:
JComponentizedType
,JPrimitiveType
,JStructure
Represents a primitive or class type.
- Version:
- $Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Werner Guttmann, Keith Visco
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JPrimitiveType
JType for a boolean (Boolean).static final JPrimitiveType
JType instance for a byte (Byte).static final JPrimitiveType
JType instance for a char (Char).static final JPrimitiveType
JType instance for a double (Double).static final JPrimitiveType
JType instance for a float (Float).static final JPrimitiveType
JType instance for a int (Integer).static final JPrimitiveType
JType instance for a long (Long).static final JPrimitiveType
JType instance for a short (Short). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Returns the unqualified Java type name (i.e.final String
getName()
Returns the qualified Java type name.final boolean
isArray()
Returns true if this type represents an Array.final boolean
Returns true if this type represents a Java primitive type.protected void
Sets the qualified name of this type.
-
Field Details
-
BOOLEAN
JType for a boolean (Boolean). -
BYTE
JType instance for a byte (Byte). -
CHAR
JType instance for a char (Char). -
DOUBLE
JType instance for a double (Double). -
FLOAT
JType instance for a float (Float). -
INT
JType instance for a int (Integer). -
LONG
JType instance for a long (Long). -
SHORT
JType instance for a short (Short).
-
-
Constructor Details
-
JType
Creates a new JType with the given name.- Parameters:
name
- The name of the type.
-
-
Method Details
-
getLocalName
Returns the unqualified Java type name (i.e. without package).- Returns:
- The unqualified Java type name.
-
getName
Returns the qualified Java type name.- Returns:
- The qualified Java type name.
-
isArray
public final boolean isArray()Returns true if this type represents an Array.- Returns:
- True if this type represents an Array.
-
isPrimitive
public final boolean isPrimitive()Returns true if this type represents a Java primitive type.- Returns:
- True if this type represents a Java primitive type.
-
setName
Sets the qualified name of this type.- Parameters:
name
- the (qualified) name of the type
-