public class DefaultEAttributeValueConverterImpl extends Object implements EStructuralFeatureValueConverter
EStructuralFeatureValueConverter.Direction| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LIST_SEPARATOR
Default list separator token.
|
static double |
DEFAULT_PRIORITY
The default priority for this converter implementation.
|
NOT_APPLICABLE| Modifier | Constructor and Description |
|---|---|
|
DefaultEAttributeValueConverterImpl()
Default no value constructor (will use the
DEFAULT_LIST_SEPARATOR and DEFAULT_PRIORITY for this converter).
|
protected |
DefaultEAttributeValueConverterImpl(String listSeparator,
double priority)
Constructor which allows to override the list separator.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
convertToLiteral(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature feature,
Object instance)
Convert model value instance to string literal.
|
Object |
convertToModelValue(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature feature,
String literal)
Convert string literal to model value instance.
|
protected Object |
fromString(org.eclipse.emf.ecore.EStructuralFeature feature,
String literal)
Convert literal to Object.
|
double |
isApplicable(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature feature,
Object value,
EStructuralFeatureValueConverter.Direction direction)
Check whether this converter instance is applicable for the given feature.
|
protected Object |
toString(org.eclipse.emf.ecore.EStructuralFeature feature,
Object instance)
Basic conversion from model to string literal.
|
public static final String DEFAULT_LIST_SEPARATOR
public static final double DEFAULT_PRIORITY
public DefaultEAttributeValueConverterImpl()
protected DefaultEAttributeValueConverterImpl(String listSeparator, double priority)
listSeparator - the separator token to split lists (i.e. "|")priority - the priority for this converterpublic double isApplicable(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EStructuralFeature feature,
Object value,
EStructuralFeatureValueConverter.Direction direction)
EStructuralFeatureValueConverterisApplicable in interface EStructuralFeatureValueConvertereObject - (optional)feature - the target featurevalue - the valuedirection - the directionpublic Object convertToModelValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, String literal)
EStructuralFeatureValueConverterconvertToModelValue in interface EStructuralFeatureValueConvertereObject - (optional, only required for EReferences)feature - the target featureliteral - the string literalpublic Object convertToLiteral(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EStructuralFeature feature, Object instance)
EStructuralFeatureValueConverterconvertToLiteral in interface EStructuralFeatureValueConvertereObject - (optional)feature - the source featureinstance - the source value objectprotected Object fromString(org.eclipse.emf.ecore.EStructuralFeature feature, String literal)
feature - target featureliteral - to convertCopyright © 2019. All rights reserved.