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.

AbstractIndexWriter.java 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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.doclets.standard;
  23. import org.aspectj.ajdoc.AspectDoc;
  24. import org.aspectj.ajdoc.IntroducedDoc;
  25. import com.sun.javadoc.ClassDoc;
  26. import com.sun.javadoc.MemberDoc;
  27. import com.sun.tools.doclets.IndexBuilder;
  28. import java.io.IOException;
  29. public class AbstractIndexWriter
  30. extends com.sun.tools.doclets.standard.AbstractIndexWriter
  31. {
  32. protected AbstractIndexWriter(String path,
  33. String filename,
  34. String relativePath,
  35. IndexBuilder indexbuilder)
  36. throws IOException {
  37. super(path, filename, relativePath, indexbuilder);
  38. }
  39. protected AbstractIndexWriter(String filename,
  40. IndexBuilder indexbuilder)
  41. throws IOException {
  42. super(filename, indexbuilder);
  43. }
  44. protected void printClassInfo(ClassDoc cd) {
  45. if (cd instanceof AspectDoc) {
  46. print("aspect ");
  47. printPreQualifiedClassLink(cd);
  48. print('.');
  49. } else {
  50. super.printClassInfo(cd);
  51. }
  52. }
  53. protected void printMemberDesc(MemberDoc member) {
  54. String classdesc = Statics.type(member.containingClass()) + " " +
  55. getPreQualifiedClassLink(member.containingClass());
  56. if (member instanceof org.aspectj.ajdoc.MemberDoc) {
  57. org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)member;
  58. if (md.isAdvice()) {
  59. printText("doclet.Advice_in", classdesc);
  60. } else if (md.isPointcut()) {
  61. printText("doclet.Pointcut_in", classdesc);
  62. }
  63. } else {
  64. super.printMemberDesc(member);
  65. }
  66. if (member instanceof org.aspectj.ajdoc.MemberDoc) {
  67. IntroducedDoc intro =
  68. ((org.aspectj.ajdoc.MemberDoc)member).introduced();
  69. if (intro != null) {
  70. print(' ');
  71. printText("doclet.introduced_by",
  72. Statics.type(intro.containingClass()) + " " +
  73. getPreQualifiedClassLink(intro.containingClass()));
  74. }
  75. }
  76. }
  77. }