Class ImportOrderer.Import

java.lang.Object
com.google.googlejavaformat.java.ImportOrderer.Import
Enclosing class:
ImportOrderer

class ImportOrderer.Import extends Object
An import statement.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final String
     
    private final boolean
     
    private final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Import(String imported, String trailing, boolean isStatic)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) String
    The name being imported, for example java.util.List.
    (package private) boolean
    True if this is an Android import per AOSP style.
    (package private) boolean
    True if this is a Java import per AOSP style.
    (package private) boolean
    True if this is import static.
    boolean
    True if this is a third-party import per AOSP style.
    (package private) String
    The top-level package of the import.
     
    (package private) String
    The // comment lines after the final ;, up to and including the line terminator of the last one.

    Methods inherited from class java.lang.Object

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

    • imported

      private final String imported
    • isStatic

      private final boolean isStatic
    • trailing

      private final String trailing
  • Constructor Details

    • Import

      Import(String imported, String trailing, boolean isStatic)
  • Method Details

    • imported

      String imported()
      The name being imported, for example java.util.List.
    • isStatic

      boolean isStatic()
      True if this is import static.
    • topLevel

      String topLevel()
      The top-level package of the import.
    • isAndroid

      boolean isAndroid()
      True if this is an Android import per AOSP style.
    • isJava

      boolean isJava()
      True if this is a Java import per AOSP style.
    • trailing

      String trailing()
      The // comment lines after the final ;, up to and including the line terminator of the last one. Note: In case two imports were separated by a space (which is disallowed by the style guide), the trailing whitespace of the first import does not include a line terminator.
    • isThirdParty

      public boolean isThirdParty()
      True if this is a third-party import per AOSP style.
    • toString

      public String toString()
      Overrides:
      toString in class Object