Class DeduplicateOperatorApplication

java.lang.Object
de.firemage.autograder.core.integrated.evaluator.fold.DeduplicateOperatorApplication
All Implemented Interfaces:
Fold

public final class DeduplicateOperatorApplication extends Object implements 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 Details

    • create

      public static Fold create()
    • foldCtUnaryOperator

      public <T> spoon.reflect.code.CtExpression<T> foldCtUnaryOperator(spoon.reflect.code.CtUnaryOperator<T> ctUnaryOperator)
      Specified by:
      foldCtUnaryOperator in interface Fold