org.apache.bsf.util
public class EngineUtils extends Object
Method Summary | |
---|---|
static void | addEventListener(Object bean, String eventSetName, String filter, BSFEngine engine, BSFManager manager, String source, int lineNo, int columnNo, Object script)
Add a script as a listener to some event coming out of an object. |
static Object | callBeanMethod(Object bean, String methodName, Object[] args)
Finds and invokes a method with the given signature on the given
bean. |
static Object | createBean(String className, Object[] args)
Creates a new bean. |
static String | getTypeSignatureString(Class cl)
Given a class return the type signature string fragment for it.
|
static Class | loadClass(BSFManager mgr, String name)
Load a class using the class loader of given manager. |
Parameters: bean event source eventSetName name of event set from event src to bind to filter filter for events engine BSFEngine which can run this script manager BSFManager of the above engine source (context info) the source of this expression (e.g., filename) lineNo (context info) the line number in source for expr columnNo (context info) the column number in source for expr script the script to execute when the event occurs
Throws: BSFException if anything goes wrong while running the script
Parameters: bean the object on which to invoke the method methodName name of the method args arguments to be given to the method
Returns: the result of invoking the method, if any
Throws: BSFException if something goes wrong
Parameters: className fully qualified name of class to instantiate args array of constructor args (or null if none)
Returns: the created bean
Throws: BSFException if something goes wrong (@see org.apache.cs.util.MethodUtils for the real exceptions that can occur).
Parameters: cl class object for whom the signature fragment is needed.
Returns: the string representing the type signature
Parameters: mgr BSFManager who's classLoader and tempDir props are consulted name name of the class to load
Returns: the loaded class
Throws: BSFException if something goes wrong.