Class Dim.SourceInfo
- java.lang.Object
-
- org.htmlunit.corejs.javascript.tools.debugger.Dim.SourceInfo
-
- Enclosing class:
- Dim
public static class Dim.SourceInfo extends java.lang.ObjectClass to store information about a script source.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean[]breakableLinesArray indicating which lines can have breakpoints set.private boolean[]breakpointsArray indicating whether a breakpoint is set on the line.private static boolean[]EMPTY_BOOLEAN_ARRAYAn empty array of booleans.private Dim.FunctionSource[]functionSourcesArray of FunctionSource objects for the functions in the script.private java.lang.StringsourceThe script.private java.lang.StringurlThe URL of the script.
-
Constructor Summary
Constructors Modifier Constructor Description privateSourceInfo(java.lang.String source, DebuggableScript[] functions, java.lang.String normilizedUrl)Creates a new SourceInfo object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbreakableLine(int line)Returns whether the given line number can have a breakpoint set on it.booleanbreakpoint(int line)Returns whether there is a breakpoint set on the given line.booleanbreakpoint(int line, boolean value)Sets or clears the breakpoint flag for the given line.private voidcopyBreakpointsFrom(Dim.SourceInfo old)Copies the breakpoints from the given SourceInfo object into this one.Dim.FunctionSourcefunctionSource(int i)Returns the FunctionSource object with the given index.intfunctionSourcesTop()Returns the number of FunctionSource objects stored in this object.voidremoveAllBreakpoints()Removes all breakpoints from the script.java.lang.Stringsource()Returns the source text.java.lang.Stringurl()Returns the script's origin URL.
-
-
-
Field Detail
-
EMPTY_BOOLEAN_ARRAY
private static final boolean[] EMPTY_BOOLEAN_ARRAY
An empty array of booleans.
-
source
private java.lang.String source
The script.
-
url
private java.lang.String url
The URL of the script.
-
breakableLines
private boolean[] breakableLines
Array indicating which lines can have breakpoints set.
-
breakpoints
private boolean[] breakpoints
Array indicating whether a breakpoint is set on the line.
-
functionSources
private Dim.FunctionSource[] functionSources
Array of FunctionSource objects for the functions in the script.
-
-
Constructor Detail
-
SourceInfo
private SourceInfo(java.lang.String source, DebuggableScript[] functions, java.lang.String normilizedUrl)Creates a new SourceInfo object.
-
-
Method Detail
-
source
public java.lang.String source()
Returns the source text.
-
url
public java.lang.String url()
Returns the script's origin URL.
-
functionSourcesTop
public int functionSourcesTop()
Returns the number of FunctionSource objects stored in this object.
-
functionSource
public Dim.FunctionSource functionSource(int i)
Returns the FunctionSource object with the given index.
-
copyBreakpointsFrom
private void copyBreakpointsFrom(Dim.SourceInfo old)
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.
-
-