Class ConditionSimplifier
- java.lang.Object
-
- org.eclipse.emf.ecore.util.Switch<T>
-
- org.eclipse.xtext.xtext.generator.parser.antlr.splitting.simpleExpressions.util.SimpleExpressionsSwitch<Expression>
-
- org.eclipse.xtext.xtext.generator.parser.antlr.splitting.ConditionSimplifier
-
public class ConditionSimplifier extends SimpleExpressionsSwitch<Expression>
-
-
Field Summary
-
Fields inherited from class org.eclipse.xtext.xtext.generator.parser.antlr.splitting.simpleExpressions.util.SimpleExpressionsSwitch
modelPackage
-
-
Constructor Summary
Constructors Constructor Description ConditionSimplifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.xtext.generator.parser.antlr.splitting.simpleExpressions.util.SimpleExpressionsSwitch
caseBooleanLiteral, caseComparison, caseIfCondition, caseMethodCall, caseNumberLiteral, defaultCase, doSwitch, isSwitchFor
-
-
-
-
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 classSimpleExpressionsSwitch<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 classSimpleExpressionsSwitch<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 classSimpleExpressionsSwitch<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 classSimpleExpressionsSwitch<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)
-
-