org.eclipse.incquery.runtime.matchers.psystem.rewriters

## Class PQueryFlattener

- java.lang.Object
- - org.eclipse.incquery.runtime.matchers.psystem.rewriters.PDisjunctionRewriter
  - - org.eclipse.incquery.runtime.matchers.psystem.rewriters.PQueryFlattener

-     public class PQueryFlattener
      extends PDisjunctionRewriter

  This rewriter class holds the query flattening logic
  Author:
    Marton Bur

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PQueryFlattener(IFlattenCallPredicate flattenCallPredicate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `PDisjunction` | `flatten(PQuery pQuery)` Deprecated. Use `rewrite(PDisjunction)` instead
    `PDisjunction` | `rewrite(PDisjunction disjunction)`

    - ### Methods inherited from class org.eclipse.incquery.runtime.matchers.psystem.rewriters.PDisjunctionRewriter

      `rewrite`

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

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

- - ### Constructor Detail

    - #### PQueryFlattener

          public PQueryFlattener(IFlattenCallPredicate flattenCallPredicate)

  - ### Method Detail

    - #### rewrite

          public PDisjunction rewrite(PDisjunction disjunction)
                               throws RewriterException

      Specified by:
        `rewrite` in class `PDisjunctionRewriter`
      Throws:
        `RewriterException`

    - #### flatten

          public PDisjunction flatten(PQuery pQuery)

      Deprecated. Use `rewrite(PDisjunction)` instead
      Flattens a given PQuery.
      Parameters:
        `pQuery` - the query to flatten
      Returns:
        a PDisjunction containing the flattened bodies