Class ModuleInfo.ImportDeclaration

java.lang.Object
io.inverno.tool.buildtools.ModuleInfo.ImportDeclaration
Enclosing class:
ModuleInfo

public static class ModuleInfo.ImportDeclaration extends Object

Represents an import declaration in a module descriptor.

Since:
1.4
Author:
Jeremy Kuhn
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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 String
    The name of the imported type
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a blank import declaration.
    ImportDeclaration(String typeName, boolean isStatic, boolean onDemand)
    Creates an import declaration.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the type name.
    boolean
    Determines whether this is a type-import-on-demand declaration.
    boolean
    Determines whether this is a static import declaration.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • typeName

      protected String typeName
      The name of the imported type
    • onDemand

      protected boolean onDemand
      Flag indicating whether this is a type-import-on-demand declaration (i.e. import com.example.*).
    • isStatic

      protected boolean isStatic
      Flag indicating whether this is a static import declaration.
  • Constructor Details

    • ImportDeclaration

      public ImportDeclaration()

      Creates a blank import declaration.

    • ImportDeclaration

      public ImportDeclaration(String typeName, boolean isStatic, boolean onDemand)

      Creates an import declaration.

      Parameters:
      typeName - the type to import
      isStatic - true for a static import, false otherwise
      onDemand - true for a type-import-on-demand, false otherwise
  • Method Details

    • getType

      public String 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
    • toString

      public String toString()
      Overrides:
      toString in class Object