Spatial DataBlade
JAVA API v8.21

com.ibm.spatial
Interface EventLocation

All Known Implementing Classes:
CodeLocation

public interface EventLocation

Interface for associating an event with a program or data location.

If the API or a plugin provides event location information to the application, it does so by implementing this interface. The application can use this interface to obtain the location of any event that gets triggered.

Note that the results returned by the object will be valid only during the scope of each API method: the application will receive unpredictable results if it attempts to use the event location at any other time.


Field Summary
static int CODE
          If this value is returned by the method getColumnNumber, then this object refers to a code location.
 
Method Summary
 int getColumnNumber()
          Returns the column number where the current event ends.
 java.lang.String getEntityId()
          The return value is the identifier of the entity in which the event is triggered.
 int getLineNumber()
          Return the line number where the current event occurs.
 java.lang.String getSubEntityId()
          The return value is the identifier of the subentity in which the event is triggered.
 

Field Detail

CODE

static final int CODE
If this value is returned by the method getColumnNumber, then this object refers to a code location. The method getEntityId returns the name of the class related to this event location, and getSubEntityId returns the name of the method related to this event location.

See Also:
getColumnNumber(), getEntityId(), getSubEntityId(), Constant Field Values
Method Detail

getEntityId

java.lang.String getEntityId()

The return value is the identifier of the entity in which the event is triggered.

For example, if an error occurs while parsing a file, the the entity identifier is simply the file name. If an error is located in the context of the API's code, then the class name would be the entity identifier.

Returns:
A string containing the identifier, or null if none is available.
See Also:
CODE

getSubEntityId

java.lang.String getSubEntityId()

The return value is the identifier of the subentity in which the event is triggered.

In a code context, the subentity is the method name where an event occurs.

Returns:
A string containing the identifier, or null if none is available.
See Also:
CODE

getLineNumber

int getLineNumber()

Return the line number where the current event occurs.

The return value is an approximation of the line number in the document entity where the event is triggered.

If possible, the implementor should provide the line position of the first character after the text associated with the event. The first line in the document is line 1.

Returns:
The line number, or -1 if none is available.
See Also:
getColumnNumber()

getColumnNumber

int getColumnNumber()
Returns the column number where the current event ends.

The return value is an approximation of the column number in the document entity where the event is triggered.

If possible, the implementor should provide the column position of the first character after the text associated with the event. The first column in a line is column 1.

This method returns EventLocation.CODE to indicate that this object refers to code rather than data location.

Returns:
The column number, -1 if none is available, or CODE to indicate a code context.
See Also:
getLineNumber(), CODE

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.