| java.lang.Object org.andromda.scriptwrappers.BshScriptWrapper
BshScriptWrapper | public class BshScriptWrapper (Code) | | This is a wrapper class for a BeanShell script. The generated Java classes contain a private
final copy of this wrapper and delegates all methods to this class so that their BeanShell-counterparts
can be executed.
author: Chad Brandon |
Constructor Summary | |
public | BshScriptWrapper(Object stub, String scriptPath) StubClass is always the generated class (not any subclasses),
while stub may be an instance of a subclassed scripted class. |
Method Summary | |
protected static void | copyProperties(Object from, Object to) Copies all properties from the given from instance to the given
to instance. | public Object | invoke(String methodName, Object[] args) Invokes the method with the given methodName on the instance.
Parameters: methodName - the name of the method to invoke. Parameters: args - the arguments to pass to the method. |
BshScriptWrapper | public BshScriptWrapper(Object stub, String scriptPath) throws java.lang.InstantiationError(Code) | | StubClass is always the generated class (not any subclasses),
while stub may be an instance of a subclassed scripted class.
|
copyProperties | protected static void copyProperties(Object from, Object to) throws Exception(Code) | | Copies all properties from the given from instance to the given
to instance.
Parameters: from - the instance from which to copy all properties. Parameters: to - the instance of which to copy all properties. throws: Exception - |
invoke | public Object invoke(String methodName, Object[] args)(Code) | | Invokes the method with the given methodName on the instance.
Parameters: methodName - the name of the method to invoke. Parameters: args - the arguments to pass to the method. the return result of invoking the operation. |
|
|