Class EStructuralFeatureValueConverterServiceImpl
- java.lang.Object
-
- org.eclipse.emfforms.internal.common.converter.EStructuralFeatureValueConverterServiceImpl
-
- All Implemented Interfaces:
EStructuralFeatureValueConverterService
public class EStructuralFeatureValueConverterServiceImpl extends java.lang.Object implements EStructuralFeatureValueConverterService
- Author:
- Mathias Schaefer
-
-
Constructor Summary
Constructors Constructor Description EStructuralFeatureValueConverterServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValueConverter(EStructuralFeatureValueConverter converter)Register the given value converter.java.lang.ObjectconvertToLiteral(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object instance)Convert value instance to literal.java.lang.ObjectconvertToModelValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String literal)Convert literal to Object.voidremoveValueConverter(EStructuralFeatureValueConverter converter)Unregister the given value converter.
-
-
-
Method Detail
-
addValueConverter
public void addValueConverter(EStructuralFeatureValueConverter converter)
Description copied from interface:EStructuralFeatureValueConverterServiceRegister the given value converter.- Specified by:
addValueConverterin interfaceEStructuralFeatureValueConverterService- Parameters:
converter- to add to the registry
-
removeValueConverter
public void removeValueConverter(EStructuralFeatureValueConverter converter)
Description copied from interface:EStructuralFeatureValueConverterServiceUnregister the given value converter.- Specified by:
removeValueConverterin interfaceEStructuralFeatureValueConverterService- Parameters:
converter- to remove from the registry
-
convertToModelValue
public java.lang.Object convertToModelValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String literal)Description copied from interface:EStructuralFeatureValueConverterServiceConvert literal to Object.- Specified by:
convertToModelValuein interfaceEStructuralFeatureValueConverterService- Parameters:
eObject- of the feature (optional, can be null)feature- target featureliteral- to convert- Returns:
- converted object (null if conversion failed)
-
convertToLiteral
public java.lang.Object convertToLiteral(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object instance)Description copied from interface:EStructuralFeatureValueConverterServiceConvert value instance to literal.- Specified by:
convertToLiteralin interfaceEStructuralFeatureValueConverterService- Parameters:
eObject- (optional, can be null)feature- source featureinstance- to convert- Returns:
- converted object (commonly a string literal, null if conversion failed)
-
-