org.apache.bsf.engines.javascript
Class CompilationUnit
java.lang.Object
org.apache.bsf.engines.javascript.CompilationUnit
public class CompilationUnit
- extends java.lang.Object
A compilation unit is a Rhino concept.
When a piece of script is provided for eval or
execute to a Rhino engine, it is compiled down
to either JavaScript or Java bytecode.
In debug mode, only the compilation down to JavaScript
bytecode is supported.
During the compilation process, the original piece
of script is sliced into compilation units.
For instance, the script text may contain a function
declaration and an expression to eval. The compilation
will result in two compilation units: the function and
the expression. Each compilation unit will correspond
to a range of the lines of the original script compiled.
All line numbers are global to the document the compiled
script is part of.
It is on compilation units that breakpoints can be set
or removed, more exactly on the DebuggableScript attached
to them. See Rhino for more details.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompilationUnit
public CompilationUnit(FnOrScript fnOrScript,
DebuggableScript dbgScript)
- CompilationUnit constructor comment.