This is the interface to Java from the
Bean Scripting Framework.
The Java code must be written script-style -- that is, just the body of
the function, without class or method headers or footers.
The JavaEngine will generate those via a "boilerplate" wrapper:
import java.lang.*;
import java.util.*;
public class $$CLASSNAME$$ {
static public Object BSFJavaEngineEntry(org.apache.bsf.BSFManager bsf) {
// Your code will be placed here
}
}
$$CLASSNAME$$ will be replaced by a generated classname of the form
BSFJava*, and the bsf parameter can be used to retrieve application
objects registered with the Bean Scripting Framework.
If you use the placeholder string $$CLASSNAME$$ elsewhere
in your script -- including within text strings -- BSFJavaEngine will
replace it with the generated name of the class before the Java code
is compiled.
Hazards:
NOTE that it is your responsibility to convert the code into an acceptable
Java string. |