|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnu.jel.Library
A Library of the methods, callable from compiled expressions.
There are following constraints on the functions in the library classes:
Constructor Summary | |
Library(java.lang.Class[] staticLib,
java.lang.Class[] dynamicLib)
Creates a library for JEL. |
Method Summary | |
boolean |
isStateless(java.lang.Object o)
Used to check if the given method is stateless. |
static void |
main(java.lang.String[] args)
Performs unitary test of the library. |
void |
markStateDependent(java.lang.String name,
java.lang.Class[] params)
This function is itended for marking static function as having the internal state. |
static void |
test(Tester t)
Performs unitary test of the library. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Library(java.lang.Class[] staticLib, java.lang.Class[] dynamicLib)
The following should be kept in mind when constructing a library:
staticLib
- is the array of classes, whose public static
methods are exported.dynamicLib
- is the array of classes, whose public virutal
methods are exported.Method Detail |
public void markStateDependent(java.lang.String name, java.lang.Class[] params) throws java.lang.NoSuchMethodException
If You include java.lang.Math into the library it is necessary to mark java.lang.random() as having the state. This can be done by calling markStateDependent("random",null)
Please specify parameters as close as possible, otherwise You can accidentally mark another function.
name
- is the function name.params
- are the possible invocation parameters of the function.public boolean isStateless(java.lang.Object o)
m
- is method or field to check.public static void main(java.lang.String[] args)
args
- ignored.public static void test(Tester t)
Used if all package is being tested and not just codegen.
t
- Tester to report test results.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |