blob: 11597386cf104d933acdf728d9a1bf26d379c210 (
plain) (
tree)
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0) on Thu Mar 06 17:19:15 EST 2008 -->
<TITLE>
DebuggableScript (Rhino)
</TITLE>
<META NAME="date" CONTENT="2008-03-06">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DebuggableScript (Rhino)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/mozilla/javascript/debug/DebuggableScript.html" target="_top"><B>FRAMES</B></A>
<A HREF="DebuggableScript.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.mozilla.javascript.debug</FONT>
<BR>
Interface DebuggableScript</H2>
<HR>
<DL>
<DT><PRE>public interface <B>DebuggableScript</B></DL>
</PRE>
<P>
This interface exposes debugging information from executable
code (either functions or top-level scripts).
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html" title="interface in org.mozilla.javascript.debug">DebuggableScript</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getFunction(int)">getFunction</A></B>(int index)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getFunctionCount()">getFunctionCount</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getFunctionName()">getFunctionName</A></B>()</CODE>
<BR>
Get name of the function described by this script.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getLineNumbers()">getLineNumbers</A></B>()</CODE>
<BR>
Get array containing the line numbers that
that can be passed to <code>DebugFrame.onLineChange()<code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamAndVarCount()">getParamAndVarCount</A></B>()</CODE>
<BR>
Get number of declared parameters and local variables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamCount()">getParamCount</A></B>()</CODE>
<BR>
Get number of declared parameters in the function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamOrVarName(int)">getParamOrVarName</A></B>(int index)</CODE>
<BR>
Get name of a declared parameter or local variable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html" title="interface in org.mozilla.javascript.debug">DebuggableScript</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParent()">getParent</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getSourceName()">getSourceName</A></B>()</CODE>
<BR>
Get the name of the source (usually filename or URL)
of the script.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#isFunction()">isFunction</A></B>()</CODE>
<BR>
Returns true if this is a function, false if it is a script.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#isGeneratedScript()">isGeneratedScript</A></B>()</CODE>
<BR>
Returns true if this script or function were runtime-generated
from JavaScript using <tt>eval</tt> function or <tt>Function</tt>
or <tt>Script</tt> constructors.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#isTopLevel()">isTopLevel</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="isTopLevel()"><!-- --></A><H3>
isTopLevel</H3>
<PRE>
boolean <B>isTopLevel</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isFunction()"><!-- --></A><H3>
isFunction</H3>
<PRE>
boolean <B>isFunction</B>()</PRE>
<DL>
<DD>Returns true if this is a function, false if it is a script.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFunctionName()"><!-- --></A><H3>
getFunctionName</H3>
<PRE>
java.lang.String <B>getFunctionName</B>()</PRE>
<DL>
<DD>Get name of the function described by this script.
Return null or an empty string if this script is not a function.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getParamCount()"><!-- --></A><H3>
getParamCount</H3>
<PRE>
int <B>getParamCount</B>()</PRE>
<DL>
<DD>Get number of declared parameters in the function.
Return 0 if this script is not a function.
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamAndVarCount()"><CODE>getParamAndVarCount()</CODE></A>,
<A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamOrVarName(int)"><CODE>getParamOrVarName(int index)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getParamAndVarCount()"><!-- --></A><H3>
getParamAndVarCount</H3>
<PRE>
int <B>getParamAndVarCount</B>()</PRE>
<DL>
<DD>Get number of declared parameters and local variables.
Return number of declared global variables if this script is not a
function.
<P>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamCount()"><CODE>getParamCount()</CODE></A>,
<A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamOrVarName(int)"><CODE>getParamOrVarName(int index)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getParamOrVarName(int)"><!-- --></A><H3>
getParamOrVarName</H3>
<PRE>
java.lang.String <B>getParamOrVarName</B>(int index)</PRE>
<DL>
<DD>Get name of a declared parameter or local variable.
<tt>index</tt> should be less then <A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamAndVarCount()"><CODE>getParamAndVarCount()</CODE></A>.
If <tt>index < <A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html#getParamCount()"><CODE>getParamCount()</CODE></A></tt>, return
the name of the corresponding parameter, otherwise return the name
of variable.
If this script is not function, return the name of the declared
global variable.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSourceName()"><!-- --></A><H3>
getSourceName</H3>
<PRE>
java.lang.String <B>getSourceName</B>()</PRE>
<DL>
<DD>Get the name of the source (usually filename or URL)
of the script.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isGeneratedScript()"><!-- --></A><H3>
isGeneratedScript</H3>
<PRE>
boolean <B>isGeneratedScript</B>()</PRE>
<DL>
<DD>Returns true if this script or function were runtime-generated
from JavaScript using <tt>eval</tt> function or <tt>Function</tt>
or <tt>Script</tt> constructors.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getLineNumbers()"><!-- --></A><H3>
getLineNumbers</H3>
<PRE>
int[] <B>getLineNumbers</B>()</PRE>
<DL>
<DD>Get array containing the line numbers that
that can be passed to <code>DebugFrame.onLineChange()<code>.
Note that line order in the resulting array is arbitrary
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFunctionCount()"><!-- --></A><H3>
getFunctionCount</H3>
<PRE>
int <B>getFunctionCount</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFunction(int)"><!-- --></A><H3>
getFunction</H3>
<PRE>
<A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html" title="interface in org.mozilla.javascript.debug">DebuggableScript</A> <B>getFunction</B>(int index)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
<A HREF="../../../../org/mozilla/javascript/debug/DebuggableScript.html" title="interface in org.mozilla.javascript.debug">DebuggableScript</A> <B>getParent</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/mozilla/javascript/debug/DebuggableScript.html" target="_top"><B>FRAMES</B></A>
<A HREF="DebuggableScript.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|