Module com.speedment.common.codegen
Interface HasImports<T extends HasImports<T>>
-
- Type Parameters:
T- the extending type
- All Known Subinterfaces:
Annotation,AnonymousValue,Class,ClassOrInterface<T>,Constructor,Enum,EnumConstant,Field,File,HasJavadocTags<T>,Initializer,Interface,InterfaceField,InterfaceMethod,Javadoc,JavadocTag,Method
- All Known Implementing Classes:
DefaultJavadocTag
public interface HasImports<T extends HasImports<T>>A trait for models that containImportcomponents.- Since:
- 2.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tadd(Import dep)Adds the specifiedImportto this model.List<Import>getImports()Returns a list of all imports in this model.default Timports(Import dep)Adds the specifiedImportto this model.default Timports(Type type)Creates anImportusing the default implementation and adds it to this model.default Timports(Type type, String method)Creates a staticImportusing the default implementation and adds it to this model.
-
-
-
Method Detail
-
add
default T add(Import dep)
Adds the specifiedImportto this model.- Parameters:
dep- the new child- Returns:
- a reference to this
-
imports
default T imports(Import dep)
Adds the specifiedImportto this model. This is a synonym foradd(Import).- Parameters:
dep- the dependency to add- Returns:
- a reference to this
- Since:
- 2.5
-
imports
default T imports(Type type)
Creates anImportusing the default implementation and adds it to this model.- Parameters:
type- the dependency to add- Returns:
- a reference to this
- Since:
- 2.5
-
imports
default T imports(Type type, String method)
Creates a staticImportusing the default implementation and adds it to this model.- Parameters:
type- the dependency to addmethod- name of the static member method- Returns:
- a reference to this
- Since:
- 2.5
-
-