org.eclipse.incquery.uml.derivedfeatures

## Class OperationReturnResultMatcher

- java.lang.Object
- - org.eclipse.incquery.runtime.internal.apiimpl.QueryResultWrapper
  - - org.eclipse.incquery.runtime.api.impl.BaseMatcher<OperationReturnResultMatch>
    - - org.eclipse.incquery.uml.derivedfeatures.OperationReturnResultMatcher

- All Implemented Interfaces:
    IncQueryMatcher<OperationReturnResultMatch>

      public class OperationReturnResultMatcher
      extends BaseMatcher<OperationReturnResultMatch>

  Generated pattern matcher API of the org.eclipse.incquery.uml.derivedfeatures.operationReturnResult pattern, providing pattern-specific query methods.

  Use the pattern matcher on a given model via `on(IncQueryEngine)`, e.g. in conjunction with `IncQueryEngine.on(Notifier)`.

  Matches of the pattern will be represented as `OperationReturnResultMatch`.

  Original source: ``

       (memberEnd- >reject(p | ownedEnd- >includes(p.oclAsType(ExtensionEnd)))- >any(true))

       // Can't compile OCL to IncQuery because of java.lang.IllegalArgumentException: Iterator expression kind must be collect, select or reject instead of any in self.memberEnd- >reject(p : Property | self.ownedEnd- >includes(p.oclAsType(uml::ExtensionEnd)))- >any(temp1 : Property | true)
       //pattern extensionMetaclassEnd(source: Extension, target: Property) {}

       (if (lowerValue=null or lowerValue.integerValue()=null) then 1 else lowerValue.integerValue() endif)

       // Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: integerValue
       //pattern multiplicityElementLowerBound(source: MultiplicityElement, target: Integer) {}

       (if (upperValue=null or upperValue.unlimitedValue()=null) then 1 else upperValue.unlimitedValue() endif)

       // Can't compile OCL to IncQuery because of java.lang.UnsupportedOperationException: unlimitedValue
       //pattern multiplicityElementUpperBound(source: MultiplicityElement, target: UnlimitedNatural) {}

       (ownedParameter- >select (direction = ParameterDirectionKind::return)- >asSet())

        @QueryExplorer(checked = false)
       pattern operationReturnResult(
           self : Operation,
           temp1 : Parameter
       ) {
           Parameter.direction(temp1, parameterDirectionKind);
           parameterDirectionKind_0 == ParameterDirectionKind::^return;
           parameterDirectionKind == parameterDirectionKind_0;
           BehavioralFeature.ownedParameter(self, parameter);
           temp1 == parameter;
       }

  See Also:
    `OperationReturnResultMatch`, `OperationReturnResultProcessor`, `OperationReturnResultQuerySpecification`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OperationReturnResultMatcher(IncQueryEngine engine)` Deprecated. use `on(IncQueryEngine)` instead
    `OperationReturnResultMatcher(org.eclipse.emf.common.notify.Notifier emfRoot)` Deprecated. use `on(IncQueryEngine)` instead, e.g. in conjunction with `IncQueryEngine.on(Notifier)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `countMatches(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)` Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
    `void` | `forEachMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1, IMatchProcessor<? super OperationReturnResultMatch> processor)` Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
    `boolean` | `forOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1, IMatchProcessor<? super OperationReturnResultMatch> processor)` Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
    `java.util.Collection<OperationReturnResultMatch>` | `getAllMatches(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)` Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
    `java.util.Set<org.eclipse.uml2.uml.Operation>` | `getAllValuesOfself()` Retrieve the set of values that occur in matches for self.
    `java.util.Set<org.eclipse.uml2.uml.Operation>` | `getAllValuesOfself(OperationReturnResultMatch partialMatch)` Retrieve the set of values that occur in matches for self.
    `java.util.Set<org.eclipse.uml2.uml.Operation>` | `getAllValuesOfself(org.eclipse.uml2.uml.Parameter pTemp1)` Retrieve the set of values that occur in matches for self.
    `java.util.Set<org.eclipse.uml2.uml.Parameter>` | `getAllValuesOftemp1()` Retrieve the set of values that occur in matches for temp1.
    `java.util.Set<org.eclipse.uml2.uml.Parameter>` | `getAllValuesOftemp1(org.eclipse.uml2.uml.Operation pSelf)` Retrieve the set of values that occur in matches for temp1.
    `java.util.Set<org.eclipse.uml2.uml.Parameter>` | `getAllValuesOftemp1(OperationReturnResultMatch partialMatch)` Retrieve the set of values that occur in matches for temp1.
    `OperationReturnResultMatch` | `getOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)` Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
    `boolean` | `hasMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)` Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, under any possible substitution of the unspecified parameters (if any).
    `OperationReturnResultMatch` | `newMatch(org.eclipse.uml2.uml.Operation pSelf, org.eclipse.uml2.uml.Parameter pTemp1)` Returns a new (partial) match.
    `static OperationReturnResultMatcher` | `on(IncQueryEngine engine)` Initializes the pattern matcher within an existing EMF-IncQuery engine.
    `static IQuerySpecification<OperationReturnResultMatcher>` | `querySpecification()`

    - ### Methods inherited from class org.eclipse.incquery.runtime.api.impl.BaseMatcher

      `countMatches, countMatches, forEachMatch, forEachMatch, forOneArbitraryMatch, forOneArbitraryMatch, getAllMatches, getAllMatches, getAllValues, getAllValues, getEngine, getOneArbitraryMatch, getOneArbitraryMatch, getParameterNames, getPatternName, getPositionOfParameter, getSpecification, hasMatch, newEmptyMatch, newMatch`

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

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

- - ### Constructor Detail

    - #### OperationReturnResultMatcher

          @Deprecated
          public OperationReturnResultMatcher(org.eclipse.emf.common.notify.Notifier emfRoot)
                                                   throws IncQueryException

      Deprecated. use `on(IncQueryEngine)` instead, e.g. in conjunction with `IncQueryEngine.on(Notifier)`
      Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet). If a pattern matcher is already constructed with the same root, only a light-weight reference is returned. The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition). The match set will be incrementally refreshed upon updates from this scope.

      The matcher will be created within the managed `IncQueryEngine` belonging to the EMF model root, so multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.

      Parameters:
        `emfRoot` - the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
      Throws:
        `IncQueryException` - if an error occurs during pattern matcher creation

    - #### OperationReturnResultMatcher

          @Deprecated
          public OperationReturnResultMatcher(IncQueryEngine engine)
                                                   throws IncQueryException

      Deprecated. use `on(IncQueryEngine)` instead
      Initializes the pattern matcher within an existing EMF-IncQuery engine. If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. The match set will be incrementally refreshed upon updates.
      Parameters:
        `engine` - the existing EMF-IncQuery engine in which this matcher will be created.
      Throws:
        `IncQueryException` - if an error occurs during pattern matcher creation

  - ### Method Detail

    - #### on

          public static OperationReturnResultMatcher on(IncQueryEngine engine)
                                                 throws IncQueryException

      Initializes the pattern matcher within an existing EMF-IncQuery engine. If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. The match set will be incrementally refreshed upon updates.
      Parameters:
        `engine` - the existing EMF-IncQuery engine in which this matcher will be created.
      Throws:
        `IncQueryException` - if an error occurs during pattern matcher creation

    - #### getAllMatches

          public java.util.Collection<OperationReturnResultMatch> getAllMatches(org.eclipse.uml2.uml.Operation pSelf,
                                                                                org.eclipse.uml2.uml.Parameter pTemp1)

      Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
      Returns:
        matches represented as a OperationReturnResultMatch object.

    - #### getOneArbitraryMatch

          public OperationReturnResultMatch getOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf,
                                                                 org.eclipse.uml2.uml.Parameter pTemp1)

      Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. Neither determinism nor randomness of selection is guaranteed.
      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
      Returns:
        a match represented as a OperationReturnResultMatch object, or null if no match is found.

    - #### hasMatch

          public boolean hasMatch(org.eclipse.uml2.uml.Operation pSelf,
                                  org.eclipse.uml2.uml.Parameter pTemp1)

      Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, under any possible substitution of the unspecified parameters (if any).
      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
      Returns:
        true if the input is a valid (partial) match of the pattern.

    - #### countMatches

          public int countMatches(org.eclipse.uml2.uml.Operation pSelf,
                                  org.eclipse.uml2.uml.Parameter pTemp1)

      Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
      Returns:
        the number of pattern matches found.

    - #### forEachMatch

          public void forEachMatch(org.eclipse.uml2.uml.Operation pSelf,
                                   org.eclipse.uml2.uml.Parameter pTemp1,
                                   IMatchProcessor<? super OperationReturnResultMatch> processor)

      Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
        `processor` - the action that will process each pattern match.

    - #### forOneArbitraryMatch

          public boolean forOneArbitraryMatch(org.eclipse.uml2.uml.Operation pSelf,
                                              org.eclipse.uml2.uml.Parameter pTemp1,
                                              IMatchProcessor<? super OperationReturnResultMatch> processor)

      Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. Neither determinism nor randomness of selection is guaranteed.
      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
        `processor` - the action that will process the selected match.
      Returns:
        true if the pattern has at least one match with the given parameter values, false if the processor was not invoked

    - #### newMatch

          public OperationReturnResultMatch newMatch(org.eclipse.uml2.uml.Operation pSelf,
                                                     org.eclipse.uml2.uml.Parameter pTemp1)

      Returns a new (partial) match. This can be used e.g. to call the matcher with a partial match.

      The returned match will be immutable. Use `BaseMatcher.newEmptyMatch()` to obtain a mutable match object.

      Parameters:
        `pSelf` - the fixed value of pattern parameter self, or null if not bound.
        `pTemp1` - the fixed value of pattern parameter temp1, or null if not bound.
      Returns:
        the (partial) match object.

    - #### getAllValuesOfself

          public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfself()

      Retrieve the set of values that occur in matches for self.
      Returns:
        the Set of all values, null if no parameter with the given name exists, empty set if there are no matches

    - #### getAllValuesOfself

          public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfself(OperationReturnResultMatch partialMatch)

      Retrieve the set of values that occur in matches for self.
      Returns:
        the Set of all values, null if no parameter with the given name exists, empty set if there are no matches

    - #### getAllValuesOfself

          public java.util.Set<org.eclipse.uml2.uml.Operation> getAllValuesOfself(org.eclipse.uml2.uml.Parameter pTemp1)

      Retrieve the set of values that occur in matches for self.
      Returns:
        the Set of all values, null if no parameter with the given name exists, empty set if there are no matches

    - #### getAllValuesOftemp1

          public java.util.Set<org.eclipse.uml2.uml.Parameter> getAllValuesOftemp1()

      Retrieve the set of values that occur in matches for temp1.
      Returns:
        the Set of all values, null if no parameter with the given name exists, empty set if there are no matches

    - #### getAllValuesOftemp1

          public java.util.Set<org.eclipse.uml2.uml.Parameter> getAllValuesOftemp1(OperationReturnResultMatch partialMatch)

      Retrieve the set of values that occur in matches for temp1.
      Returns:
        the Set of all values, null if no parameter with the given name exists, empty set if there are no matches

    - #### getAllValuesOftemp1

          public java.util.Set<org.eclipse.uml2.uml.Parameter> getAllValuesOftemp1(org.eclipse.uml2.uml.Operation pSelf)

      Retrieve the set of values that occur in matches for temp1.
      Returns:
        the Set of all values, null if no parameter with the given name exists, empty set if there are no matches

    - #### querySpecification

          public static IQuerySpecification<OperationReturnResultMatcher> querySpecification()
                                                                                      throws IncQueryException

      Returns:
        the singleton instance of the query specification of this pattern
      Throws:
        `IncQueryException` - if the pattern definition could not be loaded