001: /*
002: * Create a graphviz graph based on the classes in the specified java
003: * source files.
004: *
005: * (C) Copyright 2002-2005 Diomidis Spinellis
006: *
007: * Permission to use, copy, and distribute this software and its
008: * documentation for any purpose and without fee is hereby granted,
009: * provided that the above copyright notice appear in all copies and that
010: * both that copyright notice and this permission notice appear in
011: * supporting documentation.
012: *
013: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
014: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
015: * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
016: *
017: * $Id$
018: *
019: */
020:
021: package org.umlgraph.doclet;
022:
023: import com.sun.javadoc.ClassDoc;
024: import com.sun.javadoc.PackageDoc;
025: import com.sun.javadoc.RootDoc;
026: import com.sun.javadoc.SeeTag;
027: import com.sun.javadoc.SourcePosition;
028: import com.sun.javadoc.Tag;
029:
030: /**
031: * RootDoc wrapper that provides WrappedClassDoc instances instead of plain ClassDoc in order
032: * to optimize the overall performance of UMLDoc.
033: * @author wolf
034: */
035: public class WrappedRootDoc implements RootDoc {
036: RootDoc wrapped;
037: WrappedClassDoc[] wrappedClassDocs;
038:
039: public WrappedRootDoc(RootDoc wrapped) {
040: this .wrapped = wrapped;
041: ClassDoc[] classes = wrapped.classes();
042: wrappedClassDocs = new WrappedClassDoc[classes.length];
043: for (int i = 0; i < classes.length; i++) {
044: wrappedClassDocs[i] = new WrappedClassDoc(classes[i]);
045: }
046: }
047:
048: public ClassDoc[] classes() {
049: return wrappedClassDocs;
050: }
051:
052: public ClassDoc classNamed(String arg0) {
053: return wrapped.classNamed(arg0);
054: }
055:
056: public String commentText() {
057: return wrapped.commentText();
058: }
059:
060: public int compareTo(Object arg0) {
061: return wrapped.compareTo(arg0);
062: }
063:
064: public Tag[] firstSentenceTags() {
065: return wrapped.firstSentenceTags();
066: }
067:
068: public String getRawCommentText() {
069: return wrapped.getRawCommentText();
070: }
071:
072: public Tag[] inlineTags() {
073: return wrapped.inlineTags();
074: }
075:
076: public boolean isAnnotationType() {
077: return wrapped.isAnnotationType();
078: }
079:
080: public boolean isAnnotationTypeElement() {
081: return wrapped.isAnnotationTypeElement();
082: }
083:
084: public boolean isClass() {
085: return wrapped.isClass();
086: }
087:
088: public boolean isConstructor() {
089: return wrapped.isConstructor();
090: }
091:
092: public boolean isEnum() {
093: return wrapped.isEnum();
094: }
095:
096: public boolean isEnumConstant() {
097: return wrapped.isEnumConstant();
098: }
099:
100: public boolean isError() {
101: return wrapped.isError();
102: }
103:
104: public boolean isException() {
105: return wrapped.isException();
106: }
107:
108: public boolean isField() {
109: return wrapped.isField();
110: }
111:
112: public boolean isIncluded() {
113: return wrapped.isIncluded();
114: }
115:
116: public boolean isInterface() {
117: return wrapped.isInterface();
118: }
119:
120: public boolean isMethod() {
121: return wrapped.isMethod();
122: }
123:
124: public boolean isOrdinaryClass() {
125: return wrapped.isOrdinaryClass();
126: }
127:
128: public String name() {
129: return wrapped.name();
130: }
131:
132: public String[][] options() {
133: return wrapped.options();
134: }
135:
136: public PackageDoc packageNamed(String arg0) {
137: return wrapped.packageNamed(arg0);
138: }
139:
140: public SourcePosition position() {
141: return wrapped.position();
142: }
143:
144: public void printError(SourcePosition arg0, String arg1) {
145: wrapped.printError(arg0, arg1);
146: }
147:
148: public void printError(String arg0) {
149: wrapped.printError(arg0);
150: }
151:
152: public void printNotice(SourcePosition arg0, String arg1) {
153: wrapped.printNotice(arg0, arg1);
154: }
155:
156: public void printNotice(String arg0) {
157: wrapped.printNotice(arg0);
158: }
159:
160: public void printWarning(SourcePosition arg0, String arg1) {
161: wrapped.printWarning(arg0, arg1);
162: }
163:
164: public void printWarning(String arg0) {
165: wrapped.printWarning(arg0);
166: }
167:
168: public SeeTag[] seeTags() {
169: return wrapped.seeTags();
170: }
171:
172: public void setRawCommentText(String arg0) {
173: wrapped.setRawCommentText(arg0);
174: }
175:
176: public ClassDoc[] specifiedClasses() {
177: return wrapped.specifiedClasses();
178: }
179:
180: public PackageDoc[] specifiedPackages() {
181: return wrapped.specifiedPackages();
182: }
183:
184: public Tag[] tags() {
185: return wrapped.tags();
186: }
187:
188: public Tag[] tags(String arg0) {
189: return wrapped.tags(arg0);
190: }
191:
192: }
|