Class DeduplicateOperatorApplication
java.lang.Object
de.firemage.autograder.core.integrated.evaluator.fold.DeduplicateOperatorApplication
- All Implemented Interfaces:
Fold
Removes operators that cancel each other out like
-(-x) or !(!x) that would be x.
Note that this fold might add casts to ensure that the type of the expression is preserved.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Foldcreate()<T> spoon.reflect.code.CtExpression<T>foldCtUnaryOperator(spoon.reflect.code.CtUnaryOperator<T> ctUnaryOperator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.firemage.autograder.core.integrated.evaluator.fold.Fold
enter, exit, fold, foldCtBinaryOperator, foldCtExpression, foldCtLiteral, foldCtVariableRead
-
Method Details
-
create
-
foldCtUnaryOperator
public <T> spoon.reflect.code.CtExpression<T> foldCtUnaryOperator(spoon.reflect.code.CtUnaryOperator<T> ctUnaryOperator) - Specified by:
foldCtUnaryOperatorin interfaceFold
-