Package javax.xml.xquery
Class XQStackTraceElement
- java.lang.Object
-
- javax.xml.xquery.XQStackTraceElement
-
- All Implemented Interfaces:
java.io.Serializable
public class XQStackTraceElement extends java.lang.Object implements java.io.SerializableThis class represents a frame in a stack trace, akin to thejava.lang.StackTraceElementbut for XQuery callstacks instead of Java.
-
-
Constructor Summary
Constructors Constructor Description XQStackTraceElement(java.lang.String moduleURI, int line, int column, int position, javax.xml.namespace.QName function, XQStackTraceVariable[] variables)Construct anXQStackTraceElementobject representing a frame in a stack trace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()Gets the column number in the query string containing the execution point represented by this stack trace element.javax.xml.namespace.QNamegetFunctionQName()Gets theQNameof the function in which the error occurred, ornullif it occurred outside an enclosing function (in a main module).intgetLineNumber()Gets the line number in the query string containing the execution point represented by this stack trace element.java.lang.StringgetModuleURI()Gets the module URI containing the execution point represented by this stack trace element.intgetPosition()Gets the character position in the query string containing the execution point represented by this stack trace element.XQStackTraceVariable[]getVariables()Gets the variables in scope at this execution point, ornullif no variable value retrieval is possible.
-
-
-
Constructor Detail
-
XQStackTraceElement
public XQStackTraceElement(java.lang.String moduleURI, int line, int column, int position, javax.xml.namespace.QName function, XQStackTraceVariable[] variables)Construct anXQStackTraceElementobject representing a frame in a stack trace.- Parameters:
moduleURI- the module URI containing the execution point representing the stack trace element.nullwhen it is the main module or when the module is unknownline- the line number in the query string where the error occured. Line numbering starts at1.-1if unknowncolumn- the column number in the query string where the error occured. Column numbering starts at1.-1if unknownposition- the position in the query string where the error occured. This is a0based position.-1if unknownfunction- theQNameof the function in which the exception occurred, ornullif it occurred outside an enclosing functionvariables- the variables in scope at this execution point, ornullif no variable value retrieval is possible
-
-
Method Detail
-
getModuleURI
public java.lang.String getModuleURI()
Gets the module URI containing the execution point represented by this stack trace element.nullwhen it is the main module or when the module is unknown.- Returns:
- the module URI containing the excution point
represented by the stack trace element or
null
-
getPosition
public int getPosition()
Gets the character position in the query string containing the execution point represented by this stack trace element. This is a0based position.-1if unknown.- Returns:
- the character position in the query string containing the execution point represented by the stack trace element
-
getLineNumber
public int getLineNumber()
Gets the line number in the query string containing the execution point represented by this stack trace element. Line numbering starts at1.-1is returned if the line number is unknown. If the implementation does not support this method, it must return-1- Returns:
- the line number in the query string containing the execution point represented by the stack trace element
-
getColumnNumber
public int getColumnNumber()
Gets the column number in the query string containing the execution point represented by this stack trace element. Column numbering starts at1.-1is returned if the column number is unknown. If the implementation does not support this method, it must return-1- Returns:
- the column number in the query string containing the execution point represented by the stack trace element
-
getFunctionQName
public javax.xml.namespace.QName getFunctionQName()
Gets theQNameof the function in which the error occurred, ornullif it occurred outside an enclosing function (in a main module).- Returns:
- the
QNameof the function in which the error occurred for this stack element ornullif it occurred outside an enclosing function
-
getVariables
public XQStackTraceVariable[] getVariables()
Gets the variables in scope at this execution point, ornullif no variable value retrieval is possible.- Returns:
- the variables in scope at this execution point, or
nullif no variable value retrieval is possible.
-
-