org.codehaus.commons.compiler.jdk
Class JavaSourceClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by org.codehaus.commons.compiler.AbstractJavaSourceClassLoader
          extended by org.codehaus.commons.compiler.jdk.JavaSourceClassLoader

public class JavaSourceClassLoader
extends AbstractJavaSourceClassLoader


Nested Class Summary
static class JavaSourceClassLoader.DiagnosticException
           
 
Nested classes/interfaces inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoader
AbstractJavaSourceClassLoader.ProtectionDomainFactory
 
Field Summary
 
Fields inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoader
optionalProtectionDomainFactory
 
Constructor Summary
JavaSourceClassLoader()
           
JavaSourceClassLoader(java.lang.ClassLoader parentClassLoader)
           
 
Method Summary
protected  java.lang.Class<?> findClass(java.lang.String className)
          Implementation of ClassLoader.findClass(String).
 void setCompilerOptions(java.lang.String[] compilerOptions)
          Notice: Don't use the '-g' options - these are controlled through setDebuggingInfo(boolean, boolean, boolean).
 void setDebuggingInfo(boolean lines, boolean vars, boolean source)
           
 void setSourceFileCharacterEncoding(java.lang.String optionalCharacterEncoding)
           
 void setSourcePath(java.io.File[] sourcePath)
           
 
Methods inherited from class org.codehaus.commons.compiler.AbstractJavaSourceClassLoader
main, setProtectionDomainFactory
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSourceClassLoader

public JavaSourceClassLoader()
See Also:
ICompilerFactory.newJavaSourceClassLoader()

JavaSourceClassLoader

public JavaSourceClassLoader(java.lang.ClassLoader parentClassLoader)
See Also:
ICompilerFactory.newJavaSourceClassLoader(ClassLoader)
Method Detail

setSourcePath

public void setSourcePath(java.io.File[] sourcePath)
Specified by:
setSourcePath in class AbstractJavaSourceClassLoader
Parameters:
sourcePath - The sequence of directories to search for Java™ source files

setSourceFileCharacterEncoding

public void setSourceFileCharacterEncoding(java.lang.String optionalCharacterEncoding)
Specified by:
setSourceFileCharacterEncoding in class AbstractJavaSourceClassLoader
Parameters:
optionalCharacterEncoding - if null, use platform default encoding

setDebuggingInfo

public void setDebuggingInfo(boolean lines,
                             boolean vars,
                             boolean source)
Specified by:
setDebuggingInfo in 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

setCompilerOptions

public void setCompilerOptions(java.lang.String[] compilerOptions)
Notice: Don't use the '-g' options - these are controlled through setDebuggingInfo(boolean, boolean, boolean).

Parameters:
compilerOptions - All command line options supported by the JDK JAVAC tool

findClass

protected java.lang.Class<?> findClass(java.lang.String className)
                                throws java.lang.ClassNotFoundException
Implementation of ClassLoader.findClass(String).

Overrides:
findClass in class java.lang.ClassLoader
Throws:
java.lang.ClassNotFoundException


Copyright © 2001-2011. All Rights Reserved.