Class ImportOrderer.Import

  • Enclosing class:
    ImportOrderer

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

      Fields 
      Modifier and Type Field Description
      private java.lang.String imported  
      private boolean isStatic  
      private java.lang.String trailing  
    • Constructor Summary

      Constructors 
      Constructor Description
      Import​(java.lang.String imported, java.lang.String trailing, boolean isStatic)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String imported()
      The name being imported, for example java.util.List.
      (package private) boolean isAndroid()
      True if this is an Android import per AOSP style.
      (package private) boolean isJava()
      True if this is a Java import per AOSP style.
      (package private) boolean isStatic()
      True if this is import static.
      boolean isThirdParty()
      True if this is a third-party import per AOSP style.
      (package private) java.lang.String topLevel()
      The top-level package of the import.
      java.lang.String toString()  
      (package private) java.lang.String trailing()
      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 Detail

      • imported

        private final java.lang.String imported
      • isStatic

        private final boolean isStatic
      • trailing

        private final java.lang.String trailing
    • Constructor Detail

      • Import

        Import​(java.lang.String imported,
               java.lang.String trailing,
               boolean isStatic)
    • Method Detail

      • imported

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

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

        java.lang.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

        java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object