Module com.speedment.common.codegen
Interface HasCode<T extends HasCode<T>>
-
- Type Parameters:
T- the extending type
- All Known Subinterfaces:
Constructor,Initializer,InterfaceMethod,Method
public interface HasCode<T extends HasCode<T>>A trait for models that contains code.- Since:
- 2.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tadd(String row)Adds the specified row of code to this model.default Tadd(String... rows)Adds all the specified rows to this model.default Tadd(Stream<String> rows)Adds all the specified rows to this model.List<String>getCode()Returns a list of the code rows of this model.
-
-
-
Method Detail
-
add
default T add(String row)
Adds the specified row of code to this model. If the row contains new-line characters, the line will be broken apart on those characters and added using theadd(java.lang.String...)-method.- Parameters:
row- the row- Returns:
- a reference to this
-
add
default T add(String... rows)
Adds all the specified rows to this model. If any of the specified rows contains a new-line character it will be broken apart on that character so that every row is in fact added as a separate string.- Parameters:
rows- the rows- Returns:
- a reference to this
-
add
default T add(Stream<String> rows)
Adds all the specified rows to this model. If any of the specified rows contains a new-line character it will be broken apart on that character so that every row is in fact added as a separate string.- Parameters:
rows- the rows- Returns:
- a reference to this
-
-