public class

TypeCode

extends Object
java.lang.Object
   ↳ sun.jvmstat.perfdata.monitor.v2_0.TypeCode

Class Overview

A typesafe enumeration for describing standard Java type codes.

Summary

Fields
public static final TypeCode ARRAY
public static final TypeCode BOOLEAN
public static final TypeCode BYTE
public static final TypeCode CHAR
public static final TypeCode DOUBLE
public static final TypeCode FLOAT
public static final TypeCode INT
public static final TypeCode LONG
public static final TypeCode OBJECT
public static final TypeCode SHORT
public static final TypeCode VOID
Public Methods
int toChar()
Convert enumeration to its character representation.
String toString()
Convert enumeration value to a String.
static TypeCode toTypeCode(char c)
Map a character value to its corresponding TypeCode object.
static TypeCode toTypeCode(byte b)
Map a character value to its corresponding TypeCode object.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final TypeCode ARRAY

public static final TypeCode BOOLEAN

public static final TypeCode BYTE

public static final TypeCode CHAR

public static final TypeCode DOUBLE

public static final TypeCode FLOAT

public static final TypeCode INT

public static final TypeCode LONG

public static final TypeCode OBJECT

public static final TypeCode SHORT

public static final TypeCode VOID

Public Methods

public int toChar ()

Convert enumeration to its character representation.

Returns
  • int - the integer representation for the enumeration.

public String toString ()

Convert enumeration value to a String.

Returns
  • String - the string representation for the enumeration.

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.

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.