org.eclipse.incquery.patternlanguage.emf.types

## Class EMFTypeSystem

- java.lang.Object
- - org.eclipse.incquery.patternlanguage.typing.AbstractTypeSystem
  - - org.eclipse.incquery.patternlanguage.emf.types.EMFTypeSystem

- All Implemented Interfaces:
    ITypeSystem

      public class EMFTypeSystem
      extends AbstractTypeSystem

  Author:
    Zoltan Ujhelyi

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.incquery.patternlanguage.typing.ITypeSystem

      `ITypeSystem.NullTypeSystem`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EMFTypeSystem(org.apache.log4j.Logger logger)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IInputKey` | `classifierToInputKey(org.eclipse.emf.ecore.EClassifier classifier)`
    `IInputKey` | `extractColumnDescriptor(RelationType type, int columnIndex)` Extracts the model-specific column type of the given index from a RelationType declaration
    `IInputKey` | `extractTypeDescriptor(Type type)` Extracts the model-specific types from a Type declaration.
    `boolean` | `isConformant(ClassType expectedType, ClassType actualType)`
    `boolean` | `isConformant(IInputKey expectedType, IInputKey actualType)` Decides whether the second type is compatible with the first one
    `boolean` | `isConformToRelationColumn(IInputKey relationType, int columnIndex, IInputKey columnType)` Decides whether the reference can have a selected type at its given column.
    `boolean` | `isConformToRelationSource(ReferenceType relationType, ClassType sourceType)`
    `boolean` | `isConformToRelationTarget(ReferenceType relationType, ClassType targetType)`
    `org.eclipse.xtext.common.types.JvmTypeReference` | `toJvmTypeReference(IInputKey type, org.eclipse.emf.ecore.EObject context)` Creates a type reference for model inference from a selected type.

    - ### Methods inherited from class org.eclipse.incquery.patternlanguage.typing.AbstractTypeSystem

      `typeString`

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

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

- - ### Constructor Detail

    - #### EMFTypeSystem

          @Inject
          public EMFTypeSystem(org.apache.log4j.Logger logger)

  - ### Method Detail

    - #### extractTypeDescriptor

          public IInputKey extractTypeDescriptor(Type type)

      Description copied from interface: `ITypeSystem`
      Extracts the model-specific types from a Type declaration.
      Parameters:
        `type` - either the `Type` or the `RelationType` instance
      Returns:
        model-specific type representation

    - #### classifierToInputKey

          public static IInputKey classifierToInputKey(org.eclipse.emf.ecore.EClassifier classifier)

    - #### extractColumnDescriptor

          public IInputKey extractColumnDescriptor(RelationType type,
                                                   int columnIndex)

      Description copied from interface: `ITypeSystem`
      Extracts the model-specific column type of the given index from a RelationType declaration

    - #### isConformant

          public boolean isConformant(IInputKey expectedType,
                                      IInputKey actualType)

      Description copied from interface: `ITypeSystem`
      Decides whether the second type is compatible with the first one

    - #### isConformant

          public boolean isConformant(ClassType expectedType,
                                      ClassType actualType)

    - #### isConformToRelationColumn

          public boolean isConformToRelationColumn(IInputKey relationType,
                                                   int columnIndex,
                                                   IInputKey columnType)

      Description copied from interface: `ITypeSystem`
      Decides whether the reference can have a selected type at its given column.

    - #### isConformToRelationSource

          public boolean isConformToRelationSource(ReferenceType relationType,
                                                   ClassType sourceType)

    - #### isConformToRelationTarget

          public boolean isConformToRelationTarget(ReferenceType relationType,
                                                   ClassType targetType)

    - #### toJvmTypeReference

          public org.eclipse.xtext.common.types.JvmTypeReference toJvmTypeReference(IInputKey type,
                                                                                    org.eclipse.emf.ecore.EObject context)

      Description copied from interface: `ITypeSystem`
      Creates a type reference for model inference from a selected type.