Class NameBasedPropertyMapper
java.lang.Object
com._1c.g5.v8.dt.internal.md.extension.NameBasedPropertyMapper
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.eclipse.emf.ecore.EClass>
getExtensionClass
(org.eclipse.emf.ecore.EClass originalClass) Returns an optional extension class for the original metadata class.getExtensionProperty
(org.eclipse.emf.ecore.EObject originalObject, org.eclipse.emf.ecore.EStructuralFeature originalProperty) Returns an optional pair: The extension metadata object by the original metadata object.
-
Constructor Details
-
NameBasedPropertyMapper
public NameBasedPropertyMapper()Constructor ofNameBasedPropertyMapper
.
-
-
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 interfaceIMdAdoptedPropertyMapper
- Parameters:
originalClass
- the original metadata class, cannot benull
- 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 interfaceIMdAdoptedPropertyMapper
- Parameters:
originalObject
- the original metadata object, cannot benull
originalProperty
- the original metadata property, cannot benull
- Returns:
- the optional extension metadata object and property accoring to the original model
-