|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.tiger.view.faces.PackageInfo
public final class PackageInfo
Utility class with methods that support getting a recursive list of classes starting with a specific package name.
Constructor Summary | |
---|---|
PackageInfo()
|
Method Summary | |
---|---|
protected String |
filenameToClassname(String entryName)
Convert a filename to a classname. |
Class[] |
getClasses(List<Class> classes,
String pckgname)
Return an array of all classes, visible to our application class loader, in the specified Java package. |
static PackageInfo |
getInstance()
Get the singleton instance of this class. |
protected void |
listFilesRecursive(List<Class> classes,
File base,
ClassLoader cld,
String pckgname)
Traverse a directory structure starting at base , adding
matching files to the specified list. |
protected void |
loadClass(List<Class> classes,
ClassLoader cld,
String className)
Load the class className using the classloader
cld , and add it to the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PackageInfo()
Method Detail |
---|
public static final PackageInfo getInstance()
Get the singleton instance of this class.
public Class[] getClasses(List<Class> classes, String pckgname) throws ClassNotFoundException
Return an array of all classes, visible to our application class loader, in the specified Java package.
classes
- List of matching classes being accumulatedpckgname
- Package name used to select matching classes
ClassNotFoundException
protected String filenameToClassname(String entryName)
Convert a filename to a classname.
entryName
- Filename to be convertedprotected void loadClass(List<Class> classes, ClassLoader cld, String className)
Load the class className
using the classloader
cld
, and add it to the list.
classes
- List of matching classes being accumulatedcld
- ClassLoader from which to load the specified classclassName
- Name of the class to be loadedprotected void listFilesRecursive(List<Class> classes, File base, ClassLoader cld, String pckgname)
Traverse a directory structure starting at base
, adding
matching files to the specified list.
classes
- List of matching classes being accumulatedbase
- Base file from which to recursecld
- ClassLoader being searched for matching classespckgname
- Package name used to select matching classes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |