Jvmstat

sun.jvmstat.perfdata.monitor.v2_0
Class TypeCode

java.lang.Object
  extended by sun.jvmstat.perfdata.monitor.v2_0.TypeCode

public class TypeCode
extends Object

A typesafe enumeration for describing standard Java type codes.

Since:
1.5

Field Summary
static TypeCode ARRAY
           
static TypeCode BOOLEAN
           
static TypeCode BYTE
           
static TypeCode CHAR
           
static TypeCode DOUBLE
           
static TypeCode FLOAT
           
static TypeCode INT
           
static TypeCode LONG
           
static TypeCode OBJECT
           
static TypeCode SHORT
           
static TypeCode VOID
           
 
Method Summary
 int toChar()
          Convert enumeration to its character representation.
 String toString()
          Convert enumeration value to a String.
static TypeCode toTypeCode(byte b)
          Map a character value to its corresponding TypeCode object.
static TypeCode toTypeCode(char c)
          Map a character value to its corresponding TypeCode object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BOOLEAN

public static final TypeCode BOOLEAN

CHAR

public static final TypeCode CHAR

FLOAT

public static final TypeCode FLOAT

DOUBLE

public static final TypeCode DOUBLE

BYTE

public static final TypeCode BYTE

SHORT

public static final TypeCode SHORT

INT

public static final TypeCode INT

LONG

public static final TypeCode LONG

OBJECT

public static final TypeCode OBJECT

ARRAY

public static final TypeCode ARRAY

VOID

public static final TypeCode VOID
Method Detail

toString

public String toString()
Convert enumeration value to a String.

Overrides:
toString in class Object
Returns:
String - the string representation for the enumeration.

toChar

public int toChar()
Convert enumeration to its character representation.

Returns:
int - the integer representation for the enumeration.

toTypeCode

public static TypeCode toTypeCode(char c)
Map a character value to its corresponding TypeCode object.

Parameters:
c - an character representing a Java TypeCode
Returns:
TypeCode - The TypeCode enumeration object for the given character.
Throws:
IllegalArgumentException - Thrown if c is not a valid Java TypeCode.

toTypeCode

public static TypeCode toTypeCode(byte b)
Map a character value to its corresponding TypeCode object.

Parameters:
b - a byte representing a Java TypeCode. This value is converted into a char and used to find the corresponding TypeCode.
Returns:
TypeCode - The TypeCode enumeration object for the given byte.
Throws:
IllegalArgumentException - Thrown if v is not a valid Java TypeCode.

Jvmstat