Interface Fold
- All Known Implementing Classes:
ApplyCasts,ApplyOperatorPromotion,ChainedFold,DeduplicateOperatorApplication,EvaluateLiteralOperations,EvaluatePartialLiteralOperations,InferOperatorTypes,InlineVariableRead,PromoteOperands,RemoveRedundantCasts
public interface Fold
-
Method Summary
Modifier and TypeMethodDescriptiondefault spoon.reflect.declaration.CtElemententer(spoon.reflect.declaration.CtElement ctElement) This method is called before aCtElementand all of its children are visited.default spoon.reflect.declaration.CtElementexit(spoon.reflect.declaration.CtElement ctElement) This method is called after all children of theCtElementhave been visited.default spoon.reflect.declaration.CtElementfold(spoon.reflect.declaration.CtElement ctElement) default <T> spoon.reflect.code.CtExpression<T>foldCtBinaryOperator(spoon.reflect.code.CtBinaryOperator<T> ctBinaryOperator) default <T> spoon.reflect.code.CtExpression<T>foldCtExpression(spoon.reflect.code.CtExpression<T> ctExpression) default <T> spoon.reflect.code.CtExpression<T>foldCtLiteral(spoon.reflect.code.CtLiteral<T> ctLiteral) default <T> spoon.reflect.code.CtExpression<T>foldCtUnaryOperator(spoon.reflect.code.CtUnaryOperator<T> ctUnaryOperator) default <T> spoon.reflect.code.CtExpression<T>foldCtVariableRead(spoon.reflect.code.CtVariableRead<T> ctVariableRead)
-
Method Details
-
enter
default spoon.reflect.declaration.CtElement enter(spoon.reflect.declaration.CtElement ctElement) This method is called before aCtElementand all of its children are visited.By default, this method does nothing.
- 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
default spoon.reflect.declaration.CtElement exit(spoon.reflect.declaration.CtElement ctElement) This method is called after all children of theCtElementhave been visited.By default, this method calls
fold(CtElement).- 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
default spoon.reflect.declaration.CtElement fold(spoon.reflect.declaration.CtElement ctElement) -
foldCtExpression
default <T> spoon.reflect.code.CtExpression<T> foldCtExpression(spoon.reflect.code.CtExpression<T> ctExpression) -
foldCtLiteral
default <T> spoon.reflect.code.CtExpression<T> foldCtLiteral(spoon.reflect.code.CtLiteral<T> ctLiteral) -
foldCtBinaryOperator
default <T> spoon.reflect.code.CtExpression<T> foldCtBinaryOperator(spoon.reflect.code.CtBinaryOperator<T> ctBinaryOperator) -
foldCtUnaryOperator
default <T> spoon.reflect.code.CtExpression<T> foldCtUnaryOperator(spoon.reflect.code.CtUnaryOperator<T> ctUnaryOperator) -
foldCtVariableRead
default <T> spoon.reflect.code.CtExpression<T> foldCtVariableRead(spoon.reflect.code.CtVariableRead<T> ctVariableRead)
-