-
- All Superinterfaces:
HasCopy<Import>,HasModifiers<Import>,HasParent<HasImports<?>,Import>,HasType<Import>,ImportModifier<Import>
public interface Import extends HasParent<HasImports<?>,Import>, HasCopy<Import>, HasType<Import>, ImportModifier<Import>
A model that represents the explicit import of an dependency in code.- Since:
- 2.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<String>getStaticMember()Returns any static member referenced in this import.default TnotStatic()Removes thestatickeyword from this model.static Importof(Type type)Creates a new instance implementing this interface by using the default implementation.ImportsetStaticMember(String member)Sets the static member referenced by this import.default Tstatic_()Adds thestatickeyword to this model.-
Methods inherited from interface com.speedment.common.codegen.model.trait.HasModifiers
getModifiers
-
-
-
-
Method Detail
-
getStaticMember
Optional<String> getStaticMember()
Returns any static member referenced in this import. For non-static imports, this value will be empty.- Returns:
- the static member referenced
-
setStaticMember
Import setStaticMember(String member)
Sets the static member referenced by this import. Remember to also set the modifier to static using thestatic_()method!- Parameters:
member- the new static member to reference- Returns:
- a reference to this model
-
of
static Import of(Type type)
Creates a new instance implementing this interface by using the default implementation.- Parameters:
type- the type- Returns:
- the new instance
-
static_
default T static_()
Adds thestatickeyword to this model.- Returns:
- a reference to this model
-
notStatic
default T notStatic()
Removes thestatickeyword from this model.- Returns:
- a reference to this model
-
-