|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.commons.configuration.utils.ClassWrapper
public class ClassWrapper
Utility class that can instantiate and call methods of some class through reflection
Field Summary | |
---|---|
java.lang.Object |
Instance
The instance created |
java.lang.Class<?> |
ModuleClass
The class loaded |
Constructor Summary | |
---|---|
ClassWrapper(java.util.Map<java.lang.String,IParameter> Params)
Creates a new instance |
Method Summary | |
---|---|
void |
Instantiate(java.lang.String ModuleName,
Constructor ConstructorToUse)
Creates a new instance of the provided class |
void |
Invoke(Method MethodToInvoke)
Invokes a method of the created instance if the class was instantiated or a static method if no instantiation was performed |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.Object Instance
public java.lang.Class<?> ModuleClass
Constructor Detail |
---|
public ClassWrapper(java.util.Map<java.lang.String,IParameter> Params)
Params
- The parameters that are available and can be used to retrieve and set valuesMethod Detail |
---|
public void Instantiate(java.lang.String ModuleName, Constructor ConstructorToUse) throws java.lang.Exception
ModuleName
- The class that should be instantiatedConstructorToUse
- The constructor of the class to use
java.lang.Exception
- The instantiation could not be performedpublic void Invoke(Method MethodToInvoke) throws java.lang.Exception
MethodToInvoke
- The method to invoke
java.lang.Exception
- The invocation could not be performed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |