Class NameBasedPropertyMapper

java.lang.Object
com._1c.g5.v8.dt.internal.md.extension.NameBasedPropertyMapper
All Implemented Interfaces:
IMdAdoptedPropertyMapper

public class NameBasedPropertyMapper extends Object implements IMdAdoptedPropertyMapper
Implementation of IMdAdoptedPropertyMapper.

This implementation uses the fact that extensoion features with type MdPropertyState are intended to be named exactly as native object features by convension.

  • Constructor Details

  • Method Details

    • getExtensionClass

      public Optional<org.eclipse.emf.ecore.EClass> getExtensionClass(org.eclipse.emf.ecore.EClass originalClass)
      Description copied from interface: IMdAdoptedPropertyMapper
      Returns an optional extension class for the original metadata class.
      Specified by:
      getExtensionClass in interface IMdAdoptedPropertyMapper
      Parameters:
      originalClass - the original metadata class, cannot be null
      Returns:
      the optional extension class for the original metadata class
    • getExtensionProperty

      public Optional<Pair<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature>> getExtensionProperty(org.eclipse.emf.ecore.EObject originalObject, org.eclipse.emf.ecore.EStructuralFeature originalProperty)
      Description copied from interface: IMdAdoptedPropertyMapper
      Returns an optional pair:
      • The extension metadata object by the original metadata object.
      • The extension metadata property by the original metadata property.
      Specified by:
      getExtensionProperty in interface IMdAdoptedPropertyMapper
      Parameters:
      originalObject - the original metadata object, cannot be null
      originalProperty - the original metadata property, cannot be null
      Returns:
      the optional extension metadata object and property accoring to the original model