org.jboss.reflect.spi
Class PrimitiveInfo

java.lang.Object
  extended by org.jboss.reflect.spi.PrimitiveInfo
All Implemented Interfaces:
Serializable, TypeInfo

public class PrimitiveInfo
extends Object
implements TypeInfo, Serializable

Primitive info

Author:
Bill Burke, Adrian Brock
See Also:
Serialized Form

Field Summary
static PrimitiveInfo BOOLEAN
          The boolean info
static PrimitiveInfo BYTE
          The byte info
static PrimitiveInfo CHAR
          The char info
static PrimitiveInfo DOUBLE
          The double info
static PrimitiveInfo FLOAT
          The float info
static PrimitiveInfo INT
          The int info
static PrimitiveInfo LONG
          The long info
protected  String name
          The name
protected  int ordinal
          The ordinal
static PrimitiveInfo SHORT
          The short info
protected  Class type
          The type
static PrimitiveInfo VOID
          The void info
 
Constructor Summary
protected PrimitiveInfo(String name, int ordinal, Class type)
          Create a new primitive info
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Get the type name
 Class getType()
          Get the class
 int hashCode()
           
 int ordinal()
          Get the ordinal
 String toString()
           
static PrimitiveInfo valueOf(String name)
          Get the primitive info for a type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BOOLEAN

public static final PrimitiveInfo BOOLEAN
The boolean info


BYTE

public static final PrimitiveInfo BYTE
The byte info


CHAR

public static final PrimitiveInfo CHAR
The char info


DOUBLE

public static final PrimitiveInfo DOUBLE
The double info


FLOAT

public static final PrimitiveInfo FLOAT
The float info


INT

public static final PrimitiveInfo INT
The int info


LONG

public static final PrimitiveInfo LONG
The long info


SHORT

public static final PrimitiveInfo SHORT
The short info


VOID

public static final PrimitiveInfo VOID
The void info


name

protected final transient String name
The name


ordinal

protected final int ordinal
The ordinal


type

protected final transient Class type
The type

Constructor Detail

PrimitiveInfo

protected PrimitiveInfo(String name,
                        int ordinal,
                        Class type)
Create a new primitive info

Parameters:
name - the name
ordinal - the oridinal
type - the class
Method Detail

valueOf

public static PrimitiveInfo valueOf(String name)
Get the primitive info for a type

Parameters:
name - the name
Returns:
the info

ordinal

public int ordinal()
Get the ordinal

Returns:
the oridinal

getName

public String getName()
Description copied from interface: TypeInfo
Get the type name

Specified by:
getName in interface TypeInfo
Returns:
the name

getType

public Class getType()
Description copied from interface: TypeInfo
Get the class

Specified by:
getType in interface TypeInfo
Returns:
the class

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.