|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ontimize.util.ClassHandler
Utility class to create new class objects.
Uses Reflection Java API.
| Nested Class Summary | |
static class |
ClassHandler.BooleanStringConverter
|
static class |
ClassHandler.ColorStringConverter
|
static class |
ClassHandler.DefaultStringConverter
|
static interface |
ClassHandler.StringConverter
|
| Field Summary | |
protected static java.util.Map |
PRIMITIVE_CLASS_OBJECT
|
protected static java.util.Map |
PRIMITIVE_CLASS_TYPE
|
protected static java.util.Map |
STRING_CONVERTERS
|
| Constructor Summary | |
ClassHandler()
|
|
| Method Summary | |
static java.lang.Object |
getClassInstance(java.lang.String className)
Returns the Object instance for the given className |
static java.lang.Class |
getClassObject(java.lang.String className)
Returns the Class object for the given className. |
static java.lang.Class |
getClassObject(java.lang.String className,
boolean primitiveTypes)
Returns the Class object for the given className.
|
static java.lang.reflect.Method |
getMethodObject(java.lang.Object source,
java.lang.String name)
Returns the Method of the given Object source with
the given name. |
static java.lang.reflect.Method |
getMethodObject(java.lang.Object source,
java.lang.String name,
java.lang.Class[] clazz)
Returns the Method of the given Object source with
the name and the parameter class. |
static java.lang.Object |
getValueObject(java.lang.String className,
java.lang.String value)
Returns the given String value converted into the
className Class.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.util.Map PRIMITIVE_CLASS_TYPE
protected static final java.util.Map PRIMITIVE_CLASS_OBJECT
protected static java.util.Map STRING_CONVERTERS
| Constructor Detail |
public ClassHandler()
| Method Detail |
public static java.lang.Class getClassObject(java.lang.String className)
throws java.lang.IllegalArgumentException
Returns the Class object for the given className.
className - The class name of the Class object.
Class object for the given className.
java.lang.IllegalArgumentException
public static java.lang.Class getClassObject(java.lang.String className,
boolean primitiveTypes)
throws java.lang.IllegalArgumentException
Returns the Class object for the given className.
Allows to return Class objects for the Java primitive types.
className - The class name of the Class object.primitiveTypes - If true, return the Class for Java primitive types.
Class object for the given className.
java.lang.IllegalArgumentException
public static java.lang.Object getClassInstance(java.lang.String className)
throws java.lang.IllegalArgumentException
Returns the Object instance for the given className
className - The class name of the Class object.
Object instance for the given className
java.lang.IllegalArgumentException
public static java.lang.reflect.Method getMethodObject(java.lang.Object source,
java.lang.String name)
Returns the Method of the given Object source with
the given name.
source - Object with the method.name - of the method to return.
Method with the given name
public static java.lang.reflect.Method getMethodObject(java.lang.Object source,
java.lang.String name,
java.lang.Class[] clazz)
Returns the Method of the given Object source with
the name and the parameter class.
source - Object with the method.name - of the method to return.clazz - Array with the Class paramters of the method.
Method with the given name and clazz parameters.
public static java.lang.Object getValueObject(java.lang.String className,
java.lang.String value)
throws java.lang.IllegalArgumentException
Returns the given String value converted into the
className Class.
Some classes have a custom converter, else the default converter uses
the contructor class with the String parameter
(a IllegalArgumentException can be thrown).
className - The class name of the returned object value.value - The String to convert.
java.lang.IllegalArgumentException
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||