Class JavaImportStatement

java.lang.Object
com.github.tadukoo.java.importstatement.JavaImportStatement
All Implemented Interfaces:
JavaCodeType, JavaTokens
Direct Known Subclasses:
EditableJavaImportStatement, UneditableJavaImportStatement

public abstract class JavaImportStatement extends Object implements JavaCodeType
Represents an import statement in Java
Version:
Beta v.0.5
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • isStatic

      protected boolean isStatic
      Whether this import is static or not
    • importName

      protected String importName
      The name for the import
  • Constructor Details

    • JavaImportStatement

      protected JavaImportStatement(boolean editable, boolean isStatic, String importName)
      Constructs a new JavaImportStatement using the given parameters
      Parameters:
      editable - Whether this import statement is editable or not
      isStatic - Whether this import is static or not
      importName - The name for the import
  • Method Details

    • getJavaCodeType

      public JavaCodeTypes getJavaCodeType()
      Specified by:
      getJavaCodeType in interface JavaCodeType
      Returns:
      What type this is
    • isEditable

      public boolean isEditable()
      Returns:
      Whether this import statement is editable or not
    • isStatic

      public boolean isStatic()
      Returns:
      Whether this import is static or not
    • getImportName

      public String getImportName()
      Returns:
      The name for the import
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      The code represented by this import statement
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toBuilderCode

      public String toBuilderCode()
      Specified by:
      toBuilderCode in interface JavaCodeType
      Returns:
      The String of code to build the JavaCodeType