Class JavaSourceClassLoader
- java.lang.Object
- 
- java.lang.ClassLoader
- 
- org.codehaus.commons.compiler.AbstractJavaSourceClassLoader
- 
- org.codehaus.commons.compiler.jdk.JavaSourceClassLoader
 
 
 
- 
 public class JavaSourceClassLoader extends AbstractJavaSourceClassLoader AClassLoaderthat loads classes by looking for their source files through a "source path" and compiling them on-the-fly.Notice that this class loader does not support resoures in the sense of ClassLoader.getResource(String),ClassLoader.getResourceAsStream(String)ndClassLoader.getResources(String).- See Also:
- ClassLoaders
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classJavaSourceClassLoader.DiagnosticExceptionContainer for aDiagnosticobject.- 
Nested classes/interfaces inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoaderAbstractJavaSourceClassLoader.ProtectionDomainFactory
 
- 
 - 
Field Summary- 
Fields inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoaderprotectionDomainFactory
 
- 
 - 
Constructor SummaryConstructors Constructor Description JavaSourceClassLoader()JavaSourceClassLoader(java.lang.ClassLoader parentClassLoader)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class<?>findClass(java.lang.String className)Implementation ofClassLoader.findClass(String).voidsetCompilerOptions(java.lang.String[] compilerOptions)Notice: Don't use the '-g' options - these are controlled throughsetDebuggingInfo(boolean, boolean, boolean).voidsetDebuggingInfo(boolean lines, boolean vars, boolean source)voidsetSourceCharset(java.nio.charset.Charset charset)voidsetSourceFinder(ResourceFinder sourceFinder)voidsetSourcePath(java.io.File[] sourcePath)- 
Methods inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoadergetResourceAsStream, main, setProtectionDomainFactory, setSourceFileCharacterEncoding
 - 
Methods inherited from class java.lang.ClassLoaderclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
- 
 
- 
- 
- 
Method Detail- 
setSourcePathpublic void setSourcePath(java.io.File[] sourcePath) - Specified by:
- setSourcePathin class- AbstractJavaSourceClassLoader
- Parameters:
- sourcePath- The sequence of directories to search for Java source files
 
 - 
setSourceFinderpublic void setSourceFinder(ResourceFinder sourceFinder) - Specified by:
- setSourceFinderin class- AbstractJavaSourceClassLoader
- Parameters:
- sourceFinder- Is used when searching for Java source files
 
 - 
setSourceCharsetpublic void setSourceCharset(java.nio.charset.Charset charset) - Specified by:
- setSourceCharsetin class- AbstractJavaSourceClassLoader
- Parameters:
- charset- The character set to using when reading characters from a source file
 
 - 
setDebuggingInfopublic void setDebuggingInfo(boolean lines, boolean vars, boolean source)- Specified by:
- setDebuggingInfoin class- AbstractJavaSourceClassLoader
- Parameters:
- lines- Whether line number debugging information should be generated
- vars- Whether variables debugging information should be generated
- source- Whether source file debugging information should be generated
 
 - 
setCompilerOptionspublic void setCompilerOptions(java.lang.String[] compilerOptions) Notice: Don't use the '-g' options - these are controlled throughsetDebuggingInfo(boolean, boolean, boolean).- Parameters:
- compilerOptions- All command line options supported by the JDK JAVAC tool
 
 - 
findClassprotected java.lang.Class<?> findClass(java.lang.String className) throws java.lang.ClassNotFoundExceptionImplementation ofClassLoader.findClass(String).- Overrides:
- findClassin class- java.lang.ClassLoader
- Throws:
- java.lang.ClassNotFoundException
 
 
- 
 
-