com.quadrique.jbuildingblocks.core.interpreter
Class JbbJavaInterpreter
java.lang.Object
com.quadrique.jbuildingblocks.core.interpreter.JbbJavaInterpreter
public class JbbJavaInterpreter
- extends Object
This class is used to manipulate java classes
- Version:
- 1.0.0
- Author:
- Hervé Rivere
newInstance
public static JbbJavaInterpreter newInstance()
- Returns:
- a new instance
findAndExecuteMethodInScript
public Object findAndExecuteMethodInScript(String zScriptSourceCode,
String zMethodName,
Class<?>[] zMethodArgumentsClass,
Object[] zMethodArguments)
throws JbbInvalidArgumentException,
JbbScriptEvaluationException,
NoSuchMethodException
- RVRV see test code for samples...
- Parameters:
zScriptSourceCode - the source code string. It cannot be null or emptyzMethodName - the name of the method to find in the given zSourceCode string and to execute. It cannot be null or emptyzMethodArgumentsClass - an array that contains the class of the arguments of the method to find and execute.
zMethodName and zMethodArgumentsClass are used to properly match the desired method signature.zMethodArguments -
- Returns:
- object
- Throws:
JbbInvalidArgumentException
JbbScriptEvaluationException
NoSuchMethodException
findAndExecuteMethodInScript
public Object findAndExecuteMethodInScript(String zScriptSourceCode,
String zMethodName,
Class<?>[] zMethodArgumentsClass,
Object[] zMethodArguments,
bsh.Interpreter zInterpreter)
throws JbbInvalidArgumentException,
JbbScriptEvaluationException,
NoSuchMethodException
- Parameters:
zScriptSourceCode - zMethodName - zMethodArgumentsClass - zMethodArguments - zInterpreter - to be able to set/get variables in the context before evaluating the script
- Returns:
- object
- Throws:
JbbInvalidArgumentException
JbbScriptEvaluationException
NoSuchMethodException
Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.