|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalt.jiapi.event.EventProducer
alt.jiapi.event.FieldEventProducer
public class FieldEventProducer
This class registers itself to Jiapi runtime and tracks field accesses. That is, gets and sets. When either event happens it will notify each listeners that has been registered.
Constructor Summary | |
---|---|
FieldEventProducer(InstrumentationDescriptor id)
Constructor. |
|
FieldEventProducer(InstrumentationDescriptor id,
java.lang.String resolution)
Constructor. |
Method Summary | |
---|---|
void |
addFieldListener(FieldListener fl)
Adds a FieldListener. |
void |
fieldGet(java.lang.Object sourceObject,
java.lang.String fieldName)
This method is called by the Jiapi runtime. |
void |
fieldSet(java.lang.Object sourceObject,
java.lang.String fieldName)
This method is called by the Jiapi runtime. |
protected void |
fireFieldGetEvent(java.lang.Object sourceObject,
java.lang.String fieldName)
Fires an event when a field has been accessed(get). |
protected void |
fireFieldSetEvent(java.lang.Object sourceObject,
java.lang.String fieldName)
Fires an event when a field has been accessed(set). |
void |
removeFieldListener(FieldListener fl)
Removes a FieldListener. |
Methods inherited from class alt.jiapi.event.EventProducer |
---|
getResolutions, isProtected, isProtected, match, protect, release |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldEventProducer(InstrumentationDescriptor id)
id
- Instrumentation decsriptor, that this FieldEventProducer
registers itself to.public FieldEventProducer(InstrumentationDescriptor id, java.lang.String resolution)
id
- Instrumentation decsriptor, that this FieldEventProducer
registers itself to.resolution
- Resolution that is used in deciding whether or not
an event should be produced.Method Detail |
---|
public void addFieldListener(FieldListener fl)
fl
- a FieldListenerpublic void fieldGet(java.lang.Object sourceObject, java.lang.String fieldName)
public void fieldSet(java.lang.Object sourceObject, java.lang.String fieldName)
protected void fireFieldGetEvent(java.lang.Object sourceObject, java.lang.String fieldName)
sourceObject
- fieldName
- Name of the fieldprotected void fireFieldSetEvent(java.lang.Object sourceObject, java.lang.String fieldName)
sourceObject
- fieldName
- Name of the fieldpublic void removeFieldListener(FieldListener fl)
fl
- a FieldListener
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |