|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.script.ImportInfo
This class represents a list of Java classes/packages to import into a scripting environment. It can initializes it's self by reading a file, from the classpath (META_INF/imports/script.xt). The format of the file is as follows: Anything after a '#' on a line is ignored. The first space delimited token on a line must be either 'class' or 'package'. The remainder of a line is whitespace delimited, fully qualified, Java class/package name (i.e. java.lang.System).
Field Summary | |
protected Set |
classes
|
protected Set |
packages
|
Constructor Summary | |
ImportInfo()
Construct an empty ImportInfo instance |
Method Summary | |
void |
addClass(String cls)
Add a class to the set of classes to import (must be a fully qualified classname - "java.lang.System"). |
void |
addImports(URL src)
Add imports read from a URL to this ImportInfo instance. |
void |
addPackage(String pkg)
Add a package to the set of packages to import (must be a fully qualified package - "java.lang"). |
Iterator |
getClasses()
Return an unmodifiable iterator over the list of classes |
static ImportInfo |
getImports()
Returns the default ImportInfo instance. |
Iterator |
getPackages()
Return an unmodifiable iterator over the list of packages |
boolean |
removeClass(String cls)
Remove a class from the set of classes to import (must be a fully qualified classname - "java.lang.System"). |
boolean |
removePackage(String pkg)
Remove a package from the set of packages to import (must be a fully qualified package - "java.lang"). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Set classes
protected Set packages
Constructor Detail |
public ImportInfo()
Method Detail |
public static ImportInfo getImports()
public Iterator getClasses()
public Iterator getPackages()
public void addClass(String cls)
public void addPackage(String pkg)
public boolean removeClass(String cls)
public boolean removePackage(String pkg)
public void addImports(URL src) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |