Module io.inverno.tool.buildtools
Package io.inverno.tool.buildtools
Class ModuleInfo.ImportDeclaration
java.lang.Object
io.inverno.tool.buildtools.ModuleInfo.ImportDeclaration
- Enclosing class:
ModuleInfo
Represents an import declaration in a module descriptor.
- Since:
- 1.4
- Author:
- Jeremy Kuhn
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Flag indicating whether this is a static import declaration.protected boolean
Flag indicating whether this is a type-import-on-demand declaration (i.e.protected boolean
Flag indicating whether the directive should be removed if it exists.protected String
The name of the imported type -
Constructor Summary
ConstructorDescriptionCreates a blank import declaration.ImportDeclaration
(String typeName, boolean isStatic, boolean onDemand) Creates an import declaration. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
Returns the type name.boolean
Determines whether this is a type-import-on-demand declaration.boolean
isRemove()
Determines whether the directive should be removed when defined.boolean
isStatic()
Determines whether this is a static import declaration.toString()
-
Field Details
-
typeName
The name of the imported type -
onDemand
protected boolean onDemandFlag indicating whether this is a type-import-on-demand declaration (i.e.import com.example.*
). -
isStatic
protected boolean isStaticFlag indicating whether this is a static import declaration. -
remove
protected boolean removeFlag indicating whether the directive should be removed if it exists.
-
-
Constructor Details
-
ImportDeclaration
public ImportDeclaration()Creates a blank import declaration.
-
ImportDeclaration
Creates an import declaration.
- Parameters:
typeName
- the type to importisStatic
- true for a static import, false otherwiseonDemand
- true for a type-import-on-demand, false otherwise
-
-
Method Details
-
getType
Returns the type name.
- Returns:
- the type name
-
isStatic
public boolean isStatic()Determines whether this is a static import declaration.
- Returns:
- true if this is a static import declaration, false otherwise
-
isOnDemand
public boolean isOnDemand()Determines whether this is a type-import-on-demand declaration.
- Returns:
- true if this is a type-import-on-demand declaration, false otherwise
-
isRemove
public boolean isRemove()Determines whether the directive should be removed when defined.
- Returns:
- true to remove the directive false otherwise
-
toString
-