Interface IPropertyAccessRecorder
-
- All Known Implementing Classes:
PropertyAccessRecorder
public interface IPropertyAccessRecorder
A PropertyAccessRecorder can be attached to anIEolContext
in order to be notified when a program execution reads a property value from a model element. For example, execution of the EOL code: `Person.all.first.name` would result in a PropertyAccessRecorder being notified of a property access for the `name` property of the `Person.all.first` model element. Recording is separated into sessions. A session is started usingstartRecording()
and ended withstopRecording()
. Property accesses for the most recently started session are available fromgetPropertyAccesses()
. Clients that wish to access property accesses from earlier recording sessions are expected to callgetPropertyAccesses()
and store the resulting value before callingstartRecording()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PropertyAccesses
getPropertyAccesses()
Returns the property accesses that have occurred in the most recently started recording session.void
record(java.lang.Object modelElement, java.lang.String propertyName)
Tells thePropertyAccessRecorder
that a property access for the specified model element and property name has occurred.void
startRecording()
Tells the PropertyAccessRecorder to start a new recording session.void
stopRecording()
Tells the PropertyAccessRecorder to finalise the current recording session.
-
-
-
Method Detail
-
startRecording
void startRecording()
Tells the PropertyAccessRecorder to start a new recording session. Any subsequent notifications of property accesses are recorded and are accessible viagetPropertyAccesses()
. Property accesses from any previous recording session are disregarded (i.e., are no longer accessible fromgetPropertyAccesses()
)
-
stopRecording
void stopRecording()
Tells the PropertyAccessRecorder to finalise the current recording session. Any subsequent notifications of property accesses are not recorded, untilstartRecording()
is called. Property accesses from the ended recording session are available viagetPropertyAccesses()
.
-
getPropertyAccesses
PropertyAccesses getPropertyAccesses()
Returns the property accesses that have occurred in the most recently started recording session.
-
record
void record(java.lang.Object modelElement, java.lang.String propertyName)
Tells thePropertyAccessRecorder
that a property access for the specified model element and property name has occurred.
-
-