|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.util.factories.ReflectionUtils
A wrapper for reflection methods with an WcmException .
Copyright (c) SAP AG 2001-2002
| Field Summary | |
static java.lang.String |
CONFIG_CLASSNAME_TAG
Property tag for the classname parameter in the configuration data. |
| Constructor Summary | |
ReflectionUtils()
|
|
| Method Summary | |
static java.lang.Object |
callMethod(java.lang.String logName,
java.lang.Object object,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Call an object's / classes' method. |
static java.lang.Object |
callStaticMethod(java.lang.String logName,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Call a classes' static method. |
static java.lang.String |
getDefaultGetInstanceMethodName()
Get the default name for the getInstance method. |
static java.util.Properties |
getSubProperties(java.util.Properties properties,
java.lang.String base)
Get a part of the configuration for specific base-prefix from the properties (extract only those properties prefixed by base ). |
static java.lang.Class |
loadClass(java.lang.String logName,
java.lang.String className)
Deprecated. as of NW04. Use CrtClassLoaderRegistry
instead. |
static java.lang.reflect.Constructor |
loadConstructor(java.lang.String logName,
java.lang.Class classObject,
java.lang.Class[] parameterTypes)
Get a classes' constructor. |
static java.lang.reflect.Method |
loadMethod(java.lang.String logName,
java.lang.Class classObject,
java.lang.String methodName,
java.lang.Class[] parameterTypes)
Get a classes' method. |
static java.lang.Object |
newObject(java.lang.String logName,
java.lang.reflect.Constructor constructor,
java.lang.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 java.lang.String CONFIG_CLASSNAME_TAG
| Constructor Detail |
public ReflectionUtils()
| Method Detail |
public static java.lang.String getDefaultGetInstanceMethodName()
getInstance method.String with the default name of the
getInstance() method.
public static java.lang.Class loadClass(java.lang.String logName,
java.lang.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 situationWcmException - if the class cannot be loaded.
public static java.lang.reflect.Constructor loadConstructor(java.lang.String logName,
java.lang.Class classObject,
java.lang.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 java.lang.reflect.Method loadMethod(java.lang.String logName,
java.lang.Class classObject,
java.lang.String methodName,
java.lang.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 java.lang.Object callMethod(java.lang.String logName,
java.lang.Object object,
java.lang.reflect.Method method,
java.lang.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 java.lang.Object callStaticMethod(java.lang.String logName,
java.lang.reflect.Method method,
java.lang.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 java.lang.Object newObject(java.lang.String logName,
java.lang.reflect.Constructor constructor,
java.lang.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 situationWcmException - if the object cannot be created.
public static java.util.Properties getSubProperties(java.util.Properties properties,
java.lang.String base)
base - a String with the prefix for the desired
properties.properties - TBD: Description of the incoming method parameterProperties 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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||