KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > tools > ajdoc > Access


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 com.sun.tools.doclets.standard;
23
package org.aspectj.tools.ajdoc;
24
25 import org.aspectj.tools.doclets.standard.AbstractSubWriter;
26
27 import com.sun.javadoc.ClassDoc;
28 import com.sun.javadoc.Doc;
29 import com.sun.javadoc.ExecutableMemberDoc;
30 import com.sun.javadoc.ProgramElementDoc;
31 import com.sun.tools.doclets.standard.ClassUseWriter;
32 import com.sun.tools.doclets.standard.ExecutableMemberSubWriter;
33 import com.sun.tools.doclets.standard.SubWriterHolderWriter;
34
35 import java.util.List JavaDoc;
36 import java.util.SortedSet JavaDoc;
37
38 /**
39  * Allows for access to protected and package-protected (OK
40  * sometimes private) members in classes in the package
41  * com.sun.tools.doclets...
42  *
43  * @author Jeff Palm
44  */

45 public class Access {
46
47     public static void printSummaryType(AbstractSubWriter mw,
48                                         ProgramElementDoc member) {
49         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
50                     mw.del(),
51                     "printSummaryType",
52                     new Class JavaDoc[]{ProgramElementDoc.class},
53                     new Object JavaDoc[]{member});
54     }
55     public static void printSummaryLink(AbstractSubWriter mw,
56                                         ClassDoc cd,
57                                         ProgramElementDoc member) {
58         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
59                     mw.del(),
60                     "printSummaryLink",
61                     new Class JavaDoc[]{ClassDoc.class,
62                                 ProgramElementDoc.class},
63                     new Object JavaDoc[]{cd, member});
64     }
65     public static void printInheritedSummaryLink(AbstractSubWriter mw,
66                                                  ClassDoc cd,
67                                                  ProgramElementDoc member) {
68         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
69                     mw.del(),
70                     "printInheritedSummaryLink",
71                     new Class JavaDoc[]{ClassDoc.class,
72                                 ProgramElementDoc.class},
73                     new Object JavaDoc[]{cd, member});
74     }
75     public static void printHeader(AbstractSubWriter mw,
76                                    ClassDoc cd) {
77         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
78                     mw.del(),
79                     "printHeader",
80                     new Class JavaDoc[]{ClassDoc.class},
81                     new Object JavaDoc[]{cd});
82     }
83     public static void printBodyHtmlEnd(AbstractSubWriter mw,
84                                         ClassDoc cd) {
85         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
86                     mw.del(),
87                     "printBodyHtmlEnd",
88                     new Class JavaDoc[]{ClassDoc.class},
89                     new Object JavaDoc[]{cd});
90     }
91     public static void printMember(AbstractSubWriter mw,
92                                    ProgramElementDoc elem) {
93         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
94                     mw.del(),
95                     "printMember",
96                     new Class JavaDoc[]{ProgramElementDoc.class},
97                     new Object JavaDoc[]{elem});
98     }
99     public static void printDeprecatedLink(AbstractSubWriter mw,
100                                            ProgramElementDoc member) {
101         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
102                     mw.del(),
103                     "printDeprecatedLink",
104                     new Class JavaDoc[]{ProgramElementDoc.class},
105                     new Object JavaDoc[]{member});
106     }
107     public static void printNavSummaryLink(AbstractSubWriter mw,
108                                            ClassDoc cd,
109                                            boolean link) {
110         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
111                     mw.del(),
112                     "printNavSummaryLink",
113                     new Class JavaDoc[]{ClassDoc.class,
114                                 boolean.class},
115                     new Object JavaDoc[]{cd, new Boolean JavaDoc(link)});
116     }
117     public static void printNavDetailLink(AbstractSubWriter mw,
118                                           boolean link) {
119         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
120                     mw.del(),
121                     "printNavDetailLink",
122                     new Class JavaDoc[]{boolean.class},
123                     new Object JavaDoc[]{new Boolean JavaDoc(link)});
124     }
125     public static void printTags(AbstractSubWriter mw,
126                                  ProgramElementDoc member) {
127         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
128                     mw.del(),
129                     "printTags",
130                     new Class JavaDoc[]{ProgramElementDoc.class},
131                     new Object JavaDoc[]{member});
132     }
133     public static void printDeprecatedAPI(AbstractSubWriter mw,
134                                    List JavaDoc deprmembers,
135                                    String JavaDoc headingKey) {
136         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
137                     mw.del(),
138                     "printDeprecatedAPI",
139                     new Class JavaDoc[]{List JavaDoc.class, String JavaDoc.class},
140                     new Object JavaDoc[]{deprmembers, headingKey});
141     }
142     public static void printParameters(ExecutableMemberSubWriter mw,
143                                        ExecutableMemberDoc member) {
144         Util.invoke(com.sun.tools.doclets.standard.ExecutableMemberSubWriter.class,
145                     mw,
146                     "printParameters",
147                     new Class JavaDoc[]{ExecutableMemberDoc.class},
148                     new Object JavaDoc[]{member});
149     }
150     public static void printUseInfo(AbstractSubWriter mw,
151                                     Object JavaDoc mems,
152                                     String JavaDoc heading) {
153         printUseInfo(mw.del(), mems, heading);
154     }
155     public static void printUseInfo
156         (com.sun.tools.doclets.standard.AbstractSubWriter mw,
157          Object JavaDoc mems,
158          String JavaDoc heading) {
159         if (mw != null) {
160             Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
161                         mw,
162                         "printUseInfo",
163                         new Class JavaDoc[]{Object JavaDoc.class, String JavaDoc.class},
164                         new Object JavaDoc[]{mems, heading});
165         }
166     }
167     public static void printCommentDef(AbstractSubWriter mw, Doc doc) {
168         Util.invoke(SubWriterHolderWriter.class,
169                     writer(mw),
170                     "printCommentDef",
171                     new Class JavaDoc[]{Doc.class},
172                     new Object JavaDoc[]{doc});
173     }
174     public static SubWriterHolderWriter writer(AbstractSubWriter mw) {
175         return (SubWriterHolderWriter)
176             Util.access(com.sun.tools.doclets.standard.AbstractSubWriter.class,
177                         mw, "writer");
178     }
179     public static SortedSet JavaDoc pkgSet(ClassUseWriter writer) {
180         return (SortedSet JavaDoc)Util.access(ClassUseWriter.class,
181                                       writer,
182                                       "pkgSet");
183     }
184     public static ClassDoc classdoc(ClassUseWriter writer) {
185         return (ClassDoc)Util.access(ClassUseWriter.class,
186                                      writer,
187                                      "classdoc");
188     }
189     public static void print(com.sun.tools.doclets.standard.AbstractSubWriter mw,
190                              String JavaDoc str) {
191         Util.invoke(com.sun.tools.doclets.standard.AbstractSubWriter.class,
192                     mw,
193                     "print",
194                     new Class JavaDoc[]{String JavaDoc.class},
195                     new Object JavaDoc[]{str});
196     }
197 }
198
Popular Tags