com.bea.tuxedo.control
Class Primitives

java.lang.Object
  extended by com.bea.tuxedo.control.Primitives

public class Primitives
extends Object

Class providing translation of a primitive type to a type code. The same type codes are used for both run-time and compile-time code. The compile-time versions use a comparison against the Java signature of the class. For our purposes, any type that can be coerced to an FML or View field is a primitive, including String and Decimal (but not embedded FML32, embedded View or Ptr).


Field Summary
static Class byteClass
           
static Class ByteClass
           
static Class ObjectClass
           
static int TYPE_BOOLEAN
          Public constants giving an integer type code for primitive types.
static int TYPE_BYTE
           
static int TYPE_CHAR
           
static int TYPE_DECIMAL
           
static int TYPE_DOUBLE
           
static int TYPE_FLOAT
           
static int TYPE_INT
           
static int TYPE_LONG
           
static int TYPE_NON_PRIMITIVE
           
static int TYPE_SHORT
           
static int TYPE_STRING
           
static Class XmlObjectClass
           
 
Constructor Summary
Primitives()
           
 
Method Summary
static String getName(int typeCode)
          Get the name of the type corresponding to a given type code.
static int getPrimitiveTypeCode(Class cls)
           
static int getPrimitiveTypeCode(Object obj)
          Get interger type code for primitive or wrapped primitive type.
static int getPrimitiveTypeCode(String signature)
          Looks up our own type code for well-known types
static String typeNameToSignature(String typeName)
          Primitives class expects signatures, but mirror API gives class names
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_BOOLEAN

public static final int TYPE_BOOLEAN
Public constants giving an integer type code for primitive types.

See Also:
Constant Field Values

TYPE_BYTE

public static final int TYPE_BYTE
See Also:
Constant Field Values

TYPE_SHORT

public static final int TYPE_SHORT
See Also:
Constant Field Values

TYPE_INT

public static final int TYPE_INT
See Also:
Constant Field Values

TYPE_LONG

public static final int TYPE_LONG
See Also:
Constant Field Values

TYPE_CHAR

public static final int TYPE_CHAR
See Also:
Constant Field Values

TYPE_FLOAT

public static final int TYPE_FLOAT
See Also:
Constant Field Values

TYPE_DOUBLE

public static final int TYPE_DOUBLE
See Also:
Constant Field Values

TYPE_STRING

public static final int TYPE_STRING
See Also:
Constant Field Values

TYPE_DECIMAL

public static final int TYPE_DECIMAL
See Also:
Constant Field Values

TYPE_NON_PRIMITIVE

public static final int TYPE_NON_PRIMITIVE
See Also:
Constant Field Values

byteClass

public static Class byteClass

ByteClass

public static Class ByteClass

XmlObjectClass

public static Class XmlObjectClass

ObjectClass

public static Class ObjectClass
Constructor Detail

Primitives

public Primitives()
Method Detail

getName

public static String getName(int typeCode)
Get the name of the type corresponding to a given type code.

Parameters:
typeCode - The type code.
Returns:
The associated name.

getPrimitiveTypeCode

public static int getPrimitiveTypeCode(String signature)
Looks up our own type code for well-known types

Parameters:
signature - the Java signature for a type
Returns:
the type code for a matching type, else TYPE_NON_PRIMITIVE

getPrimitiveTypeCode

public static int getPrimitiveTypeCode(Object obj)
Get interger type code for primitive or wrapped primitive type.

Parameters:
obj - The object whose type we want.
Returns:
The type code for the object. TYPE_NON_PRIMITIVE indicates a non-primitive object.

getPrimitiveTypeCode

public static int getPrimitiveTypeCode(Class cls)

typeNameToSignature

public static String typeNameToSignature(String typeName)
Primitives class expects signatures, but mirror API gives class names