Class Dim.SourceInfo
java.lang.Object
org.htmlunit.corejs.javascript.tools.debugger.Dim.SourceInfo
- Enclosing class:
Dim
Class to store information about a script source.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean[]
Array indicating which lines can have breakpoints set.private boolean[]
Array indicating whether a breakpoint is set on the line.private static final boolean[]
An empty array of booleans.private Dim.FunctionSource[]
Array of FunctionSource objects for the functions in the script.private String
The script.private String
The URL of the script. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SourceInfo
(String source, DebuggableScript[] functions, String normilizedUrl) Creates a new SourceInfo object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
breakableLine
(int line) Returns whether the given line number can have a breakpoint set on it.boolean
breakpoint
(int line) Returns whether there is a breakpoint set on the given line.boolean
breakpoint
(int line, boolean value) Sets or clears the breakpoint flag for the given line.private void
Copies the breakpoints from the given SourceInfo object into this one.functionSource
(int i) Returns the FunctionSource object with the given index.int
Returns the number of FunctionSource objects stored in this object.void
Removes all breakpoints from the script.source()
Returns the source text.url()
Returns the script's origin URL.
-
Field Details
-
EMPTY_BOOLEAN_ARRAY
private static final boolean[] EMPTY_BOOLEAN_ARRAYAn empty array of booleans. -
source
The script. -
url
The URL of the script. -
breakableLines
private boolean[] breakableLinesArray indicating which lines can have breakpoints set. -
breakpoints
private boolean[] breakpointsArray indicating whether a breakpoint is set on the line. -
functionSources
Array of FunctionSource objects for the functions in the script.
-
-
Constructor Details
-
SourceInfo
Creates a new SourceInfo object.
-
-
Method Details
-
source
Returns the source text. -
url
Returns the script's origin URL. -
functionSourcesTop
public int functionSourcesTop()Returns the number of FunctionSource objects stored in this object. -
functionSource
Returns the FunctionSource object with the given index. -
copyBreakpointsFrom
Copies the breakpoints from the given SourceInfo object into this one. -
breakableLine
public boolean breakableLine(int line) Returns whether the given line number can have a breakpoint set on it. -
breakpoint
public boolean breakpoint(int line) Returns whether there is a breakpoint set on the given line. -
breakpoint
public boolean breakpoint(int line, boolean value) Sets or clears the breakpoint flag for the given line. -
removeAllBreakpoints
public void removeAllBreakpoints()Removes all breakpoints from the script.
-