Class RuleWithoutInstantiationInspector


  • public class RuleWithoutInstantiationInspector
    extends XtextRuleInspector<java.lang.Boolean,​ParserRule>
    Checks if a parser rule ensures object instantiation. A rule that can be consumed without instantiating an object or providing an object that was instantiated by another unassigned called rule, is considered to be invalid as it leads to surprises when clients traverse the model.
    • Constructor Detail

    • Method Detail

      • caseCompoundElement

        public java.lang.Boolean caseCompoundElement​(CompoundElement object)
        Description copied from class: XtextSwitch
        Returns the result of interpreting the object as an instance of 'Compound Element'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseCompoundElement in class XtextSwitch<java.lang.Boolean>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Compound Element'.
        See Also:
        doSwitch(EObject)
      • caseAbstractElement

        public java.lang.Boolean caseAbstractElement​(AbstractElement object)
        Description copied from class: XtextSwitch
        Returns the result of interpreting the object as an instance of 'Abstract Element'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAbstractElement in class XtextSwitch<java.lang.Boolean>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Abstract Element'.
        See Also:
        doSwitch(EObject)
      • caseAction

        public java.lang.Boolean caseAction​(Action object)
        Description copied from class: XtextSwitch
        Returns the result of interpreting the object as an instance of 'Action'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAction in class XtextSwitch<java.lang.Boolean>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Action'.
        See Also:
        doSwitch(EObject)
      • caseAlternatives

        public java.lang.Boolean caseAlternatives​(Alternatives object)
        Description copied from class: XtextSwitch
        Returns the result of interpreting the object as an instance of 'Alternatives'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAlternatives in class XtextSwitch<java.lang.Boolean>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Alternatives'.
        See Also:
        doSwitch(EObject)
      • caseAssignment

        public java.lang.Boolean caseAssignment​(Assignment object)
        Description copied from class: XtextSwitch
        Returns the result of interpreting the object as an instance of 'Assignment'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseAssignment in class XtextSwitch<java.lang.Boolean>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Assignment'.
        See Also:
        doSwitch(EObject)
      • caseRuleCall

        public java.lang.Boolean caseRuleCall​(RuleCall object)
        Description copied from class: XtextSwitch
        Returns the result of interpreting the object as an instance of 'Rule Call'. This implementation returns null; returning a non-null result will terminate the switch.
        Overrides:
        caseRuleCall in class XtextSwitch<java.lang.Boolean>
        Parameters:
        object - the target of the switch.
        Returns:
        the result of interpreting the object as an instance of 'Rule Call'.
        See Also:
        doSwitch(EObject)