|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<PrimitiveSupport> net.sf.navel.beans.PrimitiveSupport
public enum PrimitiveSupport
A utility class for dealing with properties of primitive types, including arrays of primitives, which can be very tricky to reflect correctly.
Enum Constant Summary | |
---|---|
BOOLEAN
|
|
BYTE
|
|
CHARACTER
|
|
DOUBLE
|
|
FLOAT
|
|
INTEGER
|
|
LONG
|
|
SHORT
|
Method Summary | |
---|---|
java.lang.Object |
getDefaultValue()
|
static PrimitiveSupport |
getForPrimitive(java.lang.Class<?> primitiveType)
Lookup for when the caller has the primitive type and needs access to the members of the associated enum. |
static PrimitiveSupport |
getForWrapper(java.lang.Class<?> wrapperType)
Lookup for when the caller has the wrapper type and needs access to the members of the associated enum. |
java.lang.Class<?> |
getPrimitiveType()
|
java.lang.Class<?> |
getWrapperType()
|
static PrimitiveSupport |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static PrimitiveSupport[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final PrimitiveSupport BOOLEAN
public static final PrimitiveSupport BYTE
public static final PrimitiveSupport CHARACTER
public static final PrimitiveSupport DOUBLE
public static final PrimitiveSupport FLOAT
public static final PrimitiveSupport INTEGER
public static final PrimitiveSupport LONG
public static final PrimitiveSupport SHORT
Method Detail |
---|
public static final PrimitiveSupport[] values()
for(PrimitiveSupport c : PrimitiveSupport.values()) System.out.println(c);
public static PrimitiveSupport valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic static PrimitiveSupport getForPrimitive(java.lang.Class<?> primitiveType)
primitiveType
- Must be non-null and the class for a primitive type.
public java.lang.Class<?> getPrimitiveType()
public java.lang.Class<?> getWrapperType()
public java.lang.Object getDefaultValue()
public static PrimitiveSupport getForWrapper(java.lang.Class<?> wrapperType)
warpperType
- May be any type but if not a valid primitive wrapper, null
will be returned.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |