public class ImportInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Set |
classes |
protected java.util.Set |
packages |
Constructor and Description |
---|
ImportInfo()
Construct an empty ImportInfo instance
|
Modifier and Type | Method and Description |
---|---|
void |
addClass(java.lang.String cls)
Add a class to the set of classes to import (must be
a fully qualified classname - "java.lang.System").
|
void |
addImports(java.net.URL src)
Add imports read from a URL to this ImportInfo instance.
|
void |
addPackage(java.lang.String pkg)
Add a package to the set of packages to import (must be
a fully qualified package - "java.lang").
|
java.util.Iterator |
getClasses()
Return an unmodifiable iterator over the list of classes
|
static ImportInfo |
getImports()
Returns the default ImportInfo instance.
|
java.util.Iterator |
getPackages()
Return an unmodifiable iterator over the list of packages
|
boolean |
removeClass(java.lang.String cls)
Remove a class from the set of classes to import (must be
a fully qualified classname - "java.lang.System").
|
boolean |
removePackage(java.lang.String pkg)
Remove a package from the set of packages to import (must be
a fully qualified package - "java.lang").
|
public static ImportInfo getImports()
public java.util.Iterator getClasses()
public java.util.Iterator getPackages()
public void addClass(java.lang.String cls)
public void addPackage(java.lang.String pkg)
public boolean removeClass(java.lang.String cls)
public boolean removePackage(java.lang.String pkg)
public void addImports(java.net.URL src) throws java.io.IOException
java.io.IOException
Copyright © 2022 Apache Software Foundation. All Rights Reserved.