|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.util.XtextSwitch<Result> org.eclipse.xtext.xtext.XtextRuleInspector<java.lang.Boolean,ParserRule> org.eclipse.xtext.xtext.RuleWithoutInstantiationInspector
public class RuleWithoutInstantiationInspector
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.
Field Summary |
---|
Fields inherited from class org.eclipse.xtext.util.XtextSwitch |
---|
modelPackage |
Constructor Summary | |
---|---|
RuleWithoutInstantiationInspector(ValidationMessageAcceptor acceptor)
|
Method Summary | |
---|---|
protected boolean |
canInspect(ParserRule rule)
|
java.lang.Boolean |
caseAbstractElement(AbstractElement object)
Returns the result of interpreting the object as an instance of 'Abstract Element'. |
java.lang.Boolean |
caseAction(Action object)
Returns the result of interpreting the object as an instance of 'Action'. |
java.lang.Boolean |
caseAlternatives(Alternatives object)
Returns the result of interpreting the object as an instance of 'Alternatives'. |
java.lang.Boolean |
caseAssignment(Assignment object)
Returns the result of interpreting the object as an instance of 'Assignment'. |
java.lang.Boolean |
caseCompoundElement(CompoundElement object)
Returns the result of interpreting the object as an instance of 'Compound Element'. |
java.lang.Boolean |
caseRuleCall(RuleCall object)
Returns the result of interpreting the object as an instance of 'Rule Call'. |
protected void |
handleResult(java.lang.Boolean r,
ParserRule rule)
|
Methods inherited from class org.eclipse.xtext.xtext.XtextRuleInspector |
---|
acceptError, acceptWarning, addVisited, doInspect, getNestingLevel, getTypeRefName, inspect, removeVisited |
Methods inherited from class org.eclipse.xtext.util.XtextSwitch |
---|
caseAbstractMetamodelDeclaration, caseAbstractNegatedToken, caseAbstractRule, caseCharacterRange, caseCrossReference, caseEnumLiteralDeclaration, caseEnumRule, caseEOF, caseGeneratedMetamodel, caseGrammar, caseGroup, caseKeyword, caseNegatedToken, caseParserRule, caseReferencedMetamodel, caseTerminalRule, caseTypeRef, caseUnorderedGroup, caseUntilToken, caseWildcard, defaultCase, doSwitch, doSwitch, doSwitch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuleWithoutInstantiationInspector(ValidationMessageAcceptor acceptor)
Method Detail |
---|
protected boolean canInspect(ParserRule rule)
canInspect
in class XtextRuleInspector<java.lang.Boolean,ParserRule>
protected void handleResult(java.lang.Boolean r, ParserRule rule)
handleResult
in class XtextRuleInspector<java.lang.Boolean,ParserRule>
public java.lang.Boolean caseCompoundElement(CompoundElement object)
XtextSwitch
caseCompoundElement
in class XtextSwitch<java.lang.Boolean>
object
- the target of the switch.
doSwitch(EObject)
public java.lang.Boolean caseAbstractElement(AbstractElement object)
XtextSwitch
caseAbstractElement
in class XtextSwitch<java.lang.Boolean>
object
- the target of the switch.
doSwitch(EObject)
public java.lang.Boolean caseAction(Action object)
XtextSwitch
caseAction
in class XtextSwitch<java.lang.Boolean>
object
- the target of the switch.
doSwitch(EObject)
public java.lang.Boolean caseAlternatives(Alternatives object)
XtextSwitch
caseAlternatives
in class XtextSwitch<java.lang.Boolean>
object
- the target of the switch.
doSwitch(EObject)
public java.lang.Boolean caseAssignment(Assignment object)
XtextSwitch
caseAssignment
in class XtextSwitch<java.lang.Boolean>
object
- the target of the switch.
doSwitch(EObject)
public java.lang.Boolean caseRuleCall(RuleCall object)
XtextSwitch
caseRuleCall
in class XtextSwitch<java.lang.Boolean>
object
- the target of the switch.
doSwitch(EObject)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |