org.glassfish.pfl.dynamic.codegen.impl
Class ImportListImpl

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

public class ImportListImpl
extends Object
implements ImportList


Constructor Summary
ImportListImpl()
           
 
Method Summary
 Type addImport(String name)
          Add a fully-qualified type name to the imports.
 void addImport(Type type)
           
 boolean contains(String name)
          Return whether or not this Type is in the imports.
 boolean contains(Type type)
           
 ImportList copy()
          Return a copy of this ImportList.
 List<org.glassfish.pfl.basic.contain.Pair<String,String>> getInOrderList()
          Return a list of imports as (packageName,className) pairs.
 Type lookup(String className)
          Lookup just the className, without package name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportListImpl

public ImportListImpl()
Method Detail

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<org.glassfish.pfl.basic.contain.Pair<String,String>> getInOrderList()
Return a list of imports as (packageName,className) pairs. The list is sorted lexicographically.

Specified by:
getInOrderList in interface ImportList


Copyright © 2013 Oracle. All Rights Reserved.