com.dyuproject.util.reflect
Class ParameterType

java.lang.Object
  extended by com.dyuproject.util.reflect.ParameterType

public abstract class ParameterType
extends Object

The java.lang.* primitive and primitive wrapper types

Author:
David Yu
Date created:
Mar 14, 2008

Nested Class Summary
static class ParameterType.SimpleField
          A single property of a pojo with contains the method where one can use reflection to extract value, the name and the ParameterType w/c can be used to extract value from a string.
 
Field Summary
static ParameterType BOOLEAN
           
static ParameterType BOOLEAN_P
           
static ParameterType DOUBLE
           
static ParameterType DOUBLE_P
           
static ParameterType FLOAT
           
static ParameterType FLOAT_P
           
static ParameterType INTEGER
           
static ParameterType INTEGER_P
           
static ParameterType LONG
           
static ParameterType LONG_P
           
static ParameterType SHORT
           
static ParameterType SHORT_P
           
static ParameterType STRING
           
 
Constructor Summary
ParameterType()
           
 
Method Summary
static void fillWithSimpleType(Map<Class<?>,ParameterType> map)
           
abstract  Object getActualValue(String value)
          Gets the actual value from a string value.
static Map<String,ParameterType.SimpleField> getSimpleFieldGetters(Class<?> pojoClass)
          Gets the getters of a pojo as a map of String as key and ParameterType.SimpleField as value.
static Map<String,ParameterType.SimpleField> getSimpleFieldSetters(Class<?> pojoClass)
          Gets the setters of a pojo as a map of String as key and ParameterType.SimpleField as value.
static ParameterType getSimpleType(Class<?> clazz)
          Gets the simple types (basically primitive types).
abstract  Class<?> getTypeClass()
          Gets the class of this given type.
 int hashCode()
           
 boolean isPrimitive()
          Checks whether this type is a java primitive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final ParameterType STRING

BOOLEAN

public static final ParameterType BOOLEAN

BOOLEAN_P

public static final ParameterType BOOLEAN_P

SHORT

public static final ParameterType SHORT

SHORT_P

public static final ParameterType SHORT_P

INTEGER

public static final ParameterType INTEGER

INTEGER_P

public static final ParameterType INTEGER_P

LONG

public static final ParameterType LONG

LONG_P

public static final ParameterType LONG_P

FLOAT

public static final ParameterType FLOAT

FLOAT_P

public static final ParameterType FLOAT_P

DOUBLE

public static final ParameterType DOUBLE

DOUBLE_P

public static final ParameterType DOUBLE_P
Constructor Detail

ParameterType

public ParameterType()
Method Detail

fillWithSimpleType

public static void fillWithSimpleType(Map<Class<?>,ParameterType> map)

getSimpleType

public static ParameterType getSimpleType(Class<?> clazz)
Gets the simple types (basically primitive types).


getSimpleFieldSetters

public static Map<String,ParameterType.SimpleField> getSimpleFieldSetters(Class<?> pojoClass)
Gets the setters of a pojo as a map of String as key and ParameterType.SimpleField as value.


getSimpleFieldGetters

public static Map<String,ParameterType.SimpleField> getSimpleFieldGetters(Class<?> pojoClass)
Gets the getters of a pojo as a map of String as key and ParameterType.SimpleField as value.


getActualValue

public abstract Object getActualValue(String value)
Gets the actual value from a string value.


getTypeClass

public abstract Class<?> getTypeClass()
Gets the class of this given type.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

isPrimitive

public boolean isPrimitive()
Checks whether this type is a java primitive.



Copyright © 2008-2013. All Rights Reserved.