Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.util
Class CodeLocation

java.lang.Object
  extended by com.ibm.spatial.util.CodeLocation
All Implemented Interfaces:
EventLocation

public class CodeLocation
extends java.lang.Object
implements EventLocation

Implements the EventLocation interface for getting error location in the code: class name and method name.


Field Summary
 
Fields inherited from interface com.ibm.spatial.EventLocation
CODE
 
Constructor Summary
CodeLocation()
           
CodeLocation(java.lang.String className, java.lang.String methodName)
           
 
Method Summary
 int getColumnNumber()
          This method returns EventLocation.CODE to indicate that this object refers to code rather than data location.
 java.lang.String getEntityId()
          The return value is the name of the class where the event is triggered.
 int getLineNumber()
          Return -1.
 java.lang.String getSubEntityId()
          The return value is the name of the method in which the event is triggered.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeLocation

public CodeLocation()

CodeLocation

public CodeLocation(java.lang.String className,
                    java.lang.String methodName)
Method Detail

getEntityId

public java.lang.String getEntityId()

The return value is the name of the class where the event is triggered.

Specified by:
getEntityId in interface EventLocation
Returns:
A string containing the class name.
See Also:
EventLocation.CODE

getSubEntityId

public java.lang.String getSubEntityId()

The return value is the name of the method in which the event is triggered.

Specified by:
getSubEntityId in interface EventLocation
Returns:
A string containing the method name.
See Also:
EventLocation.CODE

getLineNumber

public int getLineNumber()

Return -1. This implementation doesn't hold line number information.

Specified by:
getLineNumber in interface EventLocation
Returns:
-1
See Also:
EventLocation.getColumnNumber()

getColumnNumber

public int getColumnNumber()
This method returns EventLocation.CODE to indicate that this object refers to code rather than data location.

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

Spatial DataBlade
JAVA API v8.21


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