public class DefaultAdjusters extends Object
TemplateInputParameters after parsing is done.| Constructor and Description |
|---|
DefaultAdjusters() |
| Modifier and Type | Method and Description |
|---|---|
static void |
changeVariable(ClassContainer parameters,
java.util.function.Consumer<VariableDefinition> parameterChanger)
Changes the fields inside the
ClassContainer using the given parameterChanger. |
static ClassContainerAdjuster |
removeDepracatedFields() |
static void |
removeMethodIf(ClassContainer parameters,
java.util.function.Function<MethodDefinition,Boolean> removeIfTrue)
Removes all methods inside the
ClassContainer for which the input function returns true. |
static ClassContainerAdjuster |
removeStaticFields() |
static void |
removeVariableIf(ClassContainer parameters,
java.util.function.Function<VariableDefinition,Boolean> removeIfTrue)
Removes all fields inside the
ClassContainer for which the input function returns true. |
static ClassContainerAdjuster |
removeVoidMethods() |
static ClassContainerAdjuster |
replaceFieldPrimitivesWithObjects() |
public static ClassContainerAdjuster removeDepracatedFields()
ClassContainerAdjuster to remove all depracated fieldspublic static ClassContainerAdjuster removeStaticFields()
ClassContainerAdjuster to remove all static fieldspublic static ClassContainerAdjuster replaceFieldPrimitivesWithObjects()
ClassContainerAdjuster to replace all primitive types with their object version (e.g. int to Integer).public static ClassContainerAdjuster removeVoidMethods()
ClassContainerAdjuster to remove all void methodspublic static void changeVariable(ClassContainer parameters, java.util.function.Consumer<VariableDefinition> parameterChanger)
ClassContainer using the given parameterChanger.parameters - The ClassContainer in which the fields are changed.parameterChanger - a consumer changing an individual VariableDefinition inside the parameters.public static void removeVariableIf(ClassContainer parameters, java.util.function.Function<VariableDefinition,Boolean> removeIfTrue)
ClassContainer for which the input function returns true.parameters - The ClassContainer in which the fields are removed.removeIfTrue - Function to determine if a variable should be removed.public static void removeMethodIf(ClassContainer parameters, java.util.function.Function<MethodDefinition,Boolean> removeIfTrue)
ClassContainer for which the input function returns true.parameters - The ClassContainer in which the methods are removed.removeIfTrue - Function to determine if a variable should be removed.Copyright © 2019. All rights reserved.