You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Javadoc13.java 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2. *
  3. * This file is part of the debugger and core tools for the AspectJ(tm)
  4. * programming language; see http://aspectj.org
  5. *
  6. * The contents of this file are subject to the Mozilla Public License
  7. * Version 1.1 (the "License"); you may not use this file except in
  8. * compliance with the License. You may obtain a copy of the License at
  9. * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/.
  10. *
  11. * Software distributed under the License is distributed on an "AS IS" basis,
  12. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13. * for the specific language governing rights and limitations under the
  14. * License.
  15. *
  16. * The Original Code is AspectJ.
  17. *
  18. * The Initial Developer of the Original Code is Xerox Corporation. Portions
  19. * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation.
  20. * All Rights Reserved.
  21. */
  22. package org.aspectj.tools.ajdoc.rootmakers;
  23. import com.sun.javadoc.RootDoc;
  24. import com.sun.javadoc.DocErrorReporter;
  25. import java.lang.reflect.Method;
  26. import java.util.List;
  27. import org.aspectj.tools.ajdoc.AccessChecker;
  28. import org.aspectj.tools.ajdoc.RootDocMaker;
  29. import org.aspectj.tools.ajdoc.CannotMakeRootDocException;
  30. /**
  31. * Makes a RootDoc using javadoc from SDK 1.3 as an example.
  32. *
  33. * @author Jeff Palm
  34. */
  35. public class Javadoc13 extends Javadoc implements RootDocMaker {
  36. public Javadoc13() {}
  37. public RootDoc makeRootDoc(String sourcepath,
  38. String classpath,
  39. String bootclasspath,
  40. String extdirs,
  41. long flags,
  42. String encoding,
  43. String locale,
  44. String source,
  45. List classesAndPackages,
  46. List options,
  47. DocErrorReporter messager,
  48. String programName,
  49. AccessChecker filter)
  50. throws CannotMakeRootDocException {
  51. // todo: options ignored in 13?
  52. Class envClass = type("com.sun.tools.javadoc.Env");
  53. if (envClass == null) return null;
  54. Method create = method("create", new Class[]{String.class,
  55. String.class,
  56. String.class,
  57. String.class,
  58. int.class,
  59. String.class},
  60. envClass);
  61. if (create == null) return null;
  62. Object env = invoke(create, null, new Object[]{sourcepath,
  63. classpath,
  64. bootclasspath,
  65. extdirs,
  66. new Integer((int)flags),
  67. encoding});
  68. if (env == null) return null;
  69. return null;
  70. }
  71. }