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

public final class ChainedFold extends Object implements Fold
Chains multiple folds together.

The folds are applied in the order they are given.

  • Method Details

    • chain

      public static Fold chain(Fold first, Fold... other)
    • chain

      public static Fold chain(List<Fold> folds)
    • enter

      public spoon.reflect.declaration.CtElement enter(spoon.reflect.declaration.CtElement ctElement)
      Description copied from interface: Fold
      This method is called before a CtElement and all of its children are visited.

      By default, this method does nothing.

      Specified by:
      enter in interface Fold
      Parameters:
      ctElement - the element that is about to be visited
      Returns:
      the folded element, might be the same as the input element or some other element
    • exit

      public spoon.reflect.declaration.CtElement exit(spoon.reflect.declaration.CtElement ctElement)
      Description copied from interface: Fold
      This method is called after all children of the CtElement have been visited.

      By default, this method calls Fold.fold(CtElement).

      Specified by:
      exit in interface Fold
      Parameters:
      ctElement - the element that has been visited
      Returns:
      the folded element, might be the same as the input element or some other element
    • fold

      public spoon.reflect.declaration.CtElement fold(spoon.reflect.declaration.CtElement ctElement)
      Specified by:
      fold in interface Fold