Package org.eclipse.xtext.xtext.parser
Class CardinalityAwareEcoreFactory
- java.lang.Object
-
- org.eclipse.xtext.parser.DefaultEcoreElementFactory
-
- org.eclipse.xtext.xtext.parser.CardinalityAwareEcoreFactory
-
- All Implemented Interfaces:
IAstFactory
public class CardinalityAwareEcoreFactory extends DefaultEcoreElementFactory
The Xtext grammar allows to override the cardinality value by using patterns like(feature+=RuleCall+)?
. Usually the '?' would override the '+' and the information about the '+' is completely lost. This factory will flag such patterns with a warning.- Since:
- 2.9
-
-
Constructor Summary
Constructors Constructor Description CardinalityAwareEcoreFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
.-
Methods inherited from class org.eclipse.xtext.parser.DefaultEcoreElementFactory
add, create, getConverterService, getTokenAsStringIfPossible, setConverterService
-
-
-
-
Method Detail
-
set
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
Description copied from interface:IAstFactory
Assigns a given value to a feature of the element_this
. The value may be converted according to the optional lexer rule. The feature must be resolvable to a single value feature.- Specified by:
set
in interfaceIAstFactory
- Overrides:
set
in classDefaultEcoreElementFactory
- Throws:
ValueConverterException
- if the value cannot be converted.
-
-