org.eclipse.xtext.generator.parser.antlr.splitting
Class ConditionSimplifier

java.lang.Object
  extended by org.eclipse.xtext.generator.parser.antlr.splitting.simpleExpressions.util.SimpleExpressionsSwitch<Expression>
      extended by org.eclipse.xtext.generator.parser.antlr.splitting.ConditionSimplifier

public class ConditionSimplifier
extends SimpleExpressionsSwitch<Expression>

Author:
Sebastian Zarnekow - Initial contribution and API

Field Summary
 
Fields inherited from class org.eclipse.xtext.generator.parser.antlr.splitting.simpleExpressions.util.SimpleExpressionsSwitch
modelPackage
 
Constructor Summary
ConditionSimplifier()
           
 
Method Summary
 boolean areSemanticallyEqual(Expression left, Expression right)
           
 Expression caseAndExpression(AndExpression object)
          Returns the result of interpreting the object as an instance of 'And Expression'
 Expression caseExpression(Expression object)
          Returns the result of interpreting the object as an instance of 'Expression'
 Expression caseNotExpression(NotExpression object)
          Returns the result of interpreting the object as an instance of 'Not Expression'
 Expression caseOrExpression(OrExpression object)
          Returns the result of interpreting the object as an instance of 'Or Expression'
 void simplify(IfCondition condition)
           
 Expression simplifyRecursive(Expression expression)
           
 
Methods inherited from class org.eclipse.xtext.generator.parser.antlr.splitting.simpleExpressions.util.SimpleExpressionsSwitch
caseComparison, caseIfCondition, caseMethodCall, caseNumberLiteral, defaultCase, doSwitch, doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionSimplifier

public ConditionSimplifier()
Method Detail

simplify

public void simplify(IfCondition condition)

simplifyRecursive

public Expression simplifyRecursive(Expression expression)

caseAndExpression

public Expression caseAndExpression(AndExpression object)
Description copied from class: SimpleExpressionsSwitch
Returns the result of interpreting the object as an instance of 'And Expression'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAndExpression in class SimpleExpressionsSwitch<Expression>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'And Expression'.
See Also:
doSwitch(EObject)

caseOrExpression

public Expression caseOrExpression(OrExpression object)
Description copied from class: SimpleExpressionsSwitch
Returns the result of interpreting the object as an instance of 'Or Expression'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseOrExpression in class SimpleExpressionsSwitch<Expression>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Or Expression'.
See Also:
doSwitch(EObject)

caseNotExpression

public Expression caseNotExpression(NotExpression object)
Description copied from class: SimpleExpressionsSwitch
Returns the result of interpreting the object as an instance of 'Not Expression'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseNotExpression in class SimpleExpressionsSwitch<Expression>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Not Expression'.
See Also:
doSwitch(EObject)

caseExpression

public Expression caseExpression(Expression object)
Description copied from class: SimpleExpressionsSwitch
Returns the result of interpreting the object as an instance of 'Expression'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseExpression in class SimpleExpressionsSwitch<Expression>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Expression'.
See Also:
doSwitch(EObject)

areSemanticallyEqual

public boolean areSemanticallyEqual(Expression left,
                                    Expression right)