Class ImportListImpl

java.lang.Object
org.glassfish.pfl.dynamic.codegen.impl.ImportListImpl
All Implemented Interfaces:
ImportList

public class ImportListImpl extends Object implements ImportList
  • Constructor Details

    • ImportListImpl

      public ImportListImpl()
  • Method Details

    • copy

      public ImportList copy()
      Description copied from interface: ImportList
      Return a copy of this ImportList.
      Specified by:
      copy in interface ImportList
    • addImport

      public Type addImport(String name)
      Add a fully-qualified type name to the imports. Returns the Type for the name.
      Specified by:
      addImport in interface ImportList
    • addImport

      public void addImport(Type type)
      Specified by:
      addImport in interface ImportList
    • contains

      public boolean contains(String name)
      Return whether or not this Type is in the imports.
      Specified by:
      contains in interface ImportList
    • contains

      public boolean contains(Type type)
      Specified by:
      contains in interface ImportList
    • lookup

      public Type lookup(String className)
      Lookup just the className, without package name.
      Specified by:
      lookup in interface ImportList
    • getInOrderList

      public List<Pair<String,String>> getInOrderList()
      Return a list of imports as (packageName,className) pairs. The list is sorted lexicographically.
      Specified by:
      getInOrderList in interface ImportList