Interface IPropertyAccessRecorder

  • All Known Implementing Classes:

    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: `` 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 Detail

      • startRecording

        void startRecording()
        Tells the PropertyAccessRecorder to start a new recording session. Any subsequent notifications of property accesses are recorded and are accessible via getPropertyAccesses(). Property accesses from any previous recording session are disregarded (i.e., are no longer accessible from getPropertyAccesses())
      • stopRecording

        void stopRecording()
        Tells the PropertyAccessRecorder to finalise the current recording session. Any subsequent notifications of property accesses are not recorded, until startRecording() is called. Property accesses from the ended recording session are available via getPropertyAccesses().
      • getPropertyAccesses

        PropertyAccesses getPropertyAccesses()
        Returns the property accesses that have occurred in the most recently started recording session.
      • record

        void record​(Object modelElement,
                    String propertyName)
        Tells the PropertyAccessRecorder that a property access for the specified model element and property name has occurred.