Save This Page
Home » bsf-src-2.4.0 » org.apache.bsf.engines.javascript » [javadoc | source]
org.apache.bsf.engines.javascript
public class: CompilationUnit [javadoc | source]
java.lang.Object
   org.apache.bsf.engines.javascript.CompilationUnit
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.
Field Summary
 FnOrScript m_fnOrScript     
 int m_firstLine     
 int m_lineCount     
 String m_fnName     
 DebuggableScript m_dbgScript     
 int[] m_validBrkptLines     
Constructor:
 public CompilationUnit(FnOrScript fnOrScript,
    DebuggableScript dbgScript) 
    CompilationUnit constructor comment.
Method from org.apache.bsf.engines.javascript.CompilationUnit Summary:
contains,   contains,   propagate,   unpropagate
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.bsf.engines.javascript.CompilationUnit Detail:
 boolean contains(int lineno) 
 boolean contains(BreakPoint bp) 
    Returns true if the compilation unit contains the breakpoint. Notice only breakpoint defined at a line number are supported here.
  void propagate(int lineno) 
    Propagates (i.e. set) this breakpoint to the underlying Rhino engine if Rhino has provided us with the valid lines information. Otherwise, Rhino crashes with a NullPointerException.
  void unpropagate(int lineno) 
    Unpropagates (i.e. unset) this breakpoint to the underlying Rhino engine if Rhino has provided us with the valid lines information. Otherwise, Rhino crashes with a NullPointerException.