/[classpath]/gjdoc/src/gnu/classpath/tools/gjdoc/Main.java
ViewVC logotype

Diff of /gjdoc/src/gnu/classpath/tools/gjdoc/Main.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by julian, Fri Dec 3 19:22:52 2004 UTC revision 1.41 by julian, Tue Dec 7 15:00:01 2004 UTC
# Line 26  import java.util.*; Line 26  import java.util.*;
26  import java.lang.reflect.*;  import java.lang.reflect.*;
27  import java.text.Collator;  import java.text.Collator;
28    
29    import gnu.classpath.tools.FileSystemClassLoader;
30    
31  /**  /**
32   * Class that will launch the gjdoc tool.   * Class that will launch the gjdoc tool.
33   */   */
# Line 223  public final class Main Line 225  public final class Main
225    
226        Debug.log(1, "loading doclet class...");        Debug.log(1, "loading doclet class...");
227    
228        Class docletClass = Class.forName(option_doclet);        Class docletClass;
229    
230          if (null != option_docletpath) {
231            try {
232              FileSystemClassLoader docletPathClassLoader
233                = new FileSystemClassLoader(option_docletpath);
234              System.err.println("trying to load class  " + option_doclet + " from path " + option_docletpath);
235              docletClass = docletPathClassLoader.findClass(option_doclet);
236            }
237            catch (Exception e) {
238              docletClass = Class.forName(option_doclet);
239            }
240          }
241          else {
242            docletClass = Class.forName(option_doclet);
243          }
244        //Object docletInstance = docletClass.newInstance();        //Object docletInstance = docletClass.newInstance();
245    
246        Debug.log(1, "doclet class loaded...");        Debug.log(1, "doclet class loaded...");
# Line 312  public final class Main Line 329  public final class Main
329    
330            if (optlen <= 0)            if (optlen <= 0)
331            {            {
332                if (!option.startsWith("-J")) {
333                  //--- Complain if not found
334    
335              //--- Complain if not found                reporter.printError("Unknown option " + option);
336                  shutdown();
337              reporter.printError("Unknown option " + option);              }
             shutdown();  
338            }            }
339            else            else
340            {            {
# Line 537  public final class Main Line 555  public final class Main
555    
556        TemporaryStore tstore = new TemporaryStore(Main.rootDoc);        TemporaryStore tstore = new TemporaryStore(Main.rootDoc);
557    
558          Thread.currentThread().setContextClassLoader(docletClass.getClassLoader());
559    
560        if (null != startTempMethod)        if (null != startTempMethod)
561        {        {
562          startTempMethod.invoke(null, new Object[]          startTempMethod.invoke(null, new Object[]

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26