@ParametersAreNonnullByDefault public class ValueConverter extends Object implements BiConverter<String,org.eclipse.emf.ecore.EAttribute,Object>
BiConverter
that transforms the value of EAttribute
instances.Modifier and Type | Field and Description |
---|---|
static ValueConverter |
INSTANCE
The singleton instance of this class.
|
Modifier and Type | Method and Description |
---|---|
Object |
convert(String value,
org.eclipse.emf.ecore.EAttribute attribute)
Converts an instance of the
attribute to a string literal representation. |
String |
revert(Object value,
org.eclipse.emf.ecore.EAttribute attribute)
Creates an instance of the
attribute from a string literal representation. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, from, identity, reverse
andThen
@Nonnull public static final ValueConverter INSTANCE
public Object convert(@Nullable String value, org.eclipse.emf.ecore.EAttribute attribute)
Converts an instance of the attribute
to a string literal representation.
convert
in interface BiConverter<String,org.eclipse.emf.ecore.EAttribute,Object>
value
- the value of the attributeattribute
- the attribute to instantiatenull
if the value
is null
revert(Object, EAttribute)
,
EcoreUtil.convertToString(EDataType, Object)
public String revert(@Nullable Object value, org.eclipse.emf.ecore.EAttribute attribute)
Creates an instance of the attribute
from a string literal representation.
revert
in interface BiConverter<String,org.eclipse.emf.ecore.EAttribute,Object>
value
- the string literal representation of the valueattribute
- the attribute to instantiatenull
if the value
is null
convert(String, EAttribute)
,
EcoreUtil.createFromString(EDataType, String)
Copyright © 2013–2019 Atlanmod. All rights reserved.