|
||||||||||
| 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 | |
|---|---|
Object |
Instance
The instance created |
Class<?> |
ModuleClass
The class loaded |
| Constructor Summary | |
|---|---|
ClassWrapper(Map<String,IParameter> Params)
Creates a new instance |
|
| Method Summary | |
|---|---|
void |
Instantiate(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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Object Instance
public Class<?> ModuleClass
| Constructor Detail |
|---|
public ClassWrapper(Map<String,IParameter> Params)
Params - The parameters that are available and can be used to retrieve and set values| Method Detail |
|---|
public void Instantiate(String ModuleName,
Constructor ConstructorToUse)
throws Exception
ModuleName - The class that should be instantiatedConstructorToUse - The constructor of the class to use
Exception - The instantiation could not be performed
public void Invoke(Method MethodToInvoke)
throws Exception
MethodToInvoke - The method to invoke
Exception - The invocation could not be performed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||