Package org.mozilla.javascript.debug
Interface DebuggableScript
- 
 public interface DebuggableScriptThis interface exposes debugging information from executable code (either functions or top-level scripts).
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description DebuggableScriptgetFunction(int index)intgetFunctionCount()java.lang.StringgetFunctionName()Get name of the function described by this script.int[]getLineNumbers()Get array containing the line numbers that that can be passed toDebugFrame.onLineChange().intgetParamAndVarCount()Get number of declared parameters and local variables.intgetParamCount()Get number of declared parameters in the function.java.lang.StringgetParamOrVarName(int index)Get name of a declared parameter or local variable.DebuggableScriptgetParent()java.lang.StringgetSourceName()Get the name of the source (usually filename or URL) of the script.booleanisFunction()Returns true if this is a function, false if it is a script.booleanisGeneratedScript()Returns true if this script or function were runtime-generated from JavaScript usingevalfunction orFunctionorScriptconstructors.booleanisTopLevel()
 
- 
- 
- 
Method Detail- 
isTopLevelboolean isTopLevel() 
 - 
isFunctionboolean isFunction() Returns true if this is a function, false if it is a script.
 - 
getFunctionNamejava.lang.String getFunctionName() Get name of the function described by this script. Return null or an empty string if this script is not a function.
 - 
getParamCountint getParamCount() Get number of declared parameters in the function. Return 0 if this script is not a function.
 - 
getParamAndVarCountint getParamAndVarCount() Get number of declared parameters and local variables. Return number of declared global variables if this script is not a function.- See Also:
- getParamCount(),- getParamOrVarName(int index)
 
 - 
getParamOrVarNamejava.lang.String getParamOrVarName(int index) Get name of a declared parameter or local variable.indexshould be less thengetParamAndVarCount(). Ifindex <, 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.getParamCount()
 - 
getSourceNamejava.lang.String getSourceName() Get the name of the source (usually filename or URL) of the script.
 - 
isGeneratedScriptboolean isGeneratedScript() Returns true if this script or function were runtime-generated from JavaScript usingevalfunction orFunctionorScriptconstructors.
 - 
getLineNumbersint[] getLineNumbers() Get array containing the line numbers that that can be passed toDebugFrame.onLineChange(). Note that line order in the resulting array is arbitrary
 - 
getFunctionCountint getFunctionCount() 
 - 
getFunctionDebuggableScript getFunction(int index) 
 - 
getParentDebuggableScript getParent() 
 
- 
 
-