Package de.firemage.autograder.core.integrated.evaluator.fold
package de.firemage.autograder.core.integrated.evaluator.fold
-
ClassDescriptionApplies casts to
CtExpressions.For some binary and unary operator expressions, the operands are cast to a different type before the operation is applied.ApplyOperatorPromotion.OperatorPredicate<T extends spoon.reflect.code.CtExpression<?>>Chains multiple folds together.Removes operators that cancel each other out like-(-x)or!(!x)that would bex.Evaluates literal operations like1 + 2that can be evaluated to a constant value.Infers the type of operators if they are not set.Inline reads of constant variables with its value.