org.eclipse.incquery.runtime.emf.helper

## Class IncQueryRuntimeHelper

- java.lang.Object
- - org.eclipse.incquery.runtime.emf.helper.IncQueryRuntimeHelper

-     public class IncQueryRuntimeHelper
      extends java.lang.Object

  Helper functions for dealing with the EMF-IncQuery objects.
  Since:
    0.9
  Author:
    Abel Hegedus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IncQueryRuntimeHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.eclipse.emf.ecore.EStructuralFeature` | `getFeature(java.lang.Object o, java.lang.String featureName)` Get the structural feature with the given name of the given object.
    `static java.lang.String` | `getMessage(IPatternMatch match, java.lang.String messageFormat)` Returns the message for the given match using the given format.
    `static java.lang.String` | `prettyPrintEMFType(java.lang.Object typeObject)` Gives a human-readable name of an EMF type.

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

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

- - ### Constructor Detail

    - #### IncQueryRuntimeHelper

          public IncQueryRuntimeHelper()

  - ### Method Detail

    - #### prettyPrintEMFType

          public static java.lang.String prettyPrintEMFType(java.lang.Object typeObject)

      Gives a human-readable name of an EMF type.

    - #### getFeature

          public static org.eclipse.emf.ecore.EStructuralFeature getFeature(java.lang.Object o,
                                                                            java.lang.String featureName)

      Get the structural feature with the given name of the given object.
      Parameters:
        `o` - the object (must be an EObject)
        `featureName` - the name of the feature
      Returns:
        the EStructuralFeature of the object or null if it can not be found

    - #### getMessage

          public static java.lang.String getMessage(IPatternMatch match,
                                                    java.lang.String messageFormat)

      Returns the message for the given match using the given format. The format string can refer to the value of parameter A of the match with $A$ and even access features of A (if it's an EObject), e.g. $A.id$.

      If the selected parameter does not exist, the string "[no such parameter]" is added

      If no feature is defined, but A has a feature called "name", then its value is used.

      If the selected feature does not exist, A.toString() is added.

      If the selected feature is null, the string "null" is added.