|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.libraries.base.util.ClassQueryTool
public abstract class ClassQueryTool
The class-query tool loads classes using a classloader and calls "processClass" for each class encountered. This is highly expensive and sometimes dangerous excercise as the classloading may trigger static initializers and may exhaust the "permgen" space of the Virtual machine. If possible anyhow, do not use this class.
Constructor Summary | |
---|---|
protected |
ClassQueryTool()
The default constructor. |
Method Summary | |
---|---|
protected boolean |
isValidClass(java.lang.String className)
Checks, whether the class is valid. |
protected abstract void |
processClass(java.lang.ClassLoader classLoader,
java.lang.Class c)
The handler method that is called for every class encountered on the classpath. |
void |
processDirectory(java.io.File directory)
Processes all entries from a given directory, ignoring any subdirectory contents. |
protected void |
processEntry(java.lang.ClassLoader classLoader,
java.lang.String entryName)
Processes a single class-file entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ClassQueryTool()
Method Detail |
---|
protected void processEntry(java.lang.ClassLoader classLoader, java.lang.String entryName)
classLoader
- the classloader that should be used for class- and resource loading.entryName
- the file name in the classpath.protected boolean isValidClass(java.lang.String className)
className
- the name of the class.
protected abstract void processClass(java.lang.ClassLoader classLoader, java.lang.Class c)
classLoader
- the classloader used to load the class.c
- the class that should be handled.public void processDirectory(java.io.File directory) throws java.io.IOException
directory
- the directory to be searched, or null to just use the classpath.
java.io.IOException
- if an error occured while loading the resources from the directory.
java.lang.SecurityException
- if access to the system properties or access to the classloader is restricted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |