org.eclipse.incquery.runtime.localsearch.operations.extend

## Class IterateOverEStructuralFeatureInstances

- java.lang.Object
- - org.eclipse.incquery.runtime.localsearch.operations.extend.IterateOverEStructuralFeatureInstances

- All Implemented Interfaces:
    ISearchOperation

      public class IterateOverEStructuralFeatureInstances
      extends java.lang.Object
      implements ISearchOperation

  Iterates all available `EStructuralFeature` elements using an `EMF-IncQuery Base indexer`. It is assumed that the base indexer has been registered for the selected reference type.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IterateOverEStructuralFeatureInstances(int sourcePosition, int targetPosition, org.eclipse.emf.ecore.EStructuralFeature feature)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `execute(MatchingFrame frame, ISearchContext context)`
    `org.eclipse.emf.ecore.EStructuralFeature` | `getFeature()`
    `java.util.List<java.lang.Integer>` | `getVariablePositions()`
    `void` | `onBacktrack(MatchingFrame frame, ISearchContext context)` After the execution of the operation failed and `ISearchOperation.execute(MatchingFrame, ISearchContext)` returns false, the onBacktrack callback is evaluated.
    `void` | `onInitialize(MatchingFrame frame, ISearchContext context)` During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### IterateOverEStructuralFeatureInstances

          public IterateOverEStructuralFeatureInstances(int sourcePosition,
                                                        int targetPosition,
                                                        org.eclipse.emf.ecore.EStructuralFeature feature)

  - ### Method Detail

    - #### getFeature

          public org.eclipse.emf.ecore.EStructuralFeature getFeature()

    - #### onBacktrack

          public void onBacktrack(MatchingFrame frame,
                                  ISearchContext context)
                           throws LocalSearchException

      Description copied from interface: `ISearchOperation`
      After the execution of the operation failed and `ISearchOperation.execute(MatchingFrame, ISearchContext)` returns false, the onBacktrack callback is evaluated. Operations may use this method to clean up any temporary structures, and make the operation ready for a new execution.
      Specified by:
        `onBacktrack` in interface `ISearchOperation`
      Throws:
        `LocalSearchException`

    - #### onInitialize

          public void onInitialize(MatchingFrame frame,
                                   ISearchContext context)

      Description copied from interface: `ISearchOperation`
      During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin. Operations may use this method to initialize its internal data structures.
      Specified by:
        `onInitialize` in interface `ISearchOperation`

    - #### execute

          public boolean execute(MatchingFrame frame,
                                 ISearchContext context)

      Specified by:
        `execute` in interface `ISearchOperation`
      Returns:
        true if successful, or false if backtracking needed

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getVariablePositions

          public java.util.List<java.lang.Integer> getVariablePositions()

      Specified by:
        `getVariablePositions` in interface `ISearchOperation`
      Returns:
        the ordered list of the variable numbers that are affected by the search operation