org.sourceforge.jemm.database
Enum FieldType

java.lang.Object
  extended by java.lang.Enum<FieldType>
      extended by org.sourceforge.jemm.database.FieldType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FieldType>

public enum FieldType
extends java.lang.Enum<FieldType>

The valid field types within JEMM

Author:
Rory Graves

Enum Constant Summary
BOOLEAN
          A boolean field.
BOOLEAN_ARRAY
          boolean array type
BYTE
          A byte field.
BYTE_ARRAY
          byte array type
CHAR
          A char field.
CHAR_ARRAY
          char array type
DOUBLE
          A double field.
DOUBLE_ARRAY
          double array type
FLOAT
          A float field.
FLOAT_ARRAY
          float array type
INT
          An int field.
INT_ARRAY
          int array type
LONG
          A long field.
LONG_ARRAY
          long array type
OBJECT
          An reference field.
OBJECT_ARRAY
          object array type
SERIALIZABLE
          An immutable, serializable value type (e.g.
SHORT
          A char field.
SHORT_ARRAY
          short array type
 
Method Summary
static FieldType convert(java.lang.Class<?> clazz)
           
static boolean isObjectPrimitive(java.lang.Class<?> clazz)
           
static boolean isPrimitive(FieldType type)
           
static FieldType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FieldType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BOOLEAN

public static final FieldType BOOLEAN
A boolean field.


BYTE

public static final FieldType BYTE
A byte field.


CHAR

public static final FieldType CHAR
A char field.


SHORT

public static final FieldType SHORT
A char field.


INT

public static final FieldType INT
An int field.


FLOAT

public static final FieldType FLOAT
A float field.


LONG

public static final FieldType LONG
A long field.


DOUBLE

public static final FieldType DOUBLE
A double field.


SERIALIZABLE

public static final FieldType SERIALIZABLE
An immutable, serializable value type (e.g. String)


OBJECT

public static final FieldType OBJECT
An reference field.


BOOLEAN_ARRAY

public static final FieldType BOOLEAN_ARRAY
boolean array type


BYTE_ARRAY

public static final FieldType BYTE_ARRAY
byte array type


CHAR_ARRAY

public static final FieldType CHAR_ARRAY
char array type


SHORT_ARRAY

public static final FieldType SHORT_ARRAY
short array type


INT_ARRAY

public static final FieldType INT_ARRAY
int array type


FLOAT_ARRAY

public static final FieldType FLOAT_ARRAY
float array type


LONG_ARRAY

public static final FieldType LONG_ARRAY
long array type


DOUBLE_ARRAY

public static final FieldType DOUBLE_ARRAY
double array type


OBJECT_ARRAY

public static final FieldType OBJECT_ARRAY
object array type

Method Detail

values

public static FieldType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FieldType c : FieldType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FieldType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

convert

public static FieldType convert(java.lang.Class<?> clazz)

isPrimitive

public static boolean isPrimitive(FieldType type)

isObjectPrimitive

public static boolean isObjectPrimitive(java.lang.Class<?> clazz)


Copyright © 2009. All Rights Reserved.