sofya.ed.semantic
Class EventListener.FieldData

java.lang.Object
  extended by sofya.ed.semantic.EventListener.FieldData
Enclosing interface:
EventListener

public static class EventListener.FieldData
extends java.lang.Object

Provides information about a field event.


Method Summary
 java.lang.String getClassName()
          Gets the name of the class in which the field event occurred.
 long getCodeIndex()
          Gets the bytecode offset at which the field event occurred.
 com.sun.jdi.Value getCurrentValue()
          Gets the current value stored in the field that was accessed or modified.
 int getElementIndex()
          Gets the index of the array element to which this field data correlates.
 java.lang.String getFullName()
          Gets the complete name of the field that was accessed or modified.
 int getLineNumber()
          Gets the line number in the source code file of the field event.
 java.lang.String getMethod()
          Gets the name of the method in which the field event occurred.
 java.lang.String getMethodSignature()
          Gets the signature of the method in which the field event occurred.
 java.lang.String getName()
          Gets the short name of the field that was accessed or modified.
 com.sun.jdi.Value getNewValue()
          Gets the new value to be stored in the field that was modified.
 java.lang.String getSignature()
          Gets the signature of the field that was accessed or modified.
 java.lang.String getSourceFile()
          Gets the name of the source code file corresponding to the field event.
 java.lang.String getType()
          Gets the type of the field that was accessed or modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Gets the short name of the field that was accessed or modified.

Returns:
The unqualified name of the field.

getFullName

public java.lang.String getFullName()
Gets the complete name of the field that was accessed or modified.

Returns:
The fully qualified name of the field.

getType

public java.lang.String getType()
Gets the type of the field that was accessed or modified.

Returns:
The type of the field.

getSignature

public java.lang.String getSignature()
Gets the signature of the field that was accessed or modified.

Returns:
The JNI-style signature of the field.

getElementIndex

public int getElementIndex()
Gets the index of the array element to which this field data correlates.

Array element accesses and writes are dispatched as field access and write events, as usual. However, the object information provided with those events corresponds to the array reference, and the relevant element of the array is treated as a field of the array object.

Returns:
The index of the element in the array to which this field correlates, or -1 if this field is not an array element (it is a true field).

getCurrentValue

public com.sun.jdi.Value getCurrentValue()
Gets the current value stored in the field that was accessed or modified.

Returns:
The value currently stored to the field.

getNewValue

public com.sun.jdi.Value getNewValue()
Gets the new value to be stored in the field that was modified. Returns null if this field data object is associated with a field access event.

Returns:
The new value that will be stored to the field.

getClassName

public java.lang.String getClassName()
Gets the name of the class in which the field event occurred.

Returns:
The name of the class in which the field was accessed or modified.

getMethod

public java.lang.String getMethod()
Gets the name of the method in which the field event occurred.

Returns:
The name of the method in which the field was accessed or modified.

getMethodSignature

public java.lang.String getMethodSignature()
Gets the signature of the method in which the field event occurred.

Returns:
The JNI-style signature of the method in which the field was accessed or modified.

getCodeIndex

public long getCodeIndex()
Gets the bytecode offset at which the field event occurred.

Returns:
The bytecode offset within the method of the field access or modification instruction.

getSourceFile

public java.lang.String getSourceFile()
Gets the name of the source code file corresponding to the field event.

Returns:
The name of the source code file which contains the code for the method containing the field access or modification. Returns '<unknown>' if this information is not available.

getLineNumber

public int getLineNumber()
Gets the line number in the source code file of the field event.

Returns:
The line number of the source code statement for the field access or modification, or -1 if this information is unavailable.