Interface IPropertyAccessRecorder
- All Known Implementing Classes:
PropertyAccessRecorder
public interface IPropertyAccessRecorder
A PropertyAccessRecorder can be attached to an
IEolContext
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 using
startRecording()
and ended with stopRecording()
.
Property accesses for the most recently started session are available
from getPropertyAccesses()
. Clients that wish to access
property accesses from earlier recording sessions are expected to
call getPropertyAccesses()
and store the resulting value
before calling startRecording()
.-
Method Summary
Modifier and TypeMethodDescriptionReturns the property accesses that have occurred in the most recently started recording session.void
Tells thePropertyAccessRecorder
that a property access for the specified model element and property name has occurred.void
Tells the PropertyAccessRecorder to start a new recording session.void
Tells the PropertyAccessRecorder to finalise the current recording session.
-
Method Details
-
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
Tells thePropertyAccessRecorder
that a property access for the specified model element and property name has occurred.
-