net.sf.transjvm
Class TypeID

java.lang.Object
  extended by net.sf.transjvm.TypeID

public abstract class TypeID
extends java.lang.Object

A Class representing JVM types.


Field Summary
static TypeID BOOLEAN
          Boolean (true or false) type.
static TypeID BYTE
          8 bit signed integer type.
static TypeID CHAR
          16 bit unicode character type.
static TypeID CLASS
          java.lang.Class
static TypeID DOUBLE
          Alias for REAL64
static TypeID FLOAT
          Alias for REAL32
static TypeID INT
          Alias for INT32
static TypeID INT16
          16 bit signed integer type.
static TypeID INT32
          32 bit signed integer type.
static TypeID INT64
          64 bit signed integer type.
static TypeID LONG
          Alias for INT64
static TypeID OBJECT
          java.lang.Object
static TypeID REAL32
          32 bit floating point type.
static TypeID REAL64
          64 bit floating point type.
static TypeID SHORT
          Alias for INT16
static TypeID STRING
          java.lang.String
static TypeID THROWABLE
          java.lang.Throwable
static TypeID VOID
          Pseudo-type for return type of subroutines.
 
Method Summary
 TypeID array()
          Returns the TypeID for the array of this TypeID.
 TypeID component()
          Returns the TypeID for the component type of this array type.
 boolean equals(java.lang.Object other)
           
static TypeID forName(java.lang.String name)
          Returns the TypeID for the named class.
 java.lang.String getDescriptor()
          Returns the descriptor for this type.
 int hashCode()
           
 boolean isArray()
          True if this TypeID is an array, ie it is not a primitive or a class.
 boolean isPrimitive()
          True if this TypeID is a primitive, ie it is not a class or an array.
 java.lang.String toString()
          Returns a short name for this type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BYTE

public static final TypeID BYTE
8 bit signed integer type.


CHAR

public static final TypeID CHAR
16 bit unicode character type.


INT16

public static final TypeID INT16
16 bit signed integer type.


INT32

public static final TypeID INT32
32 bit signed integer type.


INT64

public static final TypeID INT64
64 bit signed integer type.


BOOLEAN

public static final TypeID BOOLEAN
Boolean (true or false) type.


REAL32

public static final TypeID REAL32
32 bit floating point type.


REAL64

public static final TypeID REAL64
64 bit floating point type.


VOID

public static final TypeID VOID
Pseudo-type for return type of subroutines.


OBJECT

public static final TypeID OBJECT
java.lang.Object


STRING

public static final TypeID STRING
java.lang.String


THROWABLE

public static final TypeID THROWABLE
java.lang.Throwable


CLASS

public static final TypeID CLASS
java.lang.Class


DOUBLE

public static final TypeID DOUBLE
Alias for REAL64


FLOAT

public static final TypeID FLOAT
Alias for REAL32


LONG

public static final TypeID LONG
Alias for INT64


INT

public static final TypeID INT
Alias for INT32


SHORT

public static final TypeID SHORT
Alias for INT16

Method Detail

getDescriptor

public java.lang.String getDescriptor()
Returns the descriptor for this type.


equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Returns a short name for this type.

Overrides:
toString in class java.lang.Object

isPrimitive

public boolean isPrimitive()
True if this TypeID is a primitive, ie it is not a class or an array.


isArray

public boolean isArray()
True if this TypeID is an array, ie it is not a primitive or a class.


forName

public static TypeID forName(java.lang.String name)
Returns the TypeID for the named class.


array

public final TypeID array()
Returns the TypeID for the array of this TypeID. Note that: type.array().component() == type is always true.


component

public TypeID component()
Returns the TypeID for the component type of this array type. Returns null if not an array.



Copyright 2004-5, Mark Shannon