Interface EStructuralFeatureValueConverter
-
- All Known Implementing Classes:
DefaultEAttributeValueConverterImpl
public interface EStructuralFeatureValueConverter
- Since:
- 1.11
- Author:
- Mathias Schaefer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
EStructuralFeatureValueConverter.Direction
Conversion direction.
-
Field Summary
Fields Modifier and Type Field Description static double
NOT_APPLICABLE
Constant value to mark a converter implementation not applicable for the given EObject/EStructuralFeature combination.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
convertToLiteral(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object instance)
Convert model value instance to string literal.java.lang.Object
convertToModelValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String literal)
Convert string literal to model value instance.double
isApplicable(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value, EStructuralFeatureValueConverter.Direction direction)
Check whether this converter instance is applicable for the given feature.
-
-
-
Field Detail
-
NOT_APPLICABLE
static final double NOT_APPLICABLE
Constant value to mark a converter implementation not applicable for the given EObject/EStructuralFeature combination.- See Also:
- Constant Field Values
-
-
Method Detail
-
isApplicable
double isApplicable(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object value, EStructuralFeatureValueConverter.Direction direction)
Check whether this converter instance is applicable for the given feature.- Parameters:
eObject
- (optional)feature
- the target featurevalue
- the valuedirection
- the direction- Returns:
- rank of converter (higher value means higher priority)
-
convertToModelValue
java.lang.Object convertToModelValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String literal)
Convert string literal to model value instance.- Parameters:
eObject
- (optional, only required for EReferences)feature
- the target featureliteral
- the string literal- Returns:
- converted value
-
convertToLiteral
java.lang.Object convertToLiteral(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.Object instance)
Convert model value instance to string literal.- Parameters:
eObject
- (optional)feature
- the source featureinstance
- the source value object- Returns:
- converted value (commonly a string literal)
-
-