|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jmscts.core.ClassHelper
Helper for loading classes and setting/getting any public properties.
Method Summary | |
static java.lang.reflect.Method |
getMethod(java.lang.Class type,
java.lang.String name,
java.lang.Object[] args)
Helper to return a method given its name and a list of arguments |
static java.lang.String |
getPrimitiveName(java.lang.Class wrapper)
Helper to return the primitive type name associated with an object wrapper type |
static java.lang.Class |
getPrimitiveType(java.lang.Class wrapper)
Helper to return the primitive type associated with an object wrapper type |
static Property[] |
getProperties(java.lang.Object object)
Helper to returns the properties of an object |
static java.lang.Object |
instantiate(java.lang.String className,
Property[] properties)
Create a new instance of an object identified by its class name, and set its properties |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.Object instantiate(java.lang.String className, Property[] properties) throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException
className
- the name of the classproperties
- the list of properties to setjava.lang.ClassNotFoundException
- if the class cannot be locatedjava.lang.IllegalAccessException
- if the class or initializer is not
accessiblejava.lang.InstantiationException
- if the instantiation failsjava.lang.reflect.InvocationTargetException
- if the underlying method throws an
exceptionjava.lang.NoSuchMethodException
- if a matching method is not foundpublic static Property[] getProperties(java.lang.Object object) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
object
- the object to retrieve properties forjava.lang.IllegalAccessException
- if the class or initializer is not
accessiblejava.lang.reflect.InvocationTargetException
- if the underlying method throws an
exceptionpublic static java.lang.reflect.Method getMethod(java.lang.Class type, java.lang.String name, java.lang.Object[] args) throws java.lang.NoSuchMethodException
type
- the class to locate the method onname
- the method nameargs
- the list of arguments to match against, or null if the
method takes no argumentsjava.lang.NoSuchMethodException
- if the method cannot be foundpublic static java.lang.Class getPrimitiveType(java.lang.Class wrapper)
wrapper
- the object wrapper classpublic static java.lang.String getPrimitiveName(java.lang.Class wrapper)
wrapper
- the object wrapper class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |