Interface ImportList

  • All Known Implementing Classes:
    ImportListImpl

    public interface ImportList
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Type addImport​(java.lang.String name)
      Add a fully-qualified type name to the imports.
      void addImport​(Type type)  
      boolean contains​(java.lang.String name)
      Return whether or not this Type is in the imports.
      boolean contains​(Type type)  
      ImportList copy()
      Return a copy of this ImportList.
      java.util.List<Pair<java.lang.String,​java.lang.String>> getInOrderList()
      Return a list of imports as (packageName,className) pairs.
      Type lookup​(java.lang.String className)
      Lookup just the className, without package name.
    • Method Detail

      • copy

        ImportList copy()
        Return a copy of this ImportList.
      • addImport

        Type addImport​(java.lang.String name)
        Add a fully-qualified type name to the imports. Returns the Type for the name.
      • addImport

        void addImport​(Type type)
      • contains

        boolean contains​(java.lang.String name)
        Return whether or not this Type is in the imports.
      • contains

        boolean contains​(Type type)
      • lookup

        Type lookup​(java.lang.String className)
        Lookup just the className, without package name.
      • getInOrderList

        java.util.List<Pair<java.lang.String,​java.lang.String>> getInOrderList()
        Return a list of imports as (packageName,className) pairs. The list is sorted lexicographically.