Class AbstractJavaSourceClassLoader

    • Constructor Detail

      • AbstractJavaSourceClassLoader

        public AbstractJavaSourceClassLoader()
      • AbstractJavaSourceClassLoader

        public AbstractJavaSourceClassLoader​(ClassLoader parentClassLoader)
    • Method Detail

      • setSourcePath

        public abstract void setSourcePath​(File[] sourcePath)
        Parameters:
        sourcePath - The sequence of directories to search for Java™ source files
      • setSourceFileCharacterEncoding

        public abstract void setSourceFileCharacterEncoding​(String optionalCharacterEncoding)
        Parameters:
        optionalCharacterEncoding - if null, use platform default encoding
      • setDebuggingInfo

        public abstract void setDebuggingInfo​(boolean lines,
                                              boolean vars,
                                              boolean source)
        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
      • main

        public static void main​(String[] args)
                         throws Exception
        Read Java™ source code for a given class name, scan, parse, compile and load it into the virtual machine, and invoke its "main()" method with the given arguments.

        Usage is as follows:

           java AbstractJavaSourceClassLoader [ option ] ... class-name [ argument ] ...
        
           option:
             -sourcepath colon-separated-list-of-source-directories
             -encoding character-encoding
             -g                           Generate all debugging info
             -g:none                      Generate no debugging info
             -g:{source,lines,vars}       Generate only some debugging info
         
        Throws:
        Exception