Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.javatools.parser.java.v2.model
Interface SourceError

All Superinterfaces:
Element, SourceElement

public interface SourceError
extends SourceElement

An error found in the parse tree.


Field Summary
static SourceError[] EMPTY_ARRAY
           
 
Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT
 
Method Summary
 int getErrorCategory()
          Gets the error category of this error.
 short getErrorCode()
          Gets the numeric code describing this error.
 int getErrorData0()
          Deprecated. Use getErrorIntData0();
 int getErrorData1()
          Deprecated. Use getErrorIntData1();
 int getErrorIntData0()
          Some error codes are actually more general categories.
 int getErrorIntData1()
          Some error codes are actually more general categories.
 java.lang.String getErrorMessage()
           
 java.lang.Object getErrorRefData(int n)
          Gets the reference data at the specified index.
 java.lang.Object getErrorRefData0()
           
 java.lang.Object getErrorRefData1()
           
 int getErrorSeverity()
          Gets the severity rating of this error.
 SourceElement getErrorSymbol()
          This needs to be a separate method because all errors are currently constructed off of the root and not off of the syntactically enclosing element.
 short getErrorToken()
           
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
addSelf, addSelf, addSelfAfter, addSelfBefore, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf
 

Field Detail

EMPTY_ARRAY

static final SourceError[] EMPTY_ARRAY
Method Detail

getErrorCode

short getErrorCode()
Gets the numeric code describing this error.

Returns:
Valid values are JavaErrors.ERROR_*.
See Also:
JavaErrors

getErrorSeverity

int getErrorSeverity()
Gets the severity rating of this error.

Returns:
Valid values are JavaErrors.SEVERITY_*.

getErrorCategory

int getErrorCategory()
Gets the error category of this error.

Returns:
One of ERROR_CATEGORY_*.

getErrorToken

short getErrorToken()
Returns:
The token at the site of the error.

getErrorMessage

java.lang.String getErrorMessage()
Returns:
The String for this error message.

getErrorData0

@Deprecated
int getErrorData0()
Deprecated. Use getErrorIntData0();


getErrorData1

@Deprecated
int getErrorData1()
Deprecated. Use getErrorIntData1();


getErrorIntData0

int getErrorIntData0()
Some error codes are actually more general categories. An example of that is the ERROR_EXPECTING_ONE. The token that was expected is saved in this error node as data value #0.

Returns:
Integral data value #0.

getErrorIntData1

int getErrorIntData1()
Some error codes are actually more general categories. An example of that is the ERROR_EXPECTING_TWO. The second token of the two expected is saved in this error node as data value #1.

Returns:
Integral data value #1.

getErrorRefData0

java.lang.Object getErrorRefData0()
Returns:
Reference data value #0.

getErrorRefData1

java.lang.Object getErrorRefData1()
Returns:
Reference data value #1.

getErrorRefData

java.lang.Object getErrorRefData(int n)
Gets the reference data at the specified index.

Parameters:
n - 0-based.
Returns:
The specified reference data value, null if unavailabe or not applicable.

getErrorSymbol

SourceElement getErrorSymbol()
This needs to be a separate method because all errors are currently constructed off of the root and not off of the syntactically enclosing element.

Returns:
The node that encloses this error. Will be null if the syntactically enclosing node is for-internal-use-only (should this just return the tree's root for this case or perhaps the most enclosing exported node?).

For example, if this error happens in a class's body, the error symbol returned will be a SourceClass.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.