org.exolab.javasource

Class JType

Known Direct Subclasses:
JComponentizedType, JPrimitiveType, JStructure

public class JType
extends java.lang.Object

Represents a primitive or class type.
Version:
$Revision: 7166 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Authors:
Werner Guttmann
Keith Visco

Field Summary

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 Summary

JType(String name)
Creates a new JType with the given name.

Method Summary

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.

Field Details

BOOLEAN

public static final JPrimitiveType BOOLEAN
JType for a boolean (Boolean).

BYTE

public static final JPrimitiveType BYTE
JType instance for a byte (Byte).

CHAR

public static final JPrimitiveType CHAR
JType instance for a char (Char).

DOUBLE

public static final JPrimitiveType DOUBLE
JType instance for a double (Double).

FLOAT

public static final JPrimitiveType FLOAT
JType instance for a float (Float).

INT

public static final JPrimitiveType INT
JType instance for a int (Integer).

LONG

public static final JPrimitiveType LONG
JType instance for a long (Long).

SHORT

public static final JPrimitiveType SHORT
JType instance for a short (Short).

Constructor Details

JType

public JType(String name)
Creates a new JType with the given name.
Parameters:
name - The name of the type.

Method Details

getLocalName

public final String getLocalName()
Returns the unqualified Java type name (i.e. without package).
Returns:
The unqualified Java type name.

getName

public final String 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

protected void setName(String name)
Sets the qualified name of this type.
Parameters:
name - the (qualified) name of the type

Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com