Module com.speedment.common.codegen
Interface HasSupertype<T extends HasSupertype<T>>
-
- Type Parameters:
T- the extending type
- All Known Subinterfaces:
Class
public interface HasSupertype<T extends HasSupertype<T>>A trait for models that has a super type.- Since:
- 2.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Textend(Type supertype)Sets the super type of this model.default Textend(Type supertype, Type... params)Sets the super type of this model to a parameterized type created with the specified base type and generic parameters.default Textend(Type supertype, String... params)Sets the super type of this model to a parameterized type created with the specified base type and generic parameters.Optional<Type>getSupertype()Returns the super type if such exists, elseempty.TsetSupertype(Type type)Sets the super type of this model.
-
-
-
Method Detail
-
setSupertype
T setSupertype(Type type)
Sets the super type of this model.- Parameters:
type- the super type- Returns:
- a reference to this
-
extend
default T extend(Type supertype)
Sets the super type of this model. This is a synonym forsetSupertype(Type).- Parameters:
supertype- the super type- Returns:
- a reference to this
- Since:
- 2.5
-
extend
default T extend(Type supertype, Type... params)
Sets the super type of this model to a parameterized type created with the specified base type and generic parameters.- Parameters:
supertype- the supertypeparams- the generic types of that supertype- Returns:
- a reference to this
- Since:
- 2.5
-
extend
default T extend(Type supertype, String... params)
Sets the super type of this model to a parameterized type created with the specified base type and generic parameters.- Parameters:
supertype- the supertypeparams- the generic types of that supertype- Returns:
- a reference to this
- Since:
- 2.5
-
-