public class DefaultEcoreElementFactory extends java.lang.Object implements IAstFactory
Constructor and Description |
---|
DefaultEcoreElementFactory() |
Modifier and Type | Method and Description |
---|---|
void |
add(org.eclipse.emf.ecore.EObject object,
java.lang.String feature,
java.lang.Object value,
java.lang.String ruleName,
INode node)
Adds a given value to a list described by the given feature.
|
org.eclipse.emf.ecore.EObject |
create(org.eclipse.emf.ecore.EClassifier classifier)
Creates an instance of the given type which has to be an
EClass . |
IValueConverterService |
getConverterService() |
protected java.lang.Object |
getTokenAsStringIfPossible(java.lang.Object tokenOrValue) |
void |
set(org.eclipse.emf.ecore.EObject object,
java.lang.String feature,
java.lang.Object value,
java.lang.String ruleName,
INode node)
Assigns a given value to a feature of the element
_this . |
void |
setConverterService(IValueConverterService converterService) |
public IValueConverterService getConverterService()
public void setConverterService(IValueConverterService converterService)
public org.eclipse.emf.ecore.EObject create(org.eclipse.emf.ecore.EClassifier classifier)
IAstFactory
EClass
.create
in interface IAstFactory
classifier
- the EClass
to be instantiated.EObject
which must conform the given class.public void set(org.eclipse.emf.ecore.EObject object, java.lang.String feature, java.lang.Object value, java.lang.String ruleName, INode node) throws ValueConverterException
IAstFactory
_this
. The value may be converted
according to the optional lexer rule.
The feature must be resolvable to a single value feature.set
in interface IAstFactory
ValueConverterException
- if the value cannot be converted.protected java.lang.Object getTokenAsStringIfPossible(java.lang.Object tokenOrValue)
public void add(org.eclipse.emf.ecore.EObject object, java.lang.String feature, java.lang.Object value, java.lang.String ruleName, INode node) throws ValueConverterException
IAstFactory
_this
. The given value may be converted
according to the optional lexer rule.
The feature must be resolvable to a multi value feature.add
in interface IAstFactory
ValueConverterException
- if the value cannot be converted.