|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.acciente.commons.loader.JavaCompiledClassDefLoader
public class JavaCompiledClassDefLoader
A class definition loader that loads compiled Java class files.
Constructor Summary | |
---|---|
JavaCompiledClassDefLoader()
|
|
JavaCompiledClassDefLoader(File oCompiledDirectory)
|
Method Summary | |
---|---|
Set |
findClassNames(String[] asPackageNames,
Pattern oClassNamePattern)
Searches for class names that match the specified package root and regex. |
ClassDef |
getClassDef(String sClassName)
Load the byte code and other information about the specified class |
File |
getCompiledDirectory()
Returns the compiled directory from which this classloader loads java compiled files |
String |
getPackageNamePrefix()
Returns the package name prefix set by a call to setPackageNamePrefix() or a null string if no package name prefix was ever set. |
ResourceDef |
getResourceDef(String sResourceName)
Load the data and other information about the specified resource |
void |
setCompiledDirectory(File sCompiledDirectory)
Sets the directory from which this classloader will attempt to java compiled files |
void |
setPackageNamePrefix(String sPackageNamePrefix)
A package name prefix that represents the prefix that should be removed from the class name passed to loadClass() before attempting to convert the class's package name to a sub-directory off the specified compiled directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaCompiledClassDefLoader()
public JavaCompiledClassDefLoader(File oCompiledDirectory)
Method Detail |
---|
public ClassDef getClassDef(String sClassName) throws ClassNotFoundException
ClassDefLoader
getClassDef
in interface ClassDefLoader
sClassName
- the name of the class for which a definition is requested
ClassNotFoundException
- if this loader was able to locate the class definition was
unable to sucessfully load itpublic ResourceDef getResourceDef(String sResourceName)
ClassDefLoader
getResourceDef
in interface ClassDefLoader
sResourceName
- the name of the class for which a definition is requested
public Set findClassNames(String[] asPackageNames, Pattern oClassNamePattern)
ClassDefLoader
findClassNames
in interface ClassDefLoader
asPackageNames
- an array of starting package names to start the search, if the package names arg
is null all package names are searchedoClassNamePattern
- a java regex that defines the classnames that match the search
public File getCompiledDirectory()
public void setCompiledDirectory(File sCompiledDirectory)
sCompiledDirectory
- a File object representing a directory pathpublic String getPackageNamePrefix()
public void setPackageNamePrefix(String sPackageNamePrefix)
sPackageNamePrefix
- null or a package name without a terminating period (e.g: foo.bar and NOT foo.bar.)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |