Class 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 Detail

      • CardinalityAwareEcoreFactory

        public CardinalityAwareEcoreFactory()
    • 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 interface IAstFactory
        Overrides:
        set in class DefaultEcoreElementFactory
        Throws:
        ValueConverterException - if the value cannot be converted.