Module com.speedment.common.codegen
Interface HasGenerics<T extends HasGenerics<T>>
-
- Type Parameters:
T- the extending type
- All Known Subinterfaces:
Class,ClassOrInterface<T>,Constructor,Enum,Interface,InterfaceMethod,Method
public interface HasGenerics<T extends HasGenerics<T>>A trait for models that containGenericcomponents.- Since:
- 2.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tadd(Generic generic)Adds the specifiedGenericto this model.default Tgeneric(Generic generic)Adds the specifiedGenericto this model.default Tgeneric(Type generic)Created a newGenericwith the specified type and adds it to this model.default Tgeneric(String generic)Created a newGenericwith the specified name and adds it to this model.default Tgeneric(String name, Type type)Created a newGenericwith the specified name and type and adds it to this model.List<Generic>getGenerics()Returns a list of all the generics in this model.
-
-
-
Method Detail
-
add
default T add(Generic generic)
Adds the specifiedGenericto this model.- Parameters:
generic- the new child- Returns:
- a reference to this
-
generic
default T generic(Generic generic)
Adds the specifiedGenericto this model. This method is a synonym ofadd(Generic).- Parameters:
generic- the new child- Returns:
- a reference to this
- Since:
- 2.5
-
generic
default T generic(String generic)
Created a newGenericwith the specified name and adds it to this model.- Parameters:
generic- the name of the new generic variable- Returns:
- a reference to this
- Since:
- 2.5
-
generic
default T generic(Type generic)
Created a newGenericwith the specified type and adds it to this model.- Parameters:
generic- the type of the new generic variable- Returns:
- a reference to this
- Since:
- 2.5
-
generic
default T generic(String name, Type type)
Created a newGenericwith the specified name and type and adds it to this model. Thebound typeof the newGenericwill beGeneric.BoundType.EXTENDS.- Parameters:
name- the name of the new generictype- the upper bound of the new generic- Returns:
- a reference to this
- Since:
- 2.5
-
-