01: package ch.ethz.prose.jvmai.jikesrvm.stub_weaver;
02:
03: import com.ibm.JikesRVM.VM_JVMAI;
04: import java.lang.reflect.Field;
05: import ch.ethz.jvmai.*;
06:
07: /**
08: * Concrete implementation of a CodeJoinPoint for the Jikes RVM.
09: *
10: * @author Johann Gyger
11: */
12: public class FieldJoinPointImpl extends CodeJoinPointImpl implements
13: FieldJoinPoint {
14:
15: /**
16: * Field ID of the field to which this join point belongs
17: */
18: public int fieldId = -1;
19:
20: /**
21: * Field frame pointer. Used to retrieve the field target.
22: */
23: public int fieldFp = -1;
24:
25: /**
26: * The target of a field join point differs from the target of a code join
27: * point: It is actually the owner of the field. See
28: * {@link com.ibm.JikesRVM.VM_JVMAI#getFieldTarget()}for more information.
29: */
30: public Object getTarget() {
31: return VM_JVMAI.getInstance().getFieldTarget(this );
32: }
33:
34: public Field getField() {
35: return VM_JVMAI.getInstance().getField(this );
36: }
37:
38: public Object getValue() {
39: return VM_JVMAI.getInstance().getFieldValue(this);
40: }
41:
42: }
|