- java.lang.Object
-
- com.speedment.common.codegen.controller.SetGetAdd
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(File file)Generates getters, setters and adders for the fields in the specified model and sets the fields to private.
-
-
-
Field Detail
-
OF_THIS
public static final String OF_THIS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SetGetAdd
public SetGetAdd()
Initializes the control with all methods included.
-
SetGetAdd
public SetGetAdd(BiPredicate<Field,Method> onlyInclude)
Initializes the control but with only someMethodsincluded. The input of theBiPredicatewill be the field in the class that the method is generated for and the suggested method to add to the class.- Parameters:
onlyInclude- a filter for methods to include
-
-
Method Detail
-
accept
public void accept(File file)
Generates getters, setters and adders for the fields in the specified model and sets the fields to private. Method signatures that has been excluded in the construction of this control will be excluded from the generation.For fields of a subtype to
Collection, an 'adder' will be generated instead of a 'setter'.For fields of type
Optional, the inner type will be used in the setter parameter but the wrapped type will be used as output for the getter.
-
-