|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sapportals.wcm.util.factories.ReflectionUtils
A wrapper for reflection methods with an WcmException .
Copyright (c) SAP AG 2001-2002
| Field Summary | |
static String |
CONFIG_CLASSNAME_TAG
Property tag for the classname parameter in the configuration data. |
| Constructor Summary | |
ReflectionUtils()
|
|
| Method Summary | |
static Object |
callMethod(String logName,
Object object,
Method method,
Object[] parameters)
Call an object's / classes' method. |
static Object |
callStaticMethod(String logName,
Method method,
Object[] parameters)
Call a classes' static method. |
static String |
getDefaultGetInstanceMethodName()
Get the default name for the getInstance method. |
static Properties |
getSubProperties(Properties properties,
String base)
Get a part of the configuration for specific base-prefix from the properties (extract only those properties prefixed by base ). |
static Class |
loadClass(String logName,
String className)
Deprecated. as of NW04. Use CrtClassLoaderRegistry
instead. |
static Constructor |
loadConstructor(String logName,
Class classObject,
Class[] parameterTypes)
Get a classes' constructor. |
static Method |
loadMethod(String logName,
Class classObject,
String methodName,
Class[] parameterTypes)
Get a classes' method. |
static Object |
newObject(String logName,
Constructor constructor,
Object[] parameters)
Create a new object from a class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String CONFIG_CLASSNAME_TAG
| Constructor Detail |
public ReflectionUtils()
| Method Detail |
public static String getDefaultGetInstanceMethodName()
getInstance method.
String with the default name of the
getInstance() method.
public static Class loadClass(String logName,
String className)
throws WcmException
CrtClassLoaderRegistry
instead.
logName - a String with a short name for logging.className - a String with the name of the class to load.
Class object loaded.
WcmException - Exception raised in failure situation
WcmException - if the class cannot be loaded.
public static Constructor loadConstructor(String logName,
Class classObject,
Class[] parameterTypes)
throws WcmException
logName - a String with a short name for logging.classObject - the Class object of the class to get the
constructor for.parameterTypes - an array of Class es defining the
constructor's signature.
Constructor object with the specified constructor.
WcmException - if the constructor cannot be loaded.
public static Method loadMethod(String logName,
Class classObject,
String methodName,
Class[] parameterTypes)
throws WcmException
logName - a String with a short name for logging.classObject - the Class object of the class to get the
method for.methodName - a String s with the name of the method.parameterTypes - an array of Class es defining the
method's signature.
Method object with the specified method.
WcmException - if the method cannot be loaded.
public static Object callMethod(String logName,
Object object,
Method method,
Object[] parameters)
throws WcmException
logName - a String with a short name for logging.object - the Object to call the method for or null
if it's a static method.method - the Method to call.parameters - an array of Object s with the parameters to
pass to the method.
Object with the result of the method or null
if void.
WcmException - if the method cannot be called.
public static Object callStaticMethod(String logName,
Method method,
Object[] parameters)
throws WcmException
logName - a String with a short name for logging.method - the Method to call.parameters - an array of Object s with the parameters to
pass to the method.
Object with the result of the method or null
if void.
WcmException - if the method cannot be called.
public static Object newObject(String logName,
Constructor constructor,
Object[] parameters)
throws WcmException
logName - a String with a short name for logging.constructor - the Constructor to use.parameters - an array of Object s with the parameters to
pass to the constructor.
Object with the newly created object.
WcmException - Exception raised in failure situation
WcmException - if the object cannot be created.
public static Properties getSubProperties(Properties properties,
String base)
base - a String with the prefix for the desired
properties.properties - TBD: Description of the incoming method parameter
Properties from configuration for the given
base . -prefix. The keys of the returned properties
are without the base-prefix.
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||