org.eclipse.ocl.examples.debug.vm.utils
Class VMStackTraceElement

java.lang.Object
  extended by org.eclipse.ocl.examples.debug.vm.utils.VMStackTraceElement
All Implemented Interfaces:
IVMStackTraceElement

public final class VMStackTraceElement
extends java.lang.Object
implements IVMStackTraceElement


Constructor Summary
VMStackTraceElement(java.lang.String moduleName, java.lang.String operationName, java.lang.String unitQName, int lineNumber)
          Creates a stack trace element representing the specified execution point.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getLineNumber()
          Returns the line number of the source line containing the execution point represented by this stack trace element.
 java.lang.String getModuleName()
          Gets the name of the executed module.
 java.lang.String getOperationName()
          Gets the name of the operation associated with this trace element.
 java.lang.String getUnitName()
          Gets the name of the the unit containing the execution point.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VMStackTraceElement

public VMStackTraceElement(java.lang.String moduleName,
                           java.lang.String operationName,
                           java.lang.String unitQName,
                           int lineNumber)
Creates a stack trace element representing the specified execution point.

Throws:
java.lang.NullPointerException - if fModuleName or fOperationName is null
Since:
1.5
Method Detail

getUnitName

public java.lang.String getUnitName()
Description copied from interface: IVMStackTraceElement
Gets the name of the the unit containing the execution point.

Specified by:
getUnitName in interface IVMStackTraceElement
Returns:
the name string

getLineNumber

public int getLineNumber()
Description copied from interface: IVMStackTraceElement
Returns the line number of the source line containing the execution point represented by this stack trace element.

Specified by:
getLineNumber in interface IVMStackTraceElement
Returns:
the line number of the source line containing the execution point represented by this stack trace element, or a negative number if this information is unavailable.

getModuleName

public java.lang.String getModuleName()
Description copied from interface: IVMStackTraceElement
Gets the name of the executed module.

Specified by:
getModuleName in interface IVMStackTraceElement
Returns:
the name string or null, in case the executed code is not part of any module, for instance a condition of a top level modeltype element.

getOperationName

public java.lang.String getOperationName()
Description copied from interface: IVMStackTraceElement
Gets the name of the operation associated with this trace element.

Remark:
It's possible that the name does not refer to an operation explicitly defined in OCL, but rather to a synthesized one.

Specified by:
getOperationName in interface IVMStackTraceElement
Returns:
the name string

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object