Class InferOperatorTypes

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

public final class InferOperatorTypes extends Object implements Fold
Infers the type of operators if they are not set.

This can happen if the operator is created through a factory method like Factory.createBinaryOperator(CtExpression, CtExpression, BinaryOperatorKind) which does not set the type.

  • Method Details

    • create

      public static Fold create()
    • foldCtBinaryOperator

      public <T> spoon.reflect.code.CtBinaryOperator<T> foldCtBinaryOperator(spoon.reflect.code.CtBinaryOperator<T> ctBinaryOperator)
      Specified by:
      foldCtBinaryOperator in interface Fold
    • foldCtUnaryOperator

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