diff options
author | Andy Clement <aclement@pivotal.io> | 2019-02-08 15:02:11 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-02-08 15:02:11 -0800 |
commit | 635f0ed47ffe11e93d96e4d24e4411eedfa1ddc9 (patch) | |
tree | 2fa95e5cf13bdefa559ce341761f90de747421e9 /aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard | |
parent | 66f6e011d251d84250c562950f491cab31af0ad3 (diff) | |
download | aspectj-635f0ed47ffe11e93d96e4d24e4411eedfa1ddc9.tar.gz aspectj-635f0ed47ffe11e93d96e4d24e4411eedfa1ddc9.zip |
tidyup retired modules and add aspectjtools submodule
Diffstat (limited to 'aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard')
32 files changed, 0 insertions, 5618 deletions
diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractIndexWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractIndexWriter.java deleted file mode 100644 index 4adc29409..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractIndexWriter.java +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.tools.doclets.IndexBuilder; - -import java.io.IOException; - -public class AbstractIndexWriter - extends com.sun.tools.doclets.standard.AbstractIndexWriter -{ - - protected AbstractIndexWriter(String path, - String filename, - String relativePath, - IndexBuilder indexbuilder) - throws IOException { - super(path, filename, relativePath, indexbuilder); - } - - protected AbstractIndexWriter(String filename, - IndexBuilder indexbuilder) - throws IOException { - super(filename, indexbuilder); - } - - protected void printClassInfo(ClassDoc cd) { - if (cd instanceof AspectDoc) { - print("aspect "); - printPreQualifiedClassLink(cd); - print('.'); - } else { - super.printClassInfo(cd); - } - } - - protected void printMemberDesc(MemberDoc member) { - String classdesc = Statics.type(member.containingClass()) + " " + - getPreQualifiedClassLink(member.containingClass()); - if (member instanceof org.aspectj.ajdoc.MemberDoc) { - org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)member; - if (md.isAdvice()) { - printText("doclet.Advice_in", classdesc); - } else if (md.isPointcut()) { - printText("doclet.Pointcut_in", classdesc); - } - } else { - super.printMemberDesc(member); - } - if (member instanceof org.aspectj.ajdoc.MemberDoc) { - IntroducedDoc intro = - ((org.aspectj.ajdoc.MemberDoc)member).introduced(); - if (intro != null) { - print(' '); - printText("doclet.introduced_by", - Statics.type(intro.containingClass()) + " " + - getPreQualifiedClassLink(intro.containingClass())); - } - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractStandard.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractStandard.java deleted file mode 100644 index e490eabd6..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractStandard.java +++ /dev/null @@ -1,477 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.DocErrorReporter; -import com.sun.javadoc.PackageDoc; -import com.sun.javadoc.RootDoc; -import com.sun.tools.doclets.ClassTree; -import com.sun.tools.doclets.DocletAbortException; -import com.sun.tools.doclets.HtmlDocWriter; -import com.sun.tools.doclets.IndexBuilder; - -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.util.Arrays; - -/** - * An abstract allowing one to customize the writers - * used in ajdoc. Subclasses should define the three - * generate methods to specify the documentation made. - * - * @see #preGenerationClasses() - * @see #postGenerationClasses() - * @see #checkClasses() - * @author Jeff Palm - */ -public abstract class AbstractStandard - extends com.sun.tools.doclets.standard.Standard { - - // todo wes removed restriction, but implemented Standard as singleton via proxy - private static int refCount = 0; - { - if (refCount > 0) { - System.err.println("Warning: " + refCount + " AbstractStandard already "); - } - refCount++; - } - - /** - * The ClassTree that is available to subclasses and it gaurateed - * to be created before pre-generating classes. - */ - protected ClassTree classtree; - - protected static boolean start(AbstractStandard as, - RootDoc root) throws IOException { - try { - as.getConfiguration().setOptions(root); - as.startGeneration(root); - } catch (DocletAbortException exc) { - return false; - } - return true; - } - - /** - * Returns the types of {@link Pass}es that will - * run before generating classes. - * - * @return an array of Class, where each entry - * is a subclass of {@link Pass}, ordered - * to run directly before generating the - * classes. - */ - protected abstract Class[] preGenerationClasses(); - - /** - * Returns the types of {@link Pass}es that will - * run after generating classes. - * - * @return an array of Class, where each entry - * is a subclass of {@link Pass}, ordered - * to run directly after generating the - * classes. - */ - protected abstract Class[] postGenerationClasses(); - - /** - * Returns the types of {@link CheckPass}es that will - * run to check the classes. - * - * @return an array of Class, where each entry - * is a subclass of {@link CheckPass}, ordered - * to run in order to check the classes passed - * into the class generation phase. - */ - protected abstract Class[] checkClasses(); - - /** - * Return the configuration used by a subclass. This - * allows the subclass to specify it's own kind. - * - * @return a customized configuration. - */ - public abstract ConfigurationStandard getConfiguration(); - - protected ConfigurationStandard makeConfiguration() { - return new ConfigurationStandard(); - } - - - /** - * Returns the configuration, and ensures that - * HtmlDocWriter.configuration is of the type used by - * this class. - * - * @return the current instanceof ConfigurationStandard being - * used and creates one if needed. This will <b>not</b> - * be null. - */ - // todo these are the heinous globals that impose one process per classloader - public static com.sun.tools.doclets.standard.ConfigurationStandard - configuration() { - if (HtmlDocWriter.configuration == null || - !(HtmlDocWriter.configuration instanceof ConfigurationStandard)) { - HtmlDocWriter.configuration = new ConfigurationStandard(); - //TODO: change to makeConfiguration() - } - return (ConfigurationStandard)HtmlDocWriter.configuration; - } - - /** - * Creates and returns an IndexBuilder that includes aspects. - * - * @param root RootDoc to pass the new IndexBuilder. - * @param classesOnly <code>true</code> if only classes - * should be included. - * @return an IndexBuilder that includes aspects. - */ - protected IndexBuilder indexBuilder(RootDoc root, boolean classesOnly) { - class MyIndexBuilder extends IndexBuilder { - public MyIndexBuilder(RootDoc r, boolean n) { - super(r, n); - } - public MyIndexBuilder(RootDoc r, boolean n, boolean b) { - super(r, n, b); - } - protected void putMembersInIndexMap(ClassDoc classdoc) { - super.putMembersInIndexMap(classdoc); - if (classdoc instanceof org.aspectj.ajdoc.ClassDoc) { - org.aspectj.ajdoc.ClassDoc cd = - (org.aspectj.ajdoc.ClassDoc)classdoc; - adjustIndexMap(cd.pointcuts()); - if (cd instanceof AspectDoc) { - adjustIndexMap(((AspectDoc)cd).advice()); - } - } - } - } - return new MyIndexBuilder(root, configuration().nodeprecated, classesOnly); - } - - - /** - * Does the work in generating the documentation. - * First, call all the passes return from {@link #generateCheckPasses} - * them perform some copying. Second build the classtree, run the - * pre-classgeneration passes, generate the packages, generate the - * classes, then call all the postGenerationClasses. - * - * @param root the root of the documentation. - */ - protected void startGeneration(RootDoc root) throws DocletAbortException { - - if (!generateCheckPasses(getConfiguration(), root)) return; - - performCopy(getConfiguration().destdirname, - getConfiguration().helpfile); - performCopy(getConfiguration().destdirname, - getConfiguration().stylesheetfile); - - classtree = new ClassTree(root, getConfiguration().nodeprecated); - - generatePrePasses(getConfiguration(), root); - - generatePackageCycle(getConfiguration().packages, - getConfiguration().createtree, - getConfiguration().nodeprecated); - generateClassFiles(root, classtree); - generatePostPasses(getConfiguration(), root); - } - - /** - * A class representing a single pass in the generation cycles. It - * does some of the dirty work for you. - */ - public static abstract class Pass { - - /** The root available to this pass. */ - protected RootDoc root; - - /** The configuration available to this pass. */ - protected ConfigurationStandard cs; - - /** The doclet available to this pass. */ - protected AbstractStandard std; - - public Pass() {} - - /** - * Returns the title of the pass for logging. - * - * @return the unique title of this pass. This can - * be <code>null</code> to disable display. - */ - public abstract String title(); - - /** - * Do the generation work. All instance variables - * are guaranteed to be set. - */ - protected abstract void gen() throws DocletAbortException; - - /** - * Do the actual generation if {@link #cond} returns - * <code>true</code>. Do some other logging, too. - * - * @param std the AbstractStandard to use. - * @param cs the ConfigurationStandard to use. - * @param root the RootDoc to use. - */ - public final void generate(AbstractStandard std, - ConfigurationStandard cs, - RootDoc root) - throws DocletAbortException { - this.std = std; - this.cs = cs; - this.root = root; - if (cond()) { - String title = title(); - long start = System.currentTimeMillis(); - if (cs.log && title != null) { - cs.standardmessage.notice("doclet.pass_msg", title); - } - gen(); - if (cs.log && title != null) { - long stop = System.currentTimeMillis(); - cs.standardmessage.notice("doclet.done_msg", - title, (stop-start)+""); - } - } - } - - /** - * Returns whether the generation should proceed. Override - * this method for conditional passes. - * - * @return <code>true</code> is this pass shoulud proceed. - */ - protected boolean cond() { - return true; - } - } - - /** - * A convenience class for doing checks. - */ - public abstract static class Check extends Pass { - - /** - * Returns the error message if check fails. - * - * @return error message if check fails. - */ - protected abstract String message(); - - /** - * Returns whether check has failed or not. - * - * @return <code>true</code> is check fails. - */ - protected abstract boolean cond(); - - /** - * Prints message, because we've failed and throws - * a DocletAbortException to notify the doclet - * that we've failed. - */ - protected void gen() throws DocletAbortException { - cs.standardmessage.error(message()); - throw new DocletAbortException(); - } - - /** - * Returns null, because we don't want to be displayed. - * - * @return <code>null</code>. - */ - public String title() { return null; } - } - - /** - * Generates the passes to run before generating the classes. - */ - private final void generatePrePasses(ConfigurationStandard cs, - RootDoc root) - throws DocletAbortException { - generatePasses(cs, root, preGenerationClasses()); - } - - /** - * Generates the passes to run after generating the classes. - */ - private final void generatePostPasses(ConfigurationStandard cs, - RootDoc root) - throws DocletAbortException { - generatePasses(cs, root, postGenerationClasses()); - } - - /** - * Generates the passes that run before doing anything. These - * passes check that it's OK to do anything. - */ - private final boolean generateCheckPasses(ConfigurationStandard cs, - RootDoc root) - throws DocletAbortException { - try { - generatePasses(cs, root, checkClasses()); - } catch (DocletAbortException e) { - return false; - } - return true; - } - - /** - * Generates passes from <code>classes</code>. For each - * class found in <code>classes</code> a constructor taking zero - * or one-argument is called. Then the generate method is - * called on that Pass passing it <code>this</code>, the - * configuration, and root. - * - * @param cs configuration to use. - * @param root root we're documenting. - * @param classes list of subtypes of {@link Pass} that - * will be run. - */ - private final void generatePasses(ConfigurationStandard cs, - RootDoc root, - Class[] classes) - throws DocletAbortException { - if (classes == null) return; - nextClass: - for (int i = 0; i < classes.length; i++) { - try { - Constructor[] ctrs = classes[i].getConstructors(); - nextCtr: - for (int j = 0; j < ctrs.length; j++) { - Pass pass = null; - if (ctrs[j].getParameterTypes().length == 0) { - pass = (Pass)ctrs[j].newInstance(new Object[]{}); - } else if (ctrs[j].getParameterTypes().length == 1) { - pass = (Pass)ctrs[j].newInstance(new Object[]{this}); - } - if (pass != null) { - pass.generate(this,cs,root); - continue nextClass; - } - } - throw new Exception("Can't create pass for class " + classes[i]); - } catch (Exception e) { - e.printStackTrace(); - Standard.configuration().standardmessage. - error("doclet.exception", e+""); - throw new DocletAbortException(); - } - } - } - - - /** - * Generates the packages. - */ - protected void generatePackageCycle(PackageDoc[] pkgs, - boolean createtree, - boolean nodeprecated) - throws DocletAbortException { - Arrays.sort(pkgs); - for (int i = 0; i < pkgs.length; i++) { - PackageDoc prev = i == 0 ? null : pkgs[i-1]; - PackageDoc curr = pkgs[i]; - PackageDoc next = i == pkgs.length-1 ? null : pkgs[i+1]; - generatePackages(prev, curr, next, - createtree, nodeprecated); - } - } - - /** - * Generates a package doc for the three PackageDocs passed. - */ - protected void generatePackages(PackageDoc prev, - PackageDoc curr, - PackageDoc next, - boolean createtree, - boolean nodeprecated) - throws DocletAbortException { - PackageWriter.generate(curr, prev, next); - if (createtree) { - PackageTreeWriter.generate(curr, prev, - next, nodeprecated); - } - PackageFrameWriter.generate(curr); - } - - /** - * Generates all the classes. - */ - protected void generateClassCycle(ClassDoc[] cs, - ClassTree classtree, - boolean nopackage) - throws DocletAbortException { - Arrays.sort(cs); - for(int i = 0; i < cs.length; i++) { - if (configuration().nodeprecated && - cs[i].tags("deprecated").length > 0) { - continue; - } - ClassDoc prev = i == 0 ? null : cs[i-1]; - ClassDoc curr = cs[i]; - ClassDoc next = i == cs.length-1 ? null : cs[i+1]; - generateClasses(prev, curr, next, - classtree, nopackage); - } - } - - /** - * Generates class docs for the three ClassDocs passed. - */ - protected void generateClasses(ClassDoc prev, - ClassDoc curr, - ClassDoc next, - ClassTree classtree, - boolean nopackage) - throws DocletAbortException { - ClassWriter.generate(curr, prev, next, - classtree, nopackage); - } - - /** - * Returns the delegation to {@link #configuration()}. - */ - public static int optionLength(String option) { - return configuration().optionLength(option); - } - - /** - * Returns the delegation to {@link #configuration()}. - */ - public static boolean validOptions(String options[][], - DocErrorReporter reporter) - throws IOException { - return configuration().validOptions(options, reporter); - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractSubWriter.java deleted file mode 100644 index dbb0d96a6..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractSubWriter.java +++ /dev/null @@ -1,393 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.tools.ajdoc.Access; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; - -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - - -public class AbstractSubWriter - extends com.sun.tools.doclets.standard.AbstractSubWriter - implements AbstractSubWriterAJ -{ - - public AbstractSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public AbstractSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - public final void printSummaryMember(ClassDoc cd, ProgramElementDoc member) { - writer.printSummaryLinkType(this, member); - printSummaryLink(cd, member); - printSummaryLinkComment(member); - } - - protected final void printCrosscuts(ProgramElementDoc member) { - if (hasCrosscuts(classdoc, member)) { - writer.dl(); - writer.dd(); - printCrosscuts(classdoc, member); - writer.ddEnd(); - writer.dlEnd(); - } - } - - protected /*abstract*/ Class delegateClass() { throw new RuntimeException(""); } - /*final*/ private com.sun.tools.doclets.standard.AbstractSubWriter del; - { setDelegator(); } - protected final void setDelegator() { - com.sun.tools.doclets.standard.AbstractSubWriter mw = null; - try { - List list = new ArrayList(); - if (writer != null) list.add(writer); - if (classdoc != null) list.add(classdoc); - setDelegator(mw = findDelegate - (list.toArray - (new Object[list.size()]))); - } finally { - del = mw; - } - } - public final com.sun.tools.doclets.standard.AbstractSubWriter del() { - return del; - } - private final void setDelegator(Object o) { - if (o == null) return; - try { - Method[] ms = o.getClass().getMethods(); - for (int i = 0; i < ms.length; i++) { - if (ms[i].getName().equals("setDelegator")) { - ms[i].invoke(o, new Object[]{this}); - } - } - } catch (Exception e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", e+""); - } - } - private final com.sun.tools.doclets.standard.AbstractSubWriter - findDelegate(Object[] params) { - if (delegateClass() == null) { - return this; - } - try { - Constructor[] cs = delegateClass().getConstructors(); - for (int i = 0; i < cs.length; i++) { - if (cs[i].getParameterTypes().length == params.length) { - return (com.sun.tools.doclets.standard.AbstractSubWriter) - cs[i].newInstance(params); - } - } - } catch (Exception e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", e+""); - } - return null; - } - - public int getMemberKind() { - return -1; - } - public void printSummaryLabel(ClassDoc cd) { - if (keyName() != null) { - summaryLabel(keyName()); - } else { - del.printSummaryLabel(cd); - } - } - public void printSummaryAnchor(ClassDoc cd) { - if (keyName() != null) { - summaryAnchor(keyName()); - } else { - del.printSummaryAnchor(cd); - } - } - public void printInheritedSummaryAnchor(ClassDoc cd) { - del.printInheritedSummaryAnchor(cd); - } - protected void printSummaryType(ProgramElementDoc member) { - Access.printSummaryType(this, member); - } - protected void printSummaryLink(ClassDoc cd, - ProgramElementDoc member) { - Access.printSummaryLink(this, cd, member); - } - protected void printInheritedSummaryLink(ClassDoc cd, - ProgramElementDoc member) { - Access.printInheritedSummaryLink(this, cd, member); - } - protected void printHeader(ClassDoc cd) { - if (keyName() != null) { - header(keyName()); - } else { - Access.printHeader(this, cd); - } - } - protected void printBodyHtmlEnd(ClassDoc cd) { - Access.printBodyHtmlEnd(this, cd); - } - protected final void printMember(ProgramElementDoc elem) { - nonfinalPrintMember(elem); - printCrosscuts(elem); - } - protected void nonfinalPrintMember(ProgramElementDoc elem) { - Access.printMember(this, elem); - } - protected void printDeprecatedLink(ProgramElementDoc member) { - Access.printDeprecatedLink(this, member); - } - protected void printNavSummaryLink(ClassDoc cd, boolean link) { - if (keyName() != null) { - navSummaryLink(cd, keyName(), link); - } else { - Access.printNavSummaryLink(this, cd, link); - } - } - protected void printNavDetailLink(boolean link) { - if (keyName() != null) { - navDetailLink(keyName(), link); - } else { - Access.printNavDetailLink(this, link); - } - } - - protected /*abstract*/ String propertyName() { return keyName(); } - protected /*abstract*/ String keyName() { return null; } - protected final String lowercase() { - String str = propertyName(); - return str == null || str.length() == 0 ? "" : - Character.toLowerCase(str.charAt(0)) + - str.substring(1); - } - public void printInheritedSummaryLabel(ClassDoc cd) { - summaryLabel("Inherited_From", cd); - } - public void printIntroducedSummaryLabel(ClassDoc cd) { - summaryLabel("Introduced_From", cd); - } - public void printIntroducedSummaryAnchor(ClassDoc cd) { - summaryAnchor("introduced_from_class", cd); - } - protected final void summaryLabel(String keyName) { - writer.boldText("doclet." + keyName + "_Summary"); - } - protected final void summaryAnchor(String keyName) { - writer.anchor(keyName.toLowerCase() + "_summary"); - } - protected final void summaryLabel(String type, ClassDoc cd) { - writer.bold(); - writer.printText("doclet." + propertyName() + "s_" + type, - Statics.type(cd), - writer.getPreQualifiedClassLink(cd)); - writer.boldEnd(); - } - protected final void summaryAnchor(String type, ClassDoc cd) { - writer.anchor(lowercase() + "s_" + type + "_" + cd.qualifiedName()); - } - protected final String navKey(String keyName) { - return "doclet.nav" + keyName; - } - protected final String navKey() { - return navKey(keyName()); - } - protected final void navLink(ClassDoc cd, String keyName, - boolean link, String kind) { - if (link) { - writer.printHyperLink - ("", - cd == null ? - keyName.toLowerCase() + "_" + kind : - keyName.toLowerCase() + "s_inherited_from_class_" + - cd.qualifiedName(), - writer.getText(navKey(keyName))); - } else { - writer.printText(navKey(keyName)); - } - } - protected final void navSummaryLink(ClassDoc cd, String keyName, boolean link) { - navLink(cd, keyName, link, "summary"); - } - protected final void navDetailLink(String keyName, boolean link) { - navLink(null, keyName, link, "detail"); - } - protected final void header(String keyName) { - writer.anchor(keyName.toLowerCase() + "_detail"); - writer.printTableHeadingBackground - (writer.getText("doclet." + keyName + "_Detail")); - } - - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) {} - public void printSummaryCrosscuts(ClassDoc cd, ProgramElementDoc member) {} - public boolean hasCrosscuts(ClassDoc cd,ProgramElementDoc member) { - return false; - } - - protected void printHead(String name) { - writer.h3(); - writer.print(name); - writer.h3End(); - } - - protected List nointros(List members) { - List list = new ArrayList(); - for (Iterator i = members.iterator(); i.hasNext();) { - Object o = i.next(); - if (o instanceof org.aspectj.ajdoc.MemberDoc) { - IntroducedDoc intro = - ((org.aspectj.ajdoc.MemberDoc)o).introduced(); - if (intro == null || intro.containingClass().equals(classdoc)) { - list.add(o); - } - } else { - list.add(o); - } - } - return list; - } - - public void printMembersSummary() { - nointros = true; - super.printMembersSummary(); - nointros = false; - } - - protected final void printSummaryLinkComment(ProgramElementDoc member) { - writer.codeEnd(); - writer.println(); - writer.br(); - Access.printCommentDef(this, member); - boolean newline = member.tags("deprecated").length + - member.firstSentenceTags().length > 0; - if (classdoc != null || true) { // ?? always - if (hasCrosscuts(classdoc, member)) { - if (newline) { - writer.br(); - writer.printNbsps(); - } - printSummaryCrosscuts(classdoc, member); - } - } - writer.summaryRowEnd(); - writer.trEnd(); - } - - public void printIntroducedSummaryHeader(ClassDoc cd) { - printIntroducedSummaryAnchor(cd); - writer.tableIndexSummary(); - writer.tableInheritedHeaderStart("#EEEEFF"); - printIntroducedSummaryLabel(cd); - writer.tableInheritedHeaderEnd(); - writer.trBgcolorStyle("white", "TableRowColor"); - writer.summaryRow(0); - writer.code(); - } - - public void printIntroducedSummaryFooter(ClassDoc cd) { - writer.codeEnd(); - writer.summaryRowEnd(); - writer.trEnd(); - writer.tableEnd(); - writer.space(); - } - - public void printIntroducedSummaryMember(ClassDoc cd, - ProgramElementDoc member) { - printIntroducedSummaryLink(cd, member); - } - - public void printIntroducedSummaryLink(ClassDoc cd, - ProgramElementDoc member) {} - public void printIntroducedMembersSummary() { - Map typesToMembers = new HashMap(); - for (Iterator i = members(classdoc).iterator(); i.hasNext();) { - Object o = i.next(); - if (!(o instanceof org.aspectj.ajdoc.MemberDoc)) continue; - org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)o; - if (md.introduced() != null) { - ClassDoc cd = md.introduced().containingClass(); - List members = (List)typesToMembers.get(cd); - if (members == null) members = new ArrayList(); - members.add(md); - typesToMembers.put(cd, members); - } - } - for (Iterator i = typesToMembers.keySet().iterator(); i.hasNext();) { - ClassDoc cd = (ClassDoc)i.next(); - printIntroducedSummaryHeader(cd); - List members = (List)typesToMembers.get(cd); - Collections.sort(members); - for (Iterator j = members.iterator(); j.hasNext();) { - printIntroducedSummaryMember(cd, (ProgramElementDoc)j.next()); - if (j.hasNext()) print(", "); - } - printIntroducedSummaryFooter(cd); - } - } - - - private boolean nointros = false; - public void printMembers() { - nointros = true; - super.printMembers(); - nointros = false; - } - - public void navSummaryLink() { - nointros = true; - super.navSummaryLink(); - nointros = false; - } - - protected void navDetailLink() { - printNavDetailLink(members(classdoc).size() > 0 ? true : false); - } - - public final List members(ClassDoc cd) { - return nointros ? nointros(getMembers(cd)) : getMembers(cd); - } - - protected List getMembers(ClassDoc cd) { - return super.members(cd); - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractSubWriterAJ.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractSubWriterAJ.java deleted file mode 100644 index 75d114e43..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractSubWriterAJ.java +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; - -public interface AbstractSubWriterAJ { - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member); - public void printSummaryCrosscuts(ClassDoc cd, ProgramElementDoc member); - public boolean hasCrosscuts(ClassDoc cd, ProgramElementDoc member); - public void printIntroducedSummaryAnchor(ClassDoc cd); - public void printIntroducedSummaryLabel(ClassDoc cd); -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractTreeWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractTreeWriter.java deleted file mode 100644 index 504eb4460..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AbstractTreeWriter.java +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ - -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.PackageDoc; -import com.sun.tools.doclets.ClassTree; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; -import java.util.List; - -public class AbstractTreeWriter - extends com.sun.tools.doclets.standard.AbstractTreeWriter -{ - - protected boolean seenAspect = false; - protected boolean aspectMode = false; - - protected AbstractTreeWriter(String filename, ClassTree classtree) - throws IOException, DocletAbortException { - super(filename, classtree); - } - - protected AbstractTreeWriter(String path, String filename, - ClassTree classtree, PackageDoc pkg) - throws IOException, DocletAbortException { - super(path, filename, classtree, pkg); - } - - protected void generateLevelInfo(ClassDoc parent, List list) { - if (list.size() > 0) { - ul(); - for (int i = 0; i < list.size(); i++) { - ClassDoc local = (ClassDoc)list.get(i); - boolean isAspect = local instanceof org.aspectj.ajdoc.AspectDoc; - if (aspectMode) { - if (!local.qualifiedTypeName().equals("java.lang.Object") - && !isAspect) { - continue; - } - } else if (isAspect) { - continue; - } - printPartialInfo(local); - printExtendsImplements(parent, local); - generateLevelInfo(local, classtree.subs(local)); - } - ulEnd(); - } - } - - protected void printExtendsImplements(ClassDoc parent, ClassDoc cd) { - super.printExtendsImplements(parent, cd); - if (cd instanceof AspectDoc) { - printDominationInfo(((AspectDoc)cd).dominatees(), "dominates"); - printDominationInfo(((AspectDoc)cd).dominators(), "dominated by"); - } - } - - protected void printDominationInfo(AspectDoc[] aspects, - String whosOnTop) { - if (aspects != null && aspects.length > 0) { - print(" (" + whosOnTop + " "); - for (int i = 0; i < aspects.length; i++) { - if (i > 0) print(", "); - printPreQualifiedClassLink(aspects[i]); - } - print(")"); - } - } - - - protected void generateTree(List list, String heading) { - super.generateTree(list, heading); - if (heading.equals("doclet.Class_Hierarchy")) { - aspectMode = true; - generateTree(list, "doclet.Aspect_Hierarchy"); - aspectMode = false; - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AdviceSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AdviceSubWriter.java deleted file mode 100644 index 02b56dd8c..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/AdviceSubWriter.java +++ /dev/null @@ -1,273 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AdviceDoc; -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.tools.ajdoc.Access; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ExecutableMemberDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.javadoc.Tag; -import com.sun.javadoc.Type; -import com.sun.tools.doclets.Util; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.TreeMap; - -public class AdviceSubWriter extends ExecutableMemberSubWriter { - - protected Class delegateClass() { - return MethodSubWriter.class; - } - - public AdviceSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - AspectDoc aspectdoc) - { - super(writer, aspectdoc); - } - - public AdviceSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected final String keyName() { return "Advice"; } - - protected String where(ProgramElementDoc member) { - return getWhere(classdoc, member); - } - - public static String getWhere(ClassDoc cd, ProgramElementDoc member) { - return getName(cd, (AdviceDoc)member).replace(' ','_').replace('#','-'); - } - - protected void printSummaryType(ProgramElementDoc member) { - AdviceDoc advice = (AdviceDoc)member; - printModifiers(advice); - } - - protected void printReturnTag(Tag[] returnsTag) { - if (returnsTag.length > 0) { - writer.dt(); - writer.boldText("doclet.Returns"); - writer.dd(); - writer.printInlineComment(returnsTag[0]); - } - } - - protected void printTagsInfoHeader() { - writer.dd(); - writer.dl(); - } - - protected void printTagsInfoFooter() { - writer.dlEnd(); - writer.ddEnd(); - } - - protected void printSignature(ExecutableMemberDoc member) { - AdviceDoc advice = (AdviceDoc)member; - writer.displayLength = 0; - writer.pre(); - printReturnType(advice); - bold(advice.name()); - printParameters(advice); - if (advice.isThrowing()) { - writer.print(" throwing "); - printExtraType(advice.extraType()); - } - if (advice.isReturning()) { - writer.print(" returning "); - printExtraType(advice.extraType()); - } - writer.preEnd(); - } - - protected void printExtraType(Type type) { - print(' '); - print('('); - if (type != null) { - printTypeLink(type); - } - print(')'); - } - - public static String getName(ClassDoc cd, AdviceDoc advice) { - String name = advice.name(); - int num = 1; - for (Iterator i = staticMembers(cd).iterator(); i.hasNext();) { - AdviceDoc ad = (AdviceDoc)i.next(); - if (ad.equals(advice)) { - break; - } - if (ad.name().equals(name)) { - num++; - } - } - return name + " #" + num; - } - - protected String name(ProgramElementDoc member) { - return getName(classdoc, (AdviceDoc)member); - } - - protected void printParameters(ExecutableMemberDoc member) { - //AdviceDoc advice = (AdviceDoc)member; - Access.printParameters - ((com.sun.tools.doclets.standard.ExecutableMemberSubWriter) - ((AbstractSubWriter)del()).del(), - member); - } - - protected void printReturnType(AdviceDoc advice) { - Type type = advice.returnType(); - if (type != null) { - printTypeLink(type); - print(' '); - } - } - - public void nonfinalPrintMember(ProgramElementDoc elem) { - AdviceDoc advice = (AdviceDoc)elem; - writer.anchor(where(advice)); - printHead(advice); - printSignature(advice); - printFullComment(advice); - } - - protected void printSummaryLink(ClassDoc cd, ProgramElementDoc member) { - ExecutableMemberDoc emd = (ExecutableMemberDoc)member; - String name = emd.name(); - writer.bold(); - writer.printClassLink(cd, where(emd), name, false); - writer.boldEnd(); - writer.displayLength = name.length(); - printParameters(emd); - } - - protected void printHead(MemberDoc member) { - printHead(name(member)); - } - - protected static List staticMembers(ClassDoc classdoc) { - if (!(classdoc instanceof AspectDoc)) return Collections.EMPTY_LIST; - AdviceDoc[] advice = ((AspectDoc)classdoc).advice(); - return advice == null ? Collections.EMPTY_LIST : Util.asList(advice); - } - - protected List getMembers(ClassDoc classdoc) { - return staticMembers(classdoc); - } - - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - if (!(cd instanceof AspectDoc)) return; - //AspectDoc ad = (AspectDoc)cd; - AdviceDoc advice = (AdviceDoc)member; - ExecutableMemberDoc[] crosscuts = advice.crosscuts(); - if (null != crosscuts && crosscuts.length > 0) { - writer.dt(); - writer.boldText("doclet.Crosscuts"); - Set set = new HashSet(); - for (int i = 0; i < crosscuts.length; i++) { - set.add(crosscuts[i]); - } - List list = new ArrayList(set); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - ExecutableMemberDoc emd = (ExecutableMemberDoc)i.next(); - if (null != emd) { - writer.dd(); - writer.code(); - String where = emd instanceof AdviceDoc - ? where(emd) - : super.where(emd); - writer.printClassLink(emd.containingClass(), - where, label(emd)); - print(" in "); - writer.printClassLink(emd.containingClass()); - writer.codeEnd(); - print('.'); - } - } - } - } - - public void printSummaryCrosscuts(ClassDoc cd, - ProgramElementDoc member) { - - class CCs extends TreeMap { - void add(ExecutableMemberDoc cc) { - if (null != cc) { - Object o = get(cc.containingClass()); - if (o == null) { - o = cc; - } else if (o instanceof ExecutableMemberDoc) { - o = new Integer(2); - } else { - o = new Integer(((Integer)o).intValue()+1); - } - put(cc.containingClass(), o); - } - } - } - - ExecutableMemberDoc[] crosscuts = ((AdviceDoc)member).crosscuts(); - if (crosscuts.length > 0) { - writer.boldText("doclet.Advises"); - CCs ccs = new CCs(); - for (int i = 0; i < crosscuts.length; i++) { - ccs.add(crosscuts[i]); - } - for (Iterator i = ccs.keySet().iterator(); i.hasNext();) { - print(' '); - ClassDoc target = (ClassDoc)i.next(); - Object o = ccs.get(target); - String link; - String name = target.name(); - if (o instanceof AdviceDoc) { - link = where((AdviceDoc)o); - } else if (o instanceof ExecutableMemberDoc) { - link = super.where((ExecutableMemberDoc)o); - } else { - link = "method_detail"; - name += "(" + o + ")"; - } - writer.printClassLink(target, link, name); - if (i.hasNext()) print(","); - } - } - } - - public boolean hasCrosscuts(ClassDoc classDoc, ProgramElementDoc member) { - return true; - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassSubWriter.java deleted file mode 100644 index 1587efee4..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassSubWriter.java +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.javadoc.Type; -import com.sun.tools.doclets.VisibleMemberMap; - -public class ClassSubWriter extends AbstractSubWriter { - - public static class Del extends com.sun.tools.doclets.standard.ClassSubWriter { - protected ClassSubWriter mw; - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - public void printMembersSummary() { - mw.printMembersSummary(); - mw.printIntroducedMembersSummary(); - if (writer instanceof ClassWriter) { - ((ClassWriter)writer).printAspectJSummary(); - } - } - public void printMembers() { - mw.printMembers(); - } - protected void navSummaryLink() { - mw.navSummaryLink(); - if (writer instanceof ClassWriter) { - ((ClassWriter)writer).navstate++; - } - } - protected void navDetailLink() { - mw.navDetailLink(); - } - public void setDelegator(ClassSubWriter mw) { this.mw = mw; } - } - - protected Class delegateClass() { - return Del.class; - } - - public ClassSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public ClassSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - public int getMemberKind() { - //XXX hack!!! - return VisibleMemberMap.INNERCLASSES; - } - - protected void printSummaryType(ProgramElementDoc member) { - ClassDoc cd = (ClassDoc)member; - printModifierAndType(cd, null); - } - - protected void printModifierAndType(ProgramElementDoc member, - Type type) { - writer.printTypeSummaryHeader(); - printModifier(member); - if (type == null) { - print(member instanceof AspectDoc ? - "aspect" : member.isClass() ? - "class" : - "interface"); - } else { - printTypeLink(type); - } - writer.printTypeSummaryFooter(); - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassUseMapper.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassUseMapper.java deleted file mode 100644 index 8c1a1ab89..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassUseMapper.java +++ /dev/null @@ -1,294 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AdviceDoc; -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.ajdoc.IntroducedSuperDoc; -import org.aspectj.ajdoc.IntroductionDoc; -import org.aspectj.ajdoc.PointcutDoc; -import org.aspectj.tools.ajdoc.Util; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ExecutableMemberDoc; -import com.sun.javadoc.FieldDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.PackageDoc; -import com.sun.javadoc.Parameter; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.javadoc.RootDoc; -import com.sun.javadoc.Type; -import com.sun.tools.doclets.ClassTree; -import com.sun.tools.doclets.DocletAbortException; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -/** - * Provides support for aspects. - * - * @author Jeff Palm - */ -public class ClassUseMapper { - - - /** - * Maps a ClassDoc to advice that return its type. - */ - public final Map classToAdviceReturn = new HashMap(); - - /** - * Maps a ClassDoc to advice that have its type - * are arguments. - */ - public final Map classToAdviceArgs = new HashMap(); - - /** - * Maps a ClassDoc to pointcuts that return its type. - */ - public final Map classToPointcutReturn = new HashMap(); - - /** - * Maps a ClassDoc to pointcuts that have its type - * as arguments. - */ - public final Map classToPointcutArgs = new HashMap(); - - /** - * Maps a ClassDoc to field introductions that - * are its type. - */ - public final Map classToFieldIntroductions = new HashMap(); - - /** - * Maps a ClassDoc to class introductions that - * are its type. - */ - public final Map classToClassIntroductions = new HashMap(); - - /** - * Maps a ClassDoc to interface introductions that - * are its type. - */ - public final Map classToInterfaceIntroductions = new HashMap(); - - /** - * Maps a ClassDoc to aspects that advise it. - */ - public final Map classToAdvisors = new HashMap(); - - /** - * Maps a ClassDoc to aspects that it dominates. - */ - public final Map classToDominatees = new HashMap(); - - /** - * Maps a ClassDoc to aspects that dominate it.. - */ - public final Map classToDominators = new HashMap(); - - - public static void generate(RootDoc root, ClassTree classtree) - throws DocletAbortException { - try { - - ClassUseMapper mapper = new ClassUseMapper(root, classtree); - - ClassDoc[] classes = root.classes(); - for (int i = 0; i < classes.length; i++) { - ClassUseWriter.generate(mapper, classes[i]); - } - PackageDoc[] pkgs = Standard.configuration().packages; - for (int i = 0; i < pkgs.length; i++) { - com.sun.tools.doclets.standard.PackageUseWriter. - generate(mapper.mapper, pkgs[i]); - } - } catch (Exception e) { - e.printStackTrace(); - Standard.configuration().standardmessage. - error("doclet.exception", e+"", - "creating class use tree"); - throw new DocletAbortException(); - } - } - - protected final com.sun.tools.doclets.standard.ClassUseMapper mapper; - - public ClassUseMapper(RootDoc root, ClassTree classtree) - throws Exception { - Constructor constr = - com.sun.tools.doclets.standard.ClassUseMapper.class. - getDeclaredConstructor(new Class[] { - com.sun.javadoc.RootDoc.class, - com.sun.tools.doclets.ClassTree.class, - }); - constr.setAccessible(true); - mapper = (com.sun.tools.doclets.standard.ClassUseMapper)constr. - newInstance(new Object[]{root, classtree}); - - classToPackageSave = new HashMap(); - for (Iterator i = mapper.classToPackage.keySet().iterator(); i.hasNext();) { - Object key = i.next(); - classToPackageSave.put(key, new HashSet((Collection) - mapper.classToPackage. - get(key))); - } - - finish(root, classtree); - } - - protected Object saved; - protected final Map classToPackageSave; - protected final com.sun.tools.doclets.standard.ClassUseMapper mapper - (ClassDoc classdoc) - { - Object noaspects = classToPackageSave.get(classdoc); - saved = mapper.classToPackage.get(classdoc); - mapper.classToPackage.put(classdoc, noaspects); - return mapper; - } - - protected void restore(ClassDoc classdoc) { - mapper.classToPackage.put(classdoc, saved); - } - - protected void finish(RootDoc root, ClassTree classtree) { - - ClassDoc[] classes = root.classes(); - for (int i = 0; i < classes.length; i++) { - ClassDoc cd = classes[i]; - if (cd instanceof org.aspectj.ajdoc.ClassDoc) { - org.aspectj.ajdoc.ClassDoc acd = (org.aspectj.ajdoc.ClassDoc)cd; - PointcutDoc[] pcs = acd.pointcuts(); - for (int j = 0; j < pcs.length; j++) { - PointcutDoc pd = pcs[j]; - mapExecutable(pd); - Type result = pd.resultType(); - if (result != null) { - ClassDoc tcd = result.asClassDoc(); - if (tcd != null) { - add(classToPointcutReturn, tcd, pd); - } - } - } - } - - if (cd instanceof AspectDoc) { - AspectDoc ad = (AspectDoc)cd; - AdviceDoc[] adocs = ad.advice(); - for (int j = 0; j < adocs.length; j++) { - AdviceDoc adoc = adocs[j]; - mapExecutable(adoc); - Type result = adoc.returnType(); - if (result != null) { - ClassDoc tcd = result.asClassDoc(); - if (tcd != null) { - add(classToAdviceReturn, tcd, adoc); - } - } - ExecutableMemberDoc[] emds = adoc.crosscuts(); - if (null != emds) { - for (int k = 0; k < emds.length; k++) { - ExecutableMemberDoc emd = emds[k]; - if (null != emd) { - ClassDoc tcd = emd.containingClass(); - ClassDoc fcd = adoc.containingClass(); - //TODO: This probably sucks!!! - if (!refList(classToAdvisors, tcd).contains(fcd)) { - add(classToAdvisors, tcd, fcd); - } - } - } - } - } - - IntroductionDoc[] ids = ad.introductions(); - for (int j = 0; j < ids.length; j++) { - IntroductionDoc id = ids[j]; - if (id instanceof IntroducedDoc) { - IntroducedDoc idd = (IntroducedDoc)id; - MemberDoc mem = idd.member(); - if (mem.isField()) { - FieldDoc fd = (FieldDoc)mem; - ClassDoc tcd = fd.type().asClassDoc(); - add(classToFieldIntroductions, tcd, fd); - } - } else if (id instanceof IntroducedSuperDoc) { - IntroducedSuperDoc idd = (IntroducedSuperDoc)id; - boolean isImplements = idd.isImplements(); - Type[] types = idd.types(); - for (int k = 0; k < types.length; k++) { - ClassDoc tcd = types[k].asClassDoc(); - add(isImplements ? - classToInterfaceIntroductions : - classToClassIntroductions, tcd, idd); - } - } - } - AspectDoc[] dominatees = ad.dominatees(); - for (int j = 0; j < dominatees.length; j++) { - add(classToDominatees, ad, dominatees[j]); - } - AspectDoc[] dominators = ad.dominators(); - for (int j = 0; j < dominators.length; j++) { - add(classToDominators, ad, dominators[j]); - } - } - } - } - - protected void mapExecutable(ExecutableMemberDoc em) { - Parameter[] params = em.parameters(); - List classargs = new ArrayList(); - Map argsmap = ((org.aspectj.ajdoc.MemberDoc)em).isAdvice() ? - classToAdviceArgs : classToPointcutArgs ; - for (int i = 0; i < params.length; i++) { - ClassDoc pcd = params[i].type().asClassDoc(); - if (pcd != null && !classargs.contains(pcd)) { - add(argsmap, pcd, em); - classargs.add(pcd); - } - } - } - - protected List refList(Map map, ClassDoc cd) { - return (List)Util.invoke(mapper, "refList", - new Class[]{java.util.Map.class, - com.sun.javadoc.ClassDoc.class}, - new Object[]{map, cd}); - } - - protected void add(Map map, ClassDoc cd, ProgramElementDoc ref) { - Util.invoke(mapper, "add", - new Class[]{java.util.Map.class, - com.sun.javadoc.ClassDoc.class, - com.sun.javadoc.ProgramElementDoc.class}, - new Object[]{map, cd, ref}); - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassUseWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassUseWriter.java deleted file mode 100644 index 97ab8020c..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassUseWriter.java +++ /dev/null @@ -1,272 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.tools.ajdoc.Access; -import org.aspectj.tools.ajdoc.Util; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.PackageDoc; -import com.sun.tools.doclets.DirectoryManager; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.File; -import java.io.IOException; -import java.util.Map; - -/** - * Provides support for aspects. - * - * @author Jeff Palm - */ -public class ClassUseWriter - extends com.sun.tools.doclets.standard.ClassUseWriter -{ - - /** - * The target ClassDoc. - */ - protected final ClassDoc classdoc; - - /** - * Maps PackageDocs to advice arguments. - */ - protected final Map pkgToAdviceArgs; - - /** - * Maps PackageDocs to advice return types. - */ - protected final Map pkgToAdviceReturn; - - /** - * Maps PackageDocs to pointcut arguments. - */ - protected final Map pkgToPointcutArgs; - - /** - * Maps PackageDocs to pointcut return types. - */ - protected final Map pkgToPointcutReturn; - - /** - * Maps PackageDocs to field introductions. - */ - protected final Map pkgToFieldIntroductions; - - /** - * Maps PackageDocs to class introductions. - */ - protected final Map pkgToClassIntroductions; - - /** - * Maps PackageDocs to interface introductions. - */ - protected final Map pkgToInterfaceIntroductions; - - /** - * Maps PackageDocs to class advisors. - */ - protected final Map pkgToClassAdvisors; - - /** - * Maps PackageDocs to aspects that dominate - * aspects in that package. - */ - protected final Map pkgToAspectDominatees; - - /** - * Maps PackageDocs to aspects that are dominated - * by aspects in that package. - */ - protected final Map pkgToAspectDominators; - - /** - * The MethodSubWriter to use. - */ - protected final MethodSubWriter methodSubWriter - = new MethodSubWriter(this); - - /** - * The ConstructorSubWriter to use. - */ - protected final ConstructorSubWriter constrSubWriter - = new ConstructorSubWriter(this); - - /** - * The FieldSubWriter to use. - */ - protected final FieldSubWriter fieldSubWriter - = new FieldSubWriter(this); - - /** - * The ClassSubWriter to use. - */ - protected final ClassSubWriter classSubWriter - = new ClassSubWriter(this); - - /** - * The PointcutSubWriter to use. - */ - protected final PointcutSubWriter pointcutSubWriter - = new PointcutSubWriter(this); - - /** - * The SuperIntroductionSubWriter to use. - */ - protected final SuperIntroductionSubWriter superIntroductionSubWriter - = new SuperIntroductionSubWriter(this); - - /** - * The FieldIntroductionSubWriter to use. - */ - protected final FieldIntroductionSubWriter fieldIntroductionSubWriter - = new FieldIntroductionSubWriter(this); - - /** - * The ConstructorIntroductionSubWriter to use. - */ - protected final ConstructorIntroductionSubWriter constrIntroductionSubWriter - = new ConstructorIntroductionSubWriter(this); - - /** - * The MethodIntroductionSubWriter to use. - */ - protected final MethodIntroductionSubWriter methodIntroductionSubWriter - = new MethodIntroductionSubWriter(this); - - /** - * The AdviceSubWriter to use. - */ - protected final AdviceSubWriter adviceSubWriter - = new AdviceSubWriter(this); - - - - public ClassUseWriter(ClassUseMapper mapper, - String path, - String filename, - String relpath, - ClassDoc classdoc) - throws IOException, DocletAbortException { - - super(mapper.mapper(classdoc), path, - filename, relpath, classdoc); - - mapper.restore(classdoc); - - this.classdoc = Access.classdoc(this); - - this.pkgToAdviceReturn = - _pkgDivide(mapper.classToAdviceReturn); - this.pkgToAdviceArgs = - _pkgDivide(mapper.classToAdviceArgs); - this.pkgToPointcutReturn = - _pkgDivide(mapper.classToPointcutReturn); - this.pkgToPointcutArgs = - _pkgDivide(mapper.classToPointcutArgs); - this.pkgToFieldIntroductions = - _pkgDivide(mapper.classToFieldIntroductions); - this.pkgToClassIntroductions = - _pkgDivide(mapper.classToClassIntroductions); - this.pkgToInterfaceIntroductions = - _pkgDivide(mapper.classToInterfaceIntroductions); - this.pkgToClassAdvisors = - _pkgDivide(mapper.classToAdvisors); - this.pkgToAspectDominatees = - _pkgDivide(mapper.classToDominatees); - this.pkgToAspectDominators = - _pkgDivide(mapper.classToDominators); - } - - protected com.sun.tools.doclets.standard.ClassUseWriter - writer; - private Map _pkgDivide(Map classMap) { - return (Map)Util.invoke - (com.sun.tools.doclets.standard.ClassUseWriter.class, - this, "pkgDivide", - new Class[]{java.util.Map.class}, - new Object[]{classMap}); - } - - public static void generate(ClassUseMapper mapper, - ClassDoc classdoc) - throws DocletAbortException { - ClassUseWriter cw = null; - String path = DirectoryManager.getDirectoryPath(classdoc. - containingPackage()); - if (path.length() > 0) { - path += File.separator; - } - path += "class-use"; - String filename = classdoc.name() + ".html"; - String pkgname = classdoc.containingPackage().name(); - pkgname += (pkgname.length() > 0 ? "." : "") + "class-use"; - String relpath = DirectoryManager.getRelativePath(pkgname); - try { - (cw = new ClassUseWriter(mapper, path, filename, - relpath, classdoc)). - generateClassUseFile(); - } catch (IOException e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", e+"", filename); - throw new DocletAbortException(); - } finally { - if (cw != null) cw.close(); - } - } - - protected void generateClassUse(PackageDoc pkg) throws IOException { - super.generateClassUse(pkg); - String classlink = getClassLink(classdoc); - String pkglink = getPackageLink(pkg); - - printUseInfo(adviceSubWriter, pkgToAdviceReturn, - pkg, "AdviceReturn", classlink, pkglink); - printUseInfo(adviceSubWriter, pkgToAdviceArgs, - pkg, "AdviceArgs", classlink, pkglink); - printUseInfo(pointcutSubWriter, pkgToPointcutReturn, - pkg, "PointcutReturn", classlink, pkglink); - printUseInfo(pointcutSubWriter, pkgToPointcutArgs, - pkg, "PointcutArgs", classlink, pkglink); - printUseInfo(fieldIntroductionSubWriter, pkgToFieldIntroductions, - pkg, "FieldIntroductions", classlink, pkglink); - printUseInfo(superIntroductionSubWriter, pkgToClassIntroductions, - pkg, "ClassIntroductions", classlink, pkglink); - printUseInfo(superIntroductionSubWriter, pkgToInterfaceIntroductions, - pkg, "InterfaceIntroductions", classlink, pkglink); - printUseInfo(classSubWriter, pkgToClassAdvisors, - pkg, "ClassAdvisors", classlink, pkglink); - - printUseInfo(classSubWriter, pkgToAspectDominatees, - pkg, "AspectDominatees", classlink, pkglink); - printUseInfo(classSubWriter, pkgToAspectDominators, - pkg, "AspectDominators", classlink, pkglink); - } - - protected final void printUseInfo(AbstractSubWriter mw, Map map, - PackageDoc pkg, String kind, - String classlink, String pkglink) { - Access.printUseInfo(mw, map.get(pkg), - getText("doclet.ClassUse_" + kind, - classlink,pkglink)); - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassWriter.java deleted file mode 100644 index 7ae643524..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ClassWriter.java +++ /dev/null @@ -1,554 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AdviceDoc; -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.ajdoc.IntroducedSuperDoc; -import org.aspectj.ajdoc.IntroductionDoc; -import org.aspectj.ajdoc.OfClauseDoc; -import org.aspectj.ajdoc.OfEachObjectDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ExecutableMemberDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.tools.doclets.ClassTree; -import com.sun.tools.doclets.DirectoryManager; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.TreeSet; - -public class ClassWriter extends com.sun.tools.doclets.standard.ClassWriter { - - /** - * The MethodSubWriter that prints out the methods - * of <code>classdoc</code>. - */ - protected MethodSubWriter ourMethodSubWriter; - - /** - * The ConstructorSubWriter that prints out the constructors - * of <code>classdoc</code>. - */ - protected ConstructorSubWriter ourConstrSubWriter; - - /** - * The FieldSubWriter that prints out the fields - * of <code>classdoc</code>. - */ - protected FieldSubWriter ourFieldSubWriter; - - /** - * The ClassSubWriter that prints out the classs - * of <code>classdoc</code>. - */ - protected ClassSubWriter ourInnerSubWriter; - - /** - * The PointcutSubWriter that prints out the pointcuts - * of <code>classdoc</code>. - */ - protected PointcutSubWriter pointcutSubWriter = null; - - /** - * The SuperIntroductionSubWriter that prints out the superintroductions - * of <code>classdoc</code>. - */ - protected SuperIntroductionSubWriter superIntroductionSubWriter = null; - - /** - * The FieldIntroductionSubWriter that prints out the fieldintroductions - * of <code>classdoc</code>. - */ - protected FieldIntroductionSubWriter fieldIntroductionSubWriter = null; - - /** - * The ConstructorIntroductionSubWriter that prints out the constructorintroductions - * of <code>classdoc</code>. - */ - protected ConstructorIntroductionSubWriter constrIntroductionSubWriter = null; - - /** - * The MethodIntroductionSubWriter that prints out the methodintroductions - * of <code>classdoc</code>. - */ - protected MethodIntroductionSubWriter methodIntroductionSubWriter = null; - - /** - * The AdviceSubWriter that prints out the advices - * of <code>classdoc</code>. - */ - protected AdviceSubWriter adviceSubWriter = null; - - - /** - * Construct a ClassWriter from the passed in arguments. This - * will instantiate the subwriters to be used. - * - * @param path the path directory of the html file to generate. - * @param filename the html file to generate. - * @param classdoc the ClassDoc for which this file will - * be generated. - * @param prev the ClassDoc preceding <code>classdoc</code> - * in order of generation. - * @param next the ClassDoc following <code>classdoc</code> - * in order of generation. - * @param classtree the ClassTree to use. - * @param nopackage whether this <code>classdoc</code>'s package - * is specified to be documented. - */ - public ClassWriter(String path, - String filename, - ClassDoc classdoc, - ClassDoc prev, - ClassDoc next, - ClassTree classtree, - boolean nopackage) - throws IOException, DocletAbortException { - - super(path, filename, classdoc, prev, - next, classtree, nopackage); - - // Construct the subwriters just for ClassDocs - // We want our superclass to delegate to our subwriters delegate, - // but we want to call our subwriters. So we set our superclasses - // subwriters to our subwriters delegates. - ourMethodSubWriter = new MethodSubWriter(this, classdoc); - methodSubWriter = (com.sun.tools.doclets.standard.MethodSubWriter) - ourMethodSubWriter.del(); - constrSubWriter = (com.sun.tools.doclets.standard.ConstructorSubWriter) - (ourConstrSubWriter = new ConstructorSubWriter(this, classdoc)).del(); - fieldSubWriter = (com.sun.tools.doclets.standard.FieldSubWriter) - (ourFieldSubWriter = new FieldSubWriter(this, classdoc)).del(); - innerSubWriter = (com.sun.tools.doclets.standard.ClassSubWriter) - (ourInnerSubWriter = new ClassSubWriter(this, classdoc)).del(); - - if (classdoc instanceof org.aspectj.ajdoc.ClassDoc) { - pointcutSubWriter = - new PointcutSubWriter(this, (org.aspectj.ajdoc.ClassDoc)classdoc); - } - - // If we've been passed an AspectDoc, create the AspectJ-specfic - // subwriters - if (classdoc instanceof AspectDoc) { - AspectDoc ad = (AspectDoc)classdoc; - superIntroductionSubWriter = new SuperIntroductionSubWriter(this, ad); - fieldIntroductionSubWriter = new FieldIntroductionSubWriter(this, ad); - constrIntroductionSubWriter = new ConstructorIntroductionSubWriter(this, ad); - methodIntroductionSubWriter = new MethodIntroductionSubWriter(this, ad); - adviceSubWriter = new AdviceSubWriter(this, ad); - } - } - - public static void generate(ClassDoc classdoc, - ClassDoc prev, - ClassDoc next, - ClassTree classtree, - boolean nopackage) - throws DocletAbortException { - ClassWriter cw = null; - String path = DirectoryManager.getDirectoryPath - (classdoc.containingPackage()); - String filename = classdoc.name() + ".html"; - try { - (cw = new ClassWriter(path, filename, classdoc, - prev, next, classtree, nopackage)). - generateClassFile(); - } catch (IOException e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", e+"", filename); - throw new DocletAbortException(); - } finally { - if (cw != null) cw.close(); - } - } - - /** - * Prints the header of the class -- which is one - * of <code>class</code>, <code>interface</code> or - * <code>aspect</code> with the name <code>title</code>. - * - * @param title the name of the class. - */ - public void printHeader(String title) { - int ispace = title.indexOf(' '); - if (ispace != -1) { - title = Statics.type(classdoc) + title.substring(ispace); - } - super.printHeader(title); - } - - /* - * This is set up to intercept calls to print out - * the correct type of classdoc before we automatically - * print 'class' or 'interface'. - */ - - private boolean h2warn = false; - - /** - * If we've started to print a h2 heading, we're - * printing the name of the class so get ready to - * to intercept the call. - */ - public void h2() { - h2warn = true; - super.h2(); - } - - /** - * After printing the class declaration with the h2 heading - * turn off the h2 warning. - */ - public void h2End() { - h2warn = false; - super.h2End(); - } - - /** - * This is where we intercept the call to print so - * we can print the correct type. - */ - public void print(String str) { - if (h2warn) { - int ispace = str.indexOf(' '); - if (ispace != -1 && str.charAt(0) == 'C') { - str = Statics.type(classdoc) + str.substring(ispace); - } - } - super.print(str); - } - - /** - * Print the members summary for our AspectJ subwriters. - */ - protected void printAspectJSummary() { - printMembersSummary(superIntroductionSubWriter); - printMembersSummary(fieldIntroductionSubWriter); - printMembersSummary(constrIntroductionSubWriter); - printMembersSummary(methodIntroductionSubWriter); - printMembersSummary(pointcutSubWriter); - printMembersSummary(adviceSubWriter); - } - - /** - * Formats the output correctly for a member summary. - * - * @param mw the AbstractSubWriter to use. - */ - protected final void printMembersSummary(AbstractSubWriter mw) { - if (mw != null) { - println(); - println("<!-- === " + getText(mw.navKey()) + " SUMMARY === -->"); - println(); - mw.printMembersSummary(); - } - } - - /** - * Print the members detail for our AspectJ subwriters. - */ - protected void printAspectJDetail() { - printMembersDetail(superIntroductionSubWriter); - printMembersDetail(fieldIntroductionSubWriter); - printMembersDetail(constrIntroductionSubWriter); - printMembersDetail(methodIntroductionSubWriter); - printMembersDetail(pointcutSubWriter); - printMembersDetail(adviceSubWriter); - } - - /** - * Formats the output correctly for a member detail. - * - * @param mw the AbstractSubWriter to use. - */ - protected final void printMembersDetail(AbstractSubWriter mw) { - if (mw != null) { - println("<!-- ===" + getText(mw.navKey()) + " DETAIL === -->"); - println(); - mw.printMembers(); - println(); - } - } - - //TODO: Just need to make sure 'aspect; shows up and - //TODO not 'class' - protected void printClassDescription() { - boolean isInterface = classdoc.isInterface(); - boolean isAspect = classdoc instanceof AspectDoc; - dl(); - dt(); - - print(classdoc.modifiers() + " "); - - if (!isInterface) { - print(isAspect ? "aspect " : "class "); - } - bold(classdoc.name()); - - if (!isInterface) { - ClassDoc superclass = classdoc.superclass(); - if (superclass != null) { - dt(); - print("extends "); - printClassLink(superclass); - printIntroducedSuper(superclass); - } - } - - ClassDoc[] implIntfacs = classdoc.interfaces(); - if (implIntfacs != null && implIntfacs.length > 0) { - dt(); - print(isInterface? "extends " : "implements "); - for (int i = 0; i < implIntfacs.length; i++) { - if (i > 0) print(", "); - printClassLink(implIntfacs[i]); - printIntroducedSuper(implIntfacs[i]); - } - } - if (isAspect) { - AspectDoc ad = (AspectDoc)classdoc; - OfClauseDoc ofClause = ad.ofClause(); - if (ofClause != null) { - dt(); - if (ofClause.kind() == OfClauseDoc.Kind.EACH_CFLOW) { - print("percflow(..)"); - } else if (ofClause.kind() == OfClauseDoc.Kind.EACH_JVM) { - print("issingleton()"); - } else if (ofClause.kind() == OfClauseDoc.Kind.EACH_OBJECT) { - print("pertarget("); - printClassLinks(((OfEachObjectDoc)ofClause).instances()); - print(")"); - } - } - AspectDoc[] dominatees = ad.dominatees(); - if (dominatees != null && dominatees.length > 0) { - dt(); - print("dominates "); - printClassLinks(dominatees); - } - AspectDoc[] dominators = ad.dominators(); - if (dominators != null && dominators.length > 0) { - dt(); - print("dominated by "); - printClassLinks(dominators); - } - } - dlEnd(); - } - - /** - * Prints a list of class links separated by commas. - * - * @param cds array of ClassDoc to be printed. - */ - protected void printClassLinks(ClassDoc[] cds) { - if (cds == null || cds.length < 1) return; - for (int i = 0; i < cds.length; i++) { - if (i > 0) print(", "); - if (cds[i] != null) { - printClassLink(cds[i]); - } - } - } - - /** - * Prints information about <code>classdoc</code>'s type introduction - * if <code>cd</code>'s type was introduced onto <code>classdoc</code>. - * - * @param cd the ClassDoc being printed. - */ - protected void printIntroducedSuper(ClassDoc cd) { - IntroducedSuperDoc[] intros = - ((org.aspectj.ajdoc.ClassDoc)classdoc).introducers(); - if (null != intros) { - for (int i = 0; i < intros.length; i++) { - IntroducedSuperDoc intro = intros[i]; - org.aspectj.ajdoc.Type[] types = intro.types(); - for (int j = 0; j < types.length; j++) { - if (types[j].equals(cd)) { - print(' '); - printText("doclet.by_parens", - getClassLink - (intro.containingClass(), - superIntroductionSubWriter.link(intro), - "introduced"), - getClassLink(intro.containingClass())); - break; - } - } - } - } - } - - /** - * Print the navSummaryLink for all the AspectJ subwriters. - */ - protected void navAspectJSummaryLinks() { - navSummaryLink(superIntroductionSubWriter); - navSummaryLink(fieldIntroductionSubWriter); - navSummaryLink(constrIntroductionSubWriter); - navSummaryLink(methodIntroductionSubWriter); - navSummaryLink(pointcutSubWriter); - navSummaryLink(adviceSubWriter); - } - - /** - * Prints the navSummaryLink correctly. - * - * @param mw AbstractSubWriter to invoke. - */ - protected final void navSummaryLink(AbstractSubWriter mw) { - if (mw != null) { - mw.navSummaryLink(); - _navGap(); - } - } - - /** - * Print the navDetailLink for all the AspectJ subwriters. - */ - protected void navAspectJDetailLinks() { - navDetailLink(superIntroductionSubWriter); - navDetailLink(fieldIntroductionSubWriter); - navDetailLink(constrIntroductionSubWriter); - navDetailLink(methodIntroductionSubWriter); - navDetailLink(pointcutSubWriter); - navDetailLink(adviceSubWriter); - } - - /** - * Prints the navDetailLink correctly. - * - * @param mw AbstractSubWriter to invoke. - */ - protected final void navDetailLink(AbstractSubWriter mw) { - if (mw != null) { - mw.navDetailLink(); - _navGap(); - } - } - - /* - * A hack... I'll explain later, if you need to change - * this mail jeffrey_palm@hotmail.com. - */ - - protected final void _navGap() { super.navGap(); } - - protected int navstate = 0; - protected void navGap() { - _navGap(); - if (navstate == 1) { - navAspectJSummaryLinks(); - navstate++; - } else if (navstate == 3) { - navAspectJDetailLinks(); - navstate++; - } - } - - protected void printEnclosingClassInfo() { - super.printEnclosingClassInfo(); - printAdvisorInfo(); - printAdviseeInfo(); - } - - protected void printAdviseeInfo() { - if (!(classdoc instanceof AspectDoc)) return; - AspectDoc ad = (AspectDoc)classdoc; - Set set = new TreeSet(); - AdviceDoc[] as = ad.advice(); - if (as != null) { - for (int i = 0; i < as.length; i++) { - ExecutableMemberDoc[] crosscuts = as[i].crosscuts(); - if (null != crosscuts) { - for (int j = 0; j < crosscuts.length; j++) { - if (null != crosscuts[j]) { - set.add(crosscuts[j].containingClass()); - } - } - } - } - } - IntroductionDoc[] is = ad.introductions(); - if (null != is) { - for (int i = 0 ; i < is.length; i++) { - ClassDoc[] targets = is[i].targets(); - for (int j = 0; j < targets.length; j++) { - set.add(targets[j]); - } - } - printInfo(set, "doclet.All_Advisees"); - } - } - - protected void printAdvisorInfo() { - Set set = new TreeSet(); - set.addAll(advisors(classdoc.fields())); - set.addAll(advisors(classdoc.methods())); - set.addAll(advisors(classdoc.constructors())); - printInfo(set, "doclet.All_Advisors"); - } - - protected void printInfo(Collection classdocs, String str) { - if ((null != classdocs) && (classdocs.size() > 0)) { - printInfoHeader(); - boldText(str); - dd(); - for (Iterator i = classdocs.iterator(); i.hasNext();) { - printClassLink((ClassDoc)i.next()); - if (i.hasNext()) print(", "); - } - ddEnd(); - dlEnd(); - } - } - - protected final Collection advisors(final MemberDoc[] ms) { - List list = new ArrayList(); - if (null != ms) { - for (int i = 0 ; i < ms.length; i++) { - IntroducedDoc id = - ((org.aspectj.ajdoc.MemberDoc)ms[i]).introduced(); - if (id != null) list.add(id.containingClass()); - if (ms[i] instanceof org.aspectj.ajdoc.ExecutableMemberDoc) { - AdviceDoc[] as = - ((org.aspectj.ajdoc.ExecutableMemberDoc)ms[i]).advice(); - for (int j = 0; j < as.length; j++) { - list.add(as[j].containingClass()); - } - } - } - } - return list; - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConfigurationStandard.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConfigurationStandard.java deleted file mode 100644 index 8de96b8dc..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConfigurationStandard.java +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ - -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.RootDoc; -import com.sun.tools.doclets.MessageRetriever; - -import java.io.IOException; -import java.net.URL; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.PropertyResourceBundle; -import java.util.ResourceBundle; - -/** - * A customized configuration. - * - * @author Jeff Palm - */ -public class ConfigurationStandard - extends com.sun.tools.doclets.standard.ConfigurationStandard -{ - - /** It true we don't print crosscut information. */ - public boolean nocrosscuts = false; - - /** If true we don't print crosscut summary information. */ - public boolean nosummarycrosscuts = false; - - /** If true we log each pass in the doclet. */ - public boolean log = false; - - public ConfigurationStandard() { -// standardmessage = new MessageRetriever -// ("org.aspectj.tools.doclets.standard.resources.standard"); - - String loc = "org.aspectj.tools.doclets.standard.resources.standard"; - final ClassLoader loader = getClass().getClassLoader(); - // XXX move persistant resource loader to util - ResourceBundle bundle = null; - for (int i = 0; ((null == bundle) && (i < 4)); i++) { - - try { - switch (i) { - case 0: - bundle = ResourceBundle.getBundle(loc); - standardmessage = new MessageRetriever(bundle); - break; - case 1: - Locale locale = Locale.getDefault(); - bundle = ResourceBundle.getBundle(loc, locale, loader); - standardmessage = new MessageRetriever(bundle); - break; - case 2: - standardmessage = new MessageRetriever(loc); - break; - case 3: - URL pURL = loader.getResource(loc + ".properties"); - bundle = new PropertyResourceBundle(pURL.openStream()); - standardmessage = new MessageRetriever(loc); - break; - } - break; // from for loop - } catch (MissingResourceException e) { } // error below - catch (IOException ie) { } // error below - } - if (null == bundle) { - throw new Error("unable to load resource: " + loc); - } - } - - //TODO: Document the new options in help - - public void setSpecificDocletOptions(RootDoc root) { - String[][] options = root.options(); - for (int i = 0; i < options.length; ++i) { - String opt = options[i][0].toLowerCase(); - if (opt.equals("-nocrosscuts")) { - nocrosscuts = true; - nosummarycrosscuts = true; - } else if (opt.equals("-nosummarycrosscuts")) { - nosummarycrosscuts = true; - } else if (opt.equals("-log")) { - log = true; - } - } - super.setSpecificDocletOptions(root); - } - - public int specificDocletOptionLength(String opt) { - if (opt.equals("-nocrosscuts") || - opt.equals("-nosummarycrosscuts") || - opt.equals("-log")) { - return 1; - } - return super.specificDocletOptionLength(opt); - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConstructorIntroductionSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConstructorIntroductionSubWriter.java deleted file mode 100644 index ad16055e0..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConstructorIntroductionSubWriter.java +++ /dev/null @@ -1,126 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.ajdoc.IntroductionDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.ProgramElementDoc; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -public class ConstructorIntroductionSubWriter extends ConstructorSubWriter { - - public ConstructorIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - AspectDoc ad) - { - super(writer, ad); - } - - public ConstructorIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected final String keyName() { return "Constructor_Introduction"; } - - protected List getMembers(ClassDoc cd) { - if (!(cd instanceof AspectDoc)) return super.getMembers(cd); - IntroductionDoc[] introductions = ((AspectDoc)cd).introductions(); - List list = new ArrayList(); - if (introductions == null) return list; - for (int i = 0; i < introductions.length; i++) { - IntroductionDoc id = introductions[i]; - if (!(id instanceof IntroducedDoc)) continue; - MemberDoc member = ((IntroducedDoc)id).member(); - if (member.isConstructor()) { - //ConstructorDec constructor = (ConstructorDec)member; - //TODO: constructor.bindSignatures(((ClassDec)cd).getTypeScope()); - list.add(member); //constructor); - } - } - return list; - } - - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - org.aspectj.ajdoc.ConstructorDoc constr = - (org.aspectj.ajdoc.ConstructorDoc)member; - IntroducedDoc intro = constr.introduced(); - //String name = where(constr); - ClassDoc[] targets = intro.targets(); - if (targets.length > 0) { - writer.dt(); - writer.boldText("doclet.Introduced_on"); - writer.dd(); - writer.code(); - for (int i = 0; i < targets.length; i++) { - if (i > 0) writer.print(", "); - ClassDoc target = targets[i]; - writer.printClassLink(target, - "constructors_introduced_from_class_" + - cd.qualifiedName(), - target.name()); - } - writer.codeEnd(); - writer.ddEnd(); // XXX added for balance - } - } - - public void printSummaryCrosscuts(ClassDoc cd, - ProgramElementDoc member) { - Set set = new HashSet(); - org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)member; - IntroducedDoc intro = md.introduced(); - ClassDoc[] targets = intro.targets(); - for (int i = 0; i < targets.length; i++) { - set.add(targets[i]); - } - if (targets.length > 0) { - writer.boldText("doclet.Advises"); - List list = new ArrayList(set); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - print(' '); - ClassDoc target = (ClassDoc)i.next(); - writer.printClassLink(target, - "constructors_introduced_from_class_" - + cd.qualifiedName(), - target.name()); - if (i.hasNext()) print(","); - } - } - } - - public boolean hasCrosscuts(ClassDoc classDoc, ProgramElementDoc member) { - return true; - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConstructorSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConstructorSubWriter.java deleted file mode 100644 index bd8360be5..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ConstructorSubWriter.java +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.tools.doclets.VisibleMemberMap; - -public class ConstructorSubWriter extends ExecutableMemberSubWriter { - - public static class Del - extends com.sun.tools.doclets.standard.ConstructorSubWriter { - protected ConstructorSubWriter mw; - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) { - super(writer, classdoc); - } - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - public void printMembersSummary() { - mw.printMembersSummary(); - mw.printIntroducedMembersSummary(); - } - public void printMembers() { - mw.printMembers(); - } - protected void navSummaryLink() { - mw.navSummaryLink(); - } - protected void navDetailLink() { - mw.navDetailLink(); - } - public void setDelegator(ConstructorSubWriter mw) { this.mw = mw; } - public void printSummaryMember(ClassDoc cd, ProgramElementDoc member) { - mw.printSummaryMember(cd, member); - } - } - - protected Class delegateClass() { - return Del.class; - } - - public ConstructorSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public ConstructorSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - public int getMemberKind() { - //XXX hack!!! - return VisibleMemberMap.CONSTRUCTORS; - } - - protected String propertyName() { return "Constructor"; } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/DeprecatedAPIListBuilder.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/DeprecatedAPIListBuilder.java deleted file mode 100644 index bc90a0f24..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/DeprecatedAPIListBuilder.java +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.ajdoc.IntroductionDoc; -import org.aspectj.tools.ajdoc.Util; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.RootDoc; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -public class DeprecatedAPIListBuilder - extends com.sun.tools.doclets.standard.DeprecatedAPIListBuilder -{ - - private List deprecatedadvice = new ArrayList(); - private List deprecatedpointcuts = new ArrayList(); - private List deprecatedfieldintroductions = new ArrayList(); - private List deprecatedmethodintroductions = new ArrayList(); - private List deprecatedconstructorintroductions = new ArrayList(); - private List deprecatedsuperintroductions = new ArrayList(); - - public DeprecatedAPIListBuilder(RootDoc root) { - super(root); - buildDeprecatedAPIInfo(root); - } - - protected void buildDeprecatedAPIInfo(RootDoc root) { - ClassDoc[] cs = root.classes(); - for (int i = 0; i < cs.length; i++) { - org.aspectj.ajdoc.ClassDoc c = (org.aspectj.ajdoc.ClassDoc)cs[i]; - _composeDeprecatedList(deprecatedpointcuts, c.pointcuts()); - if (c instanceof AspectDoc) { - AspectDoc ad = (AspectDoc)c; - _composeDeprecatedList(deprecatedadvice, ad.advice()); - IntroductionDoc[] intros = ad.introductions(); - for (int j = 0; j < intros.length; j++) { - if (intros[j] instanceof IntroducedDoc) { - MemberDoc md = ((IntroducedDoc)intros[j]).member(); - if (md == null) continue; - if (md.isField()) { - _composeDeprecatedList(deprecatedfieldintroductions, - intros[j]); - } else if (md.isMethod()) { - _composeDeprecatedList(deprecatedmethodintroductions, - intros[j]); - } else { - _composeDeprecatedList(deprecatedconstructorintroductions, - intros[j]); - } - } else { - _composeDeprecatedList(deprecatedsuperintroductions, - intros[j]); - } - } - } - } - Collections.sort(deprecatedadvice); - Collections.sort(deprecatedpointcuts); - Collections.sort(deprecatedfieldintroductions); - Collections.sort(deprecatedmethodintroductions); - Collections.sort(deprecatedconstructorintroductions); - Collections.sort(deprecatedsuperintroductions); - } - - protected void _composeDeprecatedList(List list, MemberDoc member) { - _composeDeprecatedList(list, new MemberDoc[]{member}); - } - protected void _composeDeprecatedList(List list, MemberDoc[] members) { - Util.invoke(com.sun.tools.doclets.standard.DeprecatedAPIListBuilder.class, - this, "composeDeprecatedList", - new Class[]{java.util.List.class, - com.sun.javadoc.MemberDoc[].class}, - new Object[]{list, members}); - } - - public List getDeprecatedAdivce() { - return deprecatedadvice; - } - public List getDeprecatedPointcuts() { - return deprecatedpointcuts; - } - public List getDeprecatedFieldIntroductions() { - return deprecatedfieldintroductions; - } - public List getDeprecatedMethodIntroductions() { - return deprecatedmethodintroductions; - } - public List getDeprecatedConstructorIntroductions() { - return deprecatedconstructorintroductions; - } - public List getDeprecatedSuperIntroductions() { - return deprecatedsuperintroductions; - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/DeprecatedListWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/DeprecatedListWriter.java deleted file mode 100644 index 8333b6569..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/DeprecatedListWriter.java +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.tools.ajdoc.Access; - -import com.sun.javadoc.RootDoc; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; -import java.util.List; - -public class DeprecatedListWriter - extends com.sun.tools.doclets.standard.DeprecatedListWriter -{ - - protected DeprecatedAPIListBuilder builder; - - public DeprecatedListWriter(String filename, - DeprecatedAPIListBuilder builder) - throws IOException { - super(filename); - this.builder = builder; - } - - public static void generate(RootDoc root) throws DocletAbortException { - String filename = "deprecated-list.html"; - DeprecatedListWriter dw = null; - try { - (dw = new DeprecatedListWriter(filename, - new DeprecatedAPIListBuilder(root))). - generateDeprecatedListFile(); - } catch (IOException e) { - Standard.configuration(). - standardmessage.error("doclet.exception_encountered", - e+"", filename); - throw new DocletAbortException(); - } finally { - if (dw != null) dw.close(); - } - } - - protected void generateDeprecatedListFile() throws IOException { - generateDeprecatedListFile(builder); - } - - protected void printDeprecatedFooter() { - printRestOfDeprecatedListFile(); - super.printDeprecatedFooter(); - } - - protected void printRestOfDeprecatedListFile() { - deprecatedListFile(new AdviceSubWriter(this), - builder.getDeprecatedAdivce()); - deprecatedListFile(new PointcutSubWriter(this), - builder.getDeprecatedPointcuts()); - deprecatedListFile(new FieldIntroductionSubWriter(this), - builder.getDeprecatedFieldIntroductions()); - deprecatedListFile(new MethodIntroductionSubWriter(this), - builder.getDeprecatedMethodIntroductions()); - deprecatedListFile(new ConstructorIntroductionSubWriter(this), - builder.getDeprecatedConstructorIntroductions()); - deprecatedListFile(new SuperIntroductionSubWriter(this), - builder.getDeprecatedSuperIntroductions()); - - - } - - protected final void deprecatedListFile(AbstractSubWriter mw, - List list) { - Access.printDeprecatedAPI(mw, list, - "doclet.Deprecated_" + - mw.keyName() + "s"); - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ExecutableMemberSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ExecutableMemberSubWriter.java deleted file mode 100644 index 12e57853c..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/ExecutableMemberSubWriter.java +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AdviceDoc; -import org.aspectj.ajdoc.IntroducedDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ExecutableMemberDoc; -import com.sun.javadoc.ProgramElementDoc; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -public abstract class ExecutableMemberSubWriter extends AbstractSubWriter { - public ExecutableMemberSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public ExecutableMemberSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected String where(ProgramElementDoc member) { - ExecutableMemberDoc emd = (ExecutableMemberDoc)member; - return emd.name() + emd.signature(); - } - - protected String label(ExecutableMemberDoc emd) { - return emd.qualifiedName() + emd.flatSignature(); - } - - public void printIntroducedSummaryLink(ClassDoc cd, - ProgramElementDoc member) { - ExecutableMemberDoc emd = (ExecutableMemberDoc)member; - writer.printClassLink(cd, where(emd), emd.name(), false); - } - - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - org.aspectj.ajdoc.ExecutableMemberDoc emd = - (org.aspectj.ajdoc.ExecutableMemberDoc)member; - - IntroducedDoc intro = emd.introduced(); - if (intro != null) { - writer.dt(); - writer.boldText("doclet.Introduced_from"); - writer.dd(); - org.aspectj.ajdoc.MemberDoc otherMember = - (org.aspectj.ajdoc.MemberDoc)intro.member(); - String name = where(otherMember); - ClassDoc containing = intro.containingClass(); - writer.printClassLink(containing, name, - containing.typeName(), false); - } - - AdviceDoc[] advice = emd.advice(); - if (advice.length > 0) { - writer.boldText("doclet.Crosscut_by"); - Set set = new HashSet(); - for (int i = 0; i < advice.length; i++) { - set.add(advice[i]); - } - List list = new ArrayList(set); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - writer.dd(); - writer.code(); - AdviceDoc ad = (AdviceDoc)i.next(); - writer.printClassLink(ad.containingClass(), - AdviceSubWriter.getWhere - (ad.containingClass(), ad), - label(ad)); - print(" in "); - writer.printClassLink(ad.containingClass()); - writer.codeEnd(); - print('.'); - } - } - } - - public void printSummaryCrosscuts(ClassDoc cd, - ProgramElementDoc member) { - Set cds = new HashSet(); - org.aspectj.ajdoc.ExecutableMemberDoc emd = - (org.aspectj.ajdoc.ExecutableMemberDoc)member; - AdviceDoc[] advice = emd.advice(); - for (int i = 0; i < advice.length; i++) { - cds.add(advice[i].containingClass()); - } - if (cds.size() > 0) { - writer.boldText("doclet.Advised_by"); - List list = new ArrayList(cds); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - print(' '); - ClassDoc cdoc = (ClassDoc)i.next(); - writer.printClassLink(cdoc, "advice_detail", cdoc.name()); - if (i.hasNext()) print(","); - } - } - } - - public boolean hasCrosscuts(ClassDoc classDoc, - ProgramElementDoc member) { - org.aspectj.ajdoc.ExecutableMemberDoc emd = - (org.aspectj.ajdoc.ExecutableMemberDoc)member; - return emd.introduced() != null || emd.advice().length > 0; - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/FieldIntroductionSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/FieldIntroductionSubWriter.java deleted file mode 100644 index fd7519bf7..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/FieldIntroductionSubWriter.java +++ /dev/null @@ -1,131 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.ajdoc.IntroductionDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.ProgramElementDoc; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -public class FieldIntroductionSubWriter extends FieldSubWriter { - - public FieldIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - AspectDoc ad) - { - super(writer, ad); - } - - public FieldIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected final String keyName() { return "Field_Introduction"; } - - public void printInheritedSummaryAnchor(ClassDoc cd) {} - public void printInheritedSummaryLabel(ClassDoc cd) {} - protected void printInheritedSummaryLink(ClassDoc cd, ProgramElementDoc ped) {} - - protected List getMembers(ClassDoc cd) { - if (!(cd instanceof AspectDoc)) return super.getMembers(cd); - IntroductionDoc[] introductions = ((AspectDoc)cd).introductions(); - List list = new ArrayList(); - if (introductions == null) return list; - for (int i = 0; i < introductions.length; i++) { - IntroductionDoc id = introductions[i]; - if (!(id instanceof IntroducedDoc)) continue; - MemberDoc member = ((IntroducedDoc)id).member(); - if (member.isField()) { - //FieldDec field = (FieldDec)member; - //TODO: field.bindSignatures(((ClassDec)cd).getTypeScope()); - list.add(member); //field); - } - } - return list; - } - - /** print links back to aspect in target class docs? - * or forward from aspects to target class members? */ - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - org.aspectj.ajdoc.FieldDoc field = (org.aspectj.ajdoc.FieldDoc)member; - IntroducedDoc intro = field.introduced(); - //String name = field.name(); - ClassDoc[] targets = intro.targets(); - if (targets.length > 0) { - writer.dt(); // define term - writer.boldText("doclet.Introduced_on"); - writer.dd(); - writer.code(); - for (int i = 0; i < targets.length; i++) { - if (i > 0) writer.print(", "); - ClassDoc target = targets[i]; - writer.printClassLink(target, - "fields_introduced_from_class_" + - cd.qualifiedName(), - target.name()); - - } - writer.codeEnd(); - writer.ddEnd(); // XXX added for balance - } - } - - public void printSummaryCrosscuts(ClassDoc cd, - ProgramElementDoc member) { - Set set = new HashSet(); - org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)member; - IntroducedDoc intro = md.introduced(); - ClassDoc[] targets = intro.targets(); - for (int i = 0; i < targets.length; i++) { - set.add(targets[i]); - } - if (targets.length > 0) { - writer.boldText("doclet.Advises"); - List list = new ArrayList(set); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - print(' '); - ClassDoc target = (ClassDoc)i.next(); - writer.printClassLink(target, - "fields_introduced_from_class_" - + cd.qualifiedName(), - target.name()); - if (i.hasNext()) print(","); - } - } - } - - public boolean hasCrosscuts(ClassDoc classDoc, ProgramElementDoc member) { - return true; - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/FieldSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/FieldSubWriter.java deleted file mode 100644 index cca7b6510..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/FieldSubWriter.java +++ /dev/null @@ -1,116 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.IntroducedDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.tools.doclets.VisibleMemberMap; - -public class FieldSubWriter extends AbstractSubWriter { - - public static class Del extends com.sun.tools.doclets.standard.FieldSubWriter { - protected FieldSubWriter mw; - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - public void printMembersSummary() { - mw.printMembersSummary(); - mw.printIntroducedMembersSummary(); - } - public void printMembers() { - if (writer instanceof ClassWriter) { - ((ClassWriter)writer).printAspectJDetail(); - } - mw.printMembers(); - } - protected void navSummaryLink() { - mw.navSummaryLink(); - } - protected void navDetailLink() { - if (writer instanceof ClassWriter) { - ((ClassWriter)writer).navstate++; - } - mw.navDetailLink(); - } - public void setDelegator(FieldSubWriter mw) { this.mw = mw; } - public void printSummaryMember(ClassDoc cd, ProgramElementDoc member) { - mw.printSummaryMember(cd, member); - } - } - - protected Class delegateClass() { - return Del.class; - } - - public FieldSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public FieldSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - public int getMemberKind() { - //XXX hack!!! - return VisibleMemberMap.FIELDS; - } - - protected String propertyName() { return "Field"; } - - public void printIntroducedSummaryLink(ClassDoc cd, - ProgramElementDoc member) { - writer.printClassLink(cd, member.name(), member.name(), false); - } - - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - org.aspectj.ajdoc.FieldDoc field = (org.aspectj.ajdoc.FieldDoc)member; - IntroducedDoc intro = field.introduced(); - if (intro != null) { - writer.dt(); - writer.boldText("doclet.Introduced_from"); - writer.dd(); - writer.printClassLink(intro.containingClass(), - Statics.where(intro.member())); - } - } - - public void printSummaryCrosscuts(ClassDoc cd, ProgramElementDoc member) {} - - public boolean hasCrosscuts(ClassDoc classDoc, ProgramElementDoc member) { - return true || ((org.aspectj.ajdoc.MemberDoc)member).introduced() != null; - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/MethodIntroductionSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/MethodIntroductionSubWriter.java deleted file mode 100644 index ba28e4f34..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/MethodIntroductionSubWriter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedDoc; -import org.aspectj.ajdoc.IntroductionDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.ProgramElementDoc; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -public class MethodIntroductionSubWriter extends MethodSubWriter { - - public MethodIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - AspectDoc ad) - { - super(writer, ad); - } - - public MethodIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected final String keyName() { return "Method_Introduction"; } - - public void printInheritedSummaryAnchor(ClassDoc cd) {} - public void printInheritedSummaryLabel(ClassDoc cd) {} - protected void printInheritedSummaryLink(ClassDoc cd, ProgramElementDoc ped) {} - - protected List getMembers(ClassDoc cd) { - if (!(cd instanceof AspectDoc)) return super.getMembers(cd); - IntroductionDoc[] introductions = ((AspectDoc)cd).introductions(); - List list = new ArrayList(); - if (introductions == null) return list; - for (int i = 0; i < introductions.length; i++) { - IntroductionDoc id = introductions[i]; - if (!(id instanceof IntroducedDoc)) continue; - MemberDoc member = ((IntroducedDoc)id).member(); - if (member.isMethod()) { - //MethodDec method = (MethodDec)member; - //TODO: method.bindSignatures(((ClassDec)cd).getTypeScope()); - list.add(member); //method); - } - } - return list; - } - - /** print in the detail context at the bottom of the page - * the links out to affected classes/members for this method introduction - * (in this aspect) - */ - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - org.aspectj.ajdoc.MethodDoc method = (org.aspectj.ajdoc.MethodDoc)member; - IntroducedDoc intro = method.introduced(); - ClassDoc[] targets = intro.targets(); - if (targets.length > 0) { - writer.dt(); - writer.boldText("doclet.Introduced_on"); - writer.dd(); - writer.code(); - for (int i = 0; i < targets.length; i++) { - if (i > 0) writer.print(", "); - ClassDoc target = targets[i]; - writer.printClassLink(target, - "methods_introduced_from_class_" + - cd.qualifiedName(), - target.name()); - } - writer.codeEnd(); - writer.ddEnd(); // XXX added for balance - } - } - - /** print in the summary context at the top of the page - * the links out to affected classes/members for this method introduction - * (in this aspect) - */ - public void printSummaryCrosscuts(ClassDoc cd, - ProgramElementDoc member) { - Set set = new HashSet(); - org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)member; - IntroducedDoc intro = md.introduced(); - ClassDoc[] targets = intro.targets(); - for (int i = 0; i < targets.length; i++) { - set.add(targets[i]); - } - if (targets.length > 0) { - writer.boldText("doclet.Advises"); - List list = new ArrayList(set); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - print(' '); - ClassDoc target = (ClassDoc)i.next(); - - writer.printClassLink(target, - "methods_introduced_from_class_" - + cd.qualifiedName(), - target.name()); - if (i.hasNext()) print(","); - } - } - } - - public boolean hasCrosscuts(ClassDoc classDoc, ProgramElementDoc member) { - return true; - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/MethodSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/MethodSubWriter.java deleted file mode 100644 index 31473e0e3..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/MethodSubWriter.java +++ /dev/null @@ -1,112 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AdviceDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ExecutableMemberDoc; -import com.sun.javadoc.MethodDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.tools.doclets.VisibleMemberMap; - -public class MethodSubWriter extends ExecutableMemberSubWriter { - - public static class Del - extends com.sun.tools.doclets.standard.MethodSubWriter { - protected MethodSubWriter mw; - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - public void printMembersSummary() { - mw.printMembersSummary(); - mw.printIntroducedMembersSummary(); - } - public void printMembers() { - mw.printMembers(); - } - protected void navSummaryLink() { - mw.navSummaryLink(); - } - protected void navDetailLink() { - mw.navDetailLink(); - } - public void setDelegator(MethodSubWriter mw) { this.mw = mw; } - public void printSummaryMember(ClassDoc cd, ProgramElementDoc member) { - mw.printSummaryMember(cd, member); - } - } - - protected Class delegateClass() { return Del.class; } - - public MethodSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public MethodSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - public int getMemberKind() { - //XXX hack!!! - return VisibleMemberMap.METHODS; - } - - //XXX - //hacks - protected void printSummaryType(ProgramElementDoc member) { - if (member instanceof MethodDoc) { - //TODO: Put in Access... - MethodDoc meth = (MethodDoc)member; - printModifierAndType(meth, meth.returnType()); - } else if (member instanceof AdviceDoc) { - AdviceDoc advice = (AdviceDoc)member; - printModifierAndType(advice, advice.returnType()); - } - } - protected void printSignature(ExecutableMemberDoc member) { - writer.displayLength = 0; - writer.pre(); - printModifiers(member); - //printReturnType((MethodDoc)member); - bold(member.name()); - // printParameters(member); - // printExceptions(member); - writer.preEnd(); - } - //end-hacks - - protected String propertyName() { return "Method"; } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageFrameWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageFrameWriter.java deleted file mode 100644 index c49cbc015..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageFrameWriter.java +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.PackageDoc; -import com.sun.tools.doclets.DirectoryManager; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; - -public class PackageFrameWriter - extends com.sun.tools.doclets.standard.PackageFrameWriter -{ - - protected final PackageDoc packagedoc; - - public PackageFrameWriter(String path, - String filename, - PackageDoc packagedoc) - throws IOException, DocletAbortException { - super(path, filename, packagedoc); - this.packagedoc = packagedoc; - } - - public static void generate(PackageDoc pkg) throws DocletAbortException { - PackageFrameWriter pw = null; - String path = DirectoryManager.getDirectoryPath(pkg); - String filename = "package-frame" + ".html"; - try { - (pw = new PackageFrameWriter(path, filename, pkg)). - generatePackageFile(); - } catch (IOException e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - throw new DocletAbortException(); - } finally { - if (pw != null) pw.close(); - } - } - - protected void generateClassListing() { - generateClassKindListing(packagedoc.interfaces(), - getText("doclet.Interfaces")); - generateClassKindListing(Statics.classes(packagedoc. - ordinaryClasses()), - getText("doclet.Classes")); - generateClassKindListing(((org.aspectj.ajdoc.PackageDoc)packagedoc). - aspects(), - getText("doclet.Aspects")); - generateClassKindListing(packagedoc.exceptions(), - getText("doclet.Exceptions")); - generateClassKindListing(packagedoc.errors(), - getText("doclet.Errors")); - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageTreeWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageTreeWriter.java deleted file mode 100644 index 161608e44..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageTreeWriter.java +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.PackageDoc; -import com.sun.tools.doclets.ClassTree; -import com.sun.tools.doclets.DirectoryManager; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; -import java.util.List; - -public class PackageTreeWriter - extends com.sun.tools.doclets.standard.PackageTreeWriter -{ - - protected class Del extends AbstractTreeWriter { - public Del(String s, ClassTree c) - throws IOException, DocletAbortException { - super(s, c); - } - public void print(String s) { - PackageTreeWriter.this.print(s); - } - } - final protected Del del; - { - Standard.quiet(); - Del d = null; - try { - d = new Del(filename, classtree); - } catch (Exception e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - } finally { - del = d; - Standard.speak(); - } - } - protected void generateLevelInfo(ClassDoc parent, List list) { - del.generateLevelInfo(parent, list); - } - protected void generateTree(List list, String heading) { - del.generateTree(list, heading); - } - - public PackageTreeWriter(String path, - String filename, - PackageDoc packagedoc, - PackageDoc prev, - PackageDoc next, - boolean noDeprecated) - throws IOException, DocletAbortException { - super(path, filename, packagedoc, prev, next, noDeprecated); - } - - public static void generate(PackageDoc pkg, PackageDoc prev, - PackageDoc next, boolean noDeprecated) - throws DocletAbortException { - PackageTreeWriter pw = null; - String path = DirectoryManager.getDirectoryPath(pkg); - String filename = "package-tree.html"; - try { - (pw = new PackageTreeWriter(path, filename, pkg, - prev, next, noDeprecated)). - generatePackageTreeFile(); - } catch (IOException e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - throw new DocletAbortException(); - } finally { - if (pw != null) pw.close(); - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageWriter.java deleted file mode 100644 index 8a6ed5e57..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PackageWriter.java +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.PackageDoc; -import com.sun.tools.doclets.DirectoryManager; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; - -public class PackageWriter - extends com.sun.tools.doclets.standard.PackageWriter -{ - - protected final PackageDoc packagedoc; - - public PackageWriter(String path, - String filename, - PackageDoc packagedoc, - PackageDoc prev, - PackageDoc next) - throws IOException, DocletAbortException { - super(path, filename, packagedoc, prev, next); - this.packagedoc = packagedoc; - } - - public static void generate(PackageDoc pkg, - PackageDoc prev, - PackageDoc next) throws DocletAbortException { - PackageWriter pw; - String path = DirectoryManager.getDirectoryPath(pkg); - String filename = "package-summary.html"; - try { - (pw = new PackageWriter(path, filename, pkg, prev, next)). - generatePackageFile(); - pw.close(); - pw.copyDocFiles(path); - } catch (IOException e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", e+"", filename); - throw new DocletAbortException(); - } - } - - protected void generateClassListing() { - generateClassKindListing(packagedoc.interfaces(), - getText("doclet.Interface_Summary")); - generateClassKindListing(Statics.classes(packagedoc.ordinaryClasses()), - getText("doclet.Class_Summary")); - generateClassKindListing(((org.aspectj.ajdoc.PackageDoc)packagedoc).aspects(), - getText("doclet.Aspect_Summary")); - generateClassKindListing(packagedoc.exceptions(), - getText("doclet.Exception_Summary")); - generateClassKindListing(packagedoc.errors(), - getText("doclet.Error_Summary")); - } -} - - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PointcutSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PointcutSubWriter.java deleted file mode 100644 index 518c9f2ca..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/PointcutSubWriter.java +++ /dev/null @@ -1,227 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; -import org.aspectj.ajdoc.PointcutDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.javadoc.ParamTag; -import com.sun.javadoc.Parameter; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.javadoc.SeeTag; -import com.sun.javadoc.Tag; -import com.sun.javadoc.Type; -import com.sun.tools.doclets.Util; - -import java.util.List; - -public class PointcutSubWriter extends AbstractSubWriter { - - protected Class delegateClass() { - return null; - } - - public PointcutSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc classdoc) - { - super(writer, classdoc); - } - - public PointcutSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected final String keyName() { return "Pointcut"; } - -// public void printInheritedSummaryAnchor(ClassDoc cd) { -// writer.anchor("pointcuts_inherited_from_class_" + cd.qualifiedName()); -// } - -// public void printInheritedSummaryLabel(ClassDoc cd) { -// String classlink = writer.getPreQualifiedClassLink(cd); -// writer.bold(); -// writer.printText("doclet.Pointcuts_Inherited_From", -// Statics.type(cd), -// classlink); -// writer.boldEnd(); -// } - - void printSignature(MemberDoc member) { - PointcutDoc pcd = (PointcutDoc)member; - writer.displayLength = 0; - writer.pre(); - printModifiers(pcd); - bold(pcd.name()); - printParameters(pcd); - printResultType(pcd); - writer.preEnd(); - } - - void printResultType(PointcutDoc pcd) { - Type result = pcd.resultType(); - if (result != null) { - writer.code(); - print(" returns "); - printTypeLink(result); - writer.codeEnd(); - } - } - - protected void printSummaryLink(ClassDoc cd, ProgramElementDoc member) { - PointcutDoc pcd = (PointcutDoc)member; - String name = member.name(); - writer.bold(); - writer.printClassLink(cd, name + pcd.signature(), name, false); - writer.boldEnd(); - writer.displayLength = name.length(); - printParameters(pcd); - printResultType(pcd); - - } - - protected void printInheritedSummaryLink(ClassDoc cd, - ProgramElementDoc member) { - PointcutDoc pcd = (PointcutDoc)member; - String name = member.name(); - writer.printClassLink(cd, name + pcd.signature(), name, false); - } - - protected void printSummaryType(ProgramElementDoc member) { - PointcutDoc pcd = (PointcutDoc)member; - writer.printTypeSummaryHeader(); - printModifier(pcd); - writer.printTypeSummaryFooter(); - - } - - protected void printBodyHtmlEnd(ClassDoc cd) { - } - - protected void nonfinalPrintMember(ProgramElementDoc member) { - PointcutDoc pcd = (PointcutDoc)member; - writer.anchor(pcd.name() + pcd.signature()); - printHead(pcd); - printSignature(pcd); - printFullComment(pcd); - } - - protected void printDeprecatedLink(ProgramElementDoc member) { - writer.printClassLink(member.containingClass(), - member.name(), - ((PointcutDoc)member).qualifiedName()); - } - - protected List getMembers(ClassDoc cd) { - return Util.asList(((org.aspectj.ajdoc.ClassDoc)cd).pointcuts()); - } - - protected void printParameters(PointcutDoc member) { - print('('); - Parameter[] params = member.parameters(); - for (int i = 0; i < params.length; i++) { - printParam(params[i]); - if (i < params.length-1) { - writer.print(','); - writer.print(' '); - } - } - writer.print(')'); - } - - protected void printParam(Parameter param) { - printTypedName(param.type(), param.name()); - } - - protected void printParamTags(ParamTag[] params) { - if (params.length > 0) { - writer.dt(); - writer.boldText("doclet.Parameters"); - for (int i = 0; i < params.length; ++i) { - ParamTag pt = params[i]; - writer.dd(); - writer.code(); - print(pt.parameterName()); - writer.codeEnd(); - print(" - "); - writer.printInlineComment(pt); - } - } - } - - protected void printReturnTag(Tag[] returnsTag) { - if (returnsTag.length > 0) { - writer.dt(); - writer.boldText("doclet.Returns"); - writer.dd(); - writer.printInlineComment(returnsTag[0]); - } - } - - protected void printOverridden(ClassDoc overridden, PointcutDoc pcd) { - if (overridden != null) { - String name = pcd.name(); - writer.dt(); - writer.boldText("doclet.Overrides"); - writer.dd(); - writer.printText("doclet.in_class", - writer.codeText - (writer.getClassLink(overridden, - name + pcd.signature(), - name, false)), - writer.codeText - (writer.getClassLink(overridden))); - } - } - - protected void printTags(ProgramElementDoc member) { - PointcutDoc pcd = (PointcutDoc)member; - ParamTag[] params = pcd.paramTags(); - Tag[] returnsTag = pcd.tags("return"); - Tag[] sinces = pcd.tags("since"); - SeeTag[] sees = pcd.seeTags(); - ClassDoc[] intfacs = member.containingClass().interfaces(); - ClassDoc overridden = pcd.overriddenClass(); - if (intfacs.length > 0 || overridden != null) { - writer.dd(); - writer.dl(); - printOverridden(overridden, pcd); - writer.dlEnd(); - writer.ddEnd(); - } - if (params.length + - returnsTag.length + - sinces.length + - sees.length > 0) { - writer.dd(); - writer.dl(); - printParamTags(params); - printReturnTag(returnsTag); - writer.printSinceTag(pcd); - writer.printSeeTags(pcd); - writer.dlEnd(); - writer.ddEnd(); - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SingleIndexWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SingleIndexWriter.java deleted file mode 100644 index 889cfbbb8..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SingleIndexWriter.java +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.MemberDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.tools.doclets.DocletAbortException; -import com.sun.tools.doclets.IndexBuilder; - -import java.io.IOException; - -public class SingleIndexWriter - extends com.sun.tools.doclets.standard.SingleIndexWriter -{ - - protected class Del extends AbstractIndexWriter { - public Del(String s, IndexBuilder i) throws IOException { - super(s, i); - } - public void print(String s) { - SingleIndexWriter.this.print(s); - } - } - final protected Del del; - { - Standard.quiet(); - Del d = null; - try { - d = new Del(filename, indexbuilder); - } catch (Exception e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - } finally { - del = d; - Standard.speak(); - } - } - protected void printMemberDesc(MemberDoc member) { - del.printMemberDesc(member); - } - protected void printClassInfo(ClassDoc cd) { - del.printClassInfo(cd); - } - - public SingleIndexWriter(String filename, - IndexBuilder indexbuilder) throws IOException { - super(filename, indexbuilder); - } - - public static void generate(IndexBuilder indexbuilder) - throws DocletAbortException { - SingleIndexWriter sw = null; - String filename = "index-all.html"; - try { - (sw = new SingleIndexWriter(filename, indexbuilder)). - generateIndexFile(); - } catch (IOException e) { - Standard.configuration().standardmessage.error - ("doclet.exception_encountered", - e+"", filename); - throw new DocletAbortException(); - } finally { - if (sw != null) sw.close(); - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SplitIndexWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SplitIndexWriter.java deleted file mode 100644 index ea6e11204..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SplitIndexWriter.java +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.MemberDoc; -import com.sun.tools.doclets.DirectoryManager; -import com.sun.tools.doclets.DocletAbortException; -import com.sun.tools.doclets.IndexBuilder; - -import java.io.IOException; - -public class SplitIndexWriter - extends com.sun.tools.doclets.standard.SplitIndexWriter -{ - - protected class Del extends AbstractIndexWriter { - public Del(String s, IndexBuilder i) throws IOException { - super(s, i); - } - public void print(String s) { - SplitIndexWriter.this.print(s); - } - } - final protected Del del; - { - Standard.quiet(); - Del d = null; - try { - d = new Del(filename, indexbuilder); - } catch (Exception e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - } finally { - del = d; - Standard.speak(); - } - } - protected void printMemberDesc(MemberDoc member) { - del.printMemberDesc(member); - } - protected void printClassInfo(ClassDoc cd) { - del.printClassInfo(cd); - } - - public SplitIndexWriter(String path, String filename, - String relpath, IndexBuilder indexbuilder, - int prev, int next) throws IOException { - super(path, filename, relpath, - indexbuilder, prev, next); - } - - public static void generate(IndexBuilder indexbuilder) - throws DocletAbortException { - SplitIndexWriter sw = null; - String filename = ""; - String path = DirectoryManager.getPath("index-files"); - String relpath = DirectoryManager.getRelativePath("index-files"); - try { - for (int i = 0; i < indexbuilder.elements().length; i++) { - int j = i + 1; - int prev = (j == 1)? -1: i; - int next = (j == indexbuilder.elements().length)? -1: j + 1; - filename = "index-" + j +".html"; - (sw = new SplitIndexWriter(path, filename, relpath, - indexbuilder, prev, next)). - generateIndexFile((Character) - indexbuilder.elements()[i]); - } - } catch (IOException e) { - Standard.configuration(). - standardmessage.error("doclet.exception_encountered", - e+"", filename); - throw new DocletAbortException(); - } finally { - if (sw != null) sw.close(); - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/Standard.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/Standard.java deleted file mode 100644 index 916336eb7..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/Standard.java +++ /dev/null @@ -1,251 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.tools.ajdoc.Quietable; - -import com.sun.javadoc.RootDoc; -import com.sun.tools.doclets.DocletAbortException; -import com.sun.tools.doclets.standard.AllClassesFrameWriter; -import com.sun.tools.doclets.standard.FrameOutputWriter; -import com.sun.tools.doclets.standard.HelpWriter; -import com.sun.tools.doclets.standard.PackageIndexFrameWriter; -import com.sun.tools.doclets.standard.PackageIndexWriter; -import com.sun.tools.doclets.standard.PackageListWriter; -import com.sun.tools.doclets.standard.PackagesFileWriter; -import com.sun.tools.doclets.standard.SerializedFormWriter; -import com.sun.tools.doclets.standard.StylesheetWriter; - -import java.io.IOException; - -/** - * Main doclet for ajdoc. It defines a number of - * passes to use in generating the documentation. - * - * @author Jeff Palm - */ -public class Standard extends AbstractStandard { - private static Standard SINGLETON; // todo: prefer early/final? - public static final Standard getSingleton() { - if (null == SINGLETON) { - SINGLETON = new Standard(); - } - return SINGLETON; - } - private Standard() {} - - public static boolean start(RootDoc root) throws IOException { - return start(getSingleton(), root); - } - - public ConfigurationStandard getConfiguration() { - return (ConfigurationStandard)configuration(); - } - - public static void quiet() { - if (configuration().root instanceof Quietable) { - ((Quietable)configuration().root).quiet(); - } - } - public static void speak() { - if (configuration().root instanceof Quietable) { - ((Quietable)configuration().root).speak(); - } - } - - public static class ClassUseMapperPass extends Pass { - protected boolean cond() { - return cs.classuse; - } - protected void gen() throws DocletAbortException { - ClassUseMapper.generate(root, std.classtree); - } - public String title() { return "class use mapper"; } - } - - public static class TreeWriterPass extends Pass { - protected boolean cond() { - return cs.createtree; - } - protected void gen() throws DocletAbortException { - TreeWriter.generate(std.classtree); - } - public String title() { return "tree writer"; } - } - - public static class SplitIndexWriterPass extends Pass { - protected boolean cond() { - return cs.createindex && cs.splitindex; - } - protected void gen() throws DocletAbortException { - SplitIndexWriter.generate(std.indexBuilder(root, false)); - } - public String title() { return "split index"; } - } - - public static class SingleIndexWriterPass extends Pass { - protected boolean cond() { - return cs.createindex && !cs.splitindex; - } - protected void gen() throws DocletAbortException { - SingleIndexWriter.generate(std.indexBuilder(root, false)); - } - public String title() { return "single index"; } - } - - public static class DeprecatedListWriterPass extends Pass { - protected boolean cond() { - return !cs.nodeprecatedlist && !cs.nodeprecated; - } - protected void gen() throws DocletAbortException { - DeprecatedListWriter.generate(root); - } - public String title() { return "deprecated list"; } - } - - public static class AllClassesFrameWriterPass extends Pass { - protected void gen() throws DocletAbortException { - AllClassesFrameWriter.generate(std.indexBuilder(root, true)); - } - public String title() { return "all classes frame"; } - } - - public static class FrameOutputWriterPass extends Pass { - protected void gen() throws DocletAbortException { - FrameOutputWriter.generate(); - } - public String title() { return "output frame"; } - } - - public static class PackagesFileWriterPass extends Pass { - protected void gen() throws DocletAbortException { - PackagesFileWriter.generate(); - } - public String title() { return "packages files"; } - } - - public static class PackageIndexWriterPass extends Pass { - protected boolean cond(ConfigurationStandard cs) { - return cs.createoverview; - } - protected void gen() throws DocletAbortException { - PackageIndexWriter.generate(root); - } - public String title() { return "package index"; } - } - - public static class PackageIndexFrameWriterPass extends Pass { - protected boolean cond() { - return cs.packages.length > 1; - } - protected void gen() throws DocletAbortException { - PackageIndexFrameWriter.generate(); - } - public String title() { return "package index frame"; } - } - - protected Class[] preGenerationClasses() { - return new Class[] { - ClassUseMapperPass.class, - TreeWriterPass.class, - SplitIndexWriterPass.class, - SingleIndexWriterPass.class, - DeprecatedListWriterPass.class, - AllClassesFrameWriterPass.class, - FrameOutputWriterPass.class, - PackagesFileWriterPass.class, - PackageIndexWriterPass.class, - PackageIndexFrameWriterPass.class, - }; - } - - public static class SerializedFormWriterPass extends Pass { - protected void gen() throws DocletAbortException { - SerializedFormWriter.generate(root); - } - public String title() { return "serialized form"; } - } - - public static class PackageListWriterPass extends Pass { - protected void gen() throws DocletAbortException { - PackageListWriter.generate(root); - } - public String title() { return "package list"; } - } - - public static class HelpWriterPass extends Pass { - protected boolean cond() { - return cs.helpfile.length() == 0 && - !cs.nohelp; - } - protected void gen() throws DocletAbortException { - HelpWriter.generate(); - } - public String title() { return "help"; } - } - - public static class StylesheetWriterPass extends Pass { - protected boolean cond() { - return cs.stylesheetfile.length() == 0; - } - protected void gen() throws DocletAbortException { - StylesheetWriter.generate(); - } - public String title() { return "style sheet"; } - } - - - protected Class[] postGenerationClasses() { - return new Class[] { - SerializedFormWriterPass.class, - PackageListWriterPass.class, - HelpWriterPass.class, - StylesheetWriterPass.class, - }; - } - - public static class NoPublicClassesToDocumentCheck extends Check { - protected boolean cond() { - return root.classes().length == 0; - } - protected String message() { - return "doclet.No_Public_Classes_To_Document"; - } - } - public static class NoNonDeprecatedClassToDocumentCheck extends Check { - protected boolean cond() { - return cs.topFile.length() == 0; - } - protected String message() { - return "doclet.No_Non_Deprecated_Classes_To_Document"; - } - } - - protected Class[] checkClasses() { - return new Class[] { - NoPublicClassesToDocumentCheck.class, - NoNonDeprecatedClassToDocumentCheck.class, - }; - } -} - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/Statics.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/Statics.java deleted file mode 100644 index 55bcc8052..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/Statics.java +++ /dev/null @@ -1,253 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AdviceDoc; -import org.aspectj.ajdoc.AspectDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.tools.doclets.Util; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -/** - * A splattering of misc. functionality. - * - * @author Jeff Palm - */ -public class Statics { - - /** - * Returns a aspectj-world type String of <code>cd</code>. - * - * @return either aspect interface or class depending - * on the type of <code>cd</code>. - */ - public static String type(ClassDoc cd) { - return cd instanceof AspectDoc - ? "aspect" : cd.isInterface() - ? "interface" : "class"; - } - - /** - * Returns the link target for <code>member</code>. - * - * @param member the ProgramElementDoc in question. - * @return the link target for <code>member</code>. - */ - public static String where(ProgramElementDoc member) { - return member.name(); - } - - /** - * Returns the link label for <code>member</code>. - * - * @param member the ProgramElementDoc in question. - * @return the link label for <code>member</code>. - */ - public static String label(ProgramElementDoc member) { - return member.name(); - } - - /** - * Returns the link target for <code>member</code> from - * <code>cd</code>. - * - * @param cd the class from which we're linking. - * @param member the ProgramElementDoc in question. - * @return the link target for <code>member</code>. - */ - public static String where(ClassDoc cd, ProgramElementDoc member) { - if (member instanceof AdviceDoc) { - return name(cd, (AdviceDoc)member).replace(' ','_').replace('#','-'); - } - return member.name(); - } - - /** - * Returns the link label for <code>member</code> from - * <code>cd</code>. - * - * @param cd the class from which we're linking. - * @param member the ProgramElementDoc in question. - * @return the link target for <code>member</code>. - */ - public static String label(ClassDoc cd, ProgramElementDoc member) { - return name(cd, member); - } - - /** - * Returns the name for <code>member</code> from - * <code>cd</code>. This is here because we don't - * want really print the name of advice. - * - * @param cd the class from which we're printing. - * @param member the ProgramElementDoc in question. - * @return the name for <code>member</code>. - */ - public static String name(ClassDoc cd, ProgramElementDoc member) { - if (member instanceof AdviceDoc) { - return name(cd, (AdviceDoc)member); - } - return member.name(); - } - - /** - * Returns the String that should be printed for - * an advice's name. - * - * @param cd the ClassDoc from where we're printing. - * @param advice the member in question. - * @return correct printing name for <code>advice</code>. - */ - public static String name(ClassDoc cd, AdviceDoc advice) { - String name = advice.name(); - int num = 1; - for (Iterator i = advice(cd).iterator(); i.hasNext();) { - AdviceDoc ad = (AdviceDoc)i.next(); - if (ad.equals(advice)) { - break; - } - if (ad.name().equals(name)) { - num++; - } - } - return name + " #" + num; - } - - /** - * Returns the advice contained in <code>classdoc</code>. - * - * @param cd ClassDoc in question. - * @return a List with the {@link AdviceDoc}s - * contained in <code>cd</code>. - */ - public static List advice(ClassDoc classdoc) { - if (!(classdoc instanceof AspectDoc)) return Collections.EMPTY_LIST; - AdviceDoc[] advice = ((AspectDoc)classdoc).advice(); - return advice == null ? Collections.EMPTY_LIST : Util.asList(advice); - } - - /** - * Returns an array of classes only. - * - * @param arr source array from where the ClassDocs in - * the result will come. - * @return an array of ClassDoc containing only - * classes, <b>no aspects</b>. - */ - public static ClassDoc[] classes(ClassDoc[] arr) { - List list = new ArrayList(); - for (int i = 0; i < arr.length; i++) { - if (!(arr[i] instanceof AspectDoc)) { - list.add(arr[i]); - } - } - return (ClassDoc[])list.toArray(new ClassDoc[list.size()]); - } - - /** - * Returns a list of the classes found in the - * passed in list of types. - * - * @param types List of ClassDocs. - * @return a List containing those ClassDocs in - * <code>types</code> that <i>are not</i> aspects. - * @see #types(List,boolean) - */ - public static List classes(List types) { - return types(types, false); - } - - /** - * Returns a list of the classes found in the - * passed in list of types. - * - * @param types List of ClassDocs. - * @return a List containing those ClassDocs in - * <code>types</code> that <i>are</i> aspects. - * @see #types(List,boolean) - */ - public static List aspects(List types) { - return types(types, true); - } - - /** - * Returns a list of ClassDocs taken from <code>types</code> - * that are aspects iff <code>wantAspects</code>. - * - * @param types source List of ClassDocs. - * @param wantAspects ClassDocs <i>c<i>in the resulting List will - * conform to the test: - * <code>c instanceof AspectDoc) == wantAspects<code>. - * @return a List of ClassDocs all who conform to the test: - * <code>c instanceof AspectDoc) == wantAspects<code>. - */ - public static List types(List types, boolean wantAspects) { - List list = new ArrayList(); - for (Iterator i = types.iterator(); i.hasNext();) { - ClassDoc cd = (ClassDoc)i.next(); - if ((cd instanceof AspectDoc) == wantAspects) { - list.add(cd); - } - } - return list; - } - - /** - * Returns a prequalified class link to <code>cd</code> using - * the link target <code>where</code>. - * - * @param writer base writer to use. - * @param cd class to where we're linking. - * @param where link target. - * @return prequalified class link using - * <code>cd</code> and <code>where</code>. - */ - public static String getPreQualifiedClassLink - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc cd, - String where) { - return writer.getPkgName(cd) + writer.getClassLink(cd, where, cd.name()); - } - - /** - * Returns a prequalified class link to <code>cd</code> using - * the link target <code>where</code> returned by - * calling <code>getPreQualifiedClassLink</code>. - * - * @param writer base writer to use. - * @param cd class to where we're linking. - * @param where link target. - * @see #getPreQualifiedClassLink - */ - public static void printPreQualifiedClassLink - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - ClassDoc cd, - String where) { - writer.print(getPreQualifiedClassLink(writer, cd, where)); - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SubWriterHolderWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SubWriterHolderWriter.java deleted file mode 100644 index 7325844a4..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SubWriterHolderWriter.java +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; - -public abstract class SubWriterHolderWriter - extends com.sun.tools.doclets.standard.SubWriterHolderWriter -{ - - public SubWriterHolderWriter(String filename) throws IOException { - super(filename); - } - - - public SubWriterHolderWriter(String path, String filename, String relpath) - throws IOException, DocletAbortException { - super(path, filename, relpath); - } - - public void printSummaryMember(AbstractSubWriter mw, ClassDoc cd, - ProgramElementDoc member) { - super.printSummaryMember(mw, cd, member); - if (mw instanceof AbstractSubWriterAJ) { - AbstractSubWriterAJ aj = (AbstractSubWriterAJ)mw; - if (aj.hasCrosscuts(cd, member)) { - aj.printSummaryCrosscuts(cd, member); - } - } - } - - public String getPreQualifiedClassLink(ClassDoc cd, String where) { - return getPkgName(cd) + getClassLink(cd, where, cd.name()); - } - - public void printPreQualifiedClassLink(ClassDoc cd, String where) { - print(getPreQualifiedClassLink(cd, where)); - } -} - - - - diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SuperIntroductionSubWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SuperIntroductionSubWriter.java deleted file mode 100644 index ade3dcc6f..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/SuperIntroductionSubWriter.java +++ /dev/null @@ -1,181 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import org.aspectj.ajdoc.AspectDoc; -import org.aspectj.ajdoc.IntroducedSuperDoc; -import org.aspectj.ajdoc.IntroductionDoc; - -import com.sun.javadoc.ClassDoc; -import com.sun.javadoc.ProgramElementDoc; -import com.sun.javadoc.Type; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -public class SuperIntroductionSubWriter extends AbstractSubWriter { - - protected Class delegateClass() { - return null; //XXX ???? - } - - public SuperIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, - AspectDoc ad) - { - super(writer, ad); - } - - public SuperIntroductionSubWriter - (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) - { - super(writer); - } - - protected final String keyName() { return "Super_Introduction"; } - - public void printInheritedSummaryAnchor(ClassDoc cd) {} - public void printInheritedSummaryLabel(ClassDoc cd) {} - protected void printInheritedSummaryLink(ClassDoc cd, ProgramElementDoc ped) {} - - protected void printSummaryLink(ClassDoc cd, ProgramElementDoc member) { - IntroducedSuperDoc intro = (IntroducedSuperDoc)member; - writer.codeEnd(); - writer.printText("doclet.declare_parents"); - print(' '); - Type[] targets = intro.targets(); - for (int i = 0; i < targets.length; i++) { - if (i > 0) print(", "); - printTypeLink(targets[i]); - } - print(' '); - String str = intro.isImplements() ? "implements" : "extends"; - writer.printClassLink(cd, link(intro), str, false); - print(' '); - Type[] types = intro.types(); - for (int i = 0; i < types.length; i++) { - if (i > 0) print(", "); - printTypeLink(types[i]); - } - - } - - protected static String link(IntroducedSuperDoc intro) { - String str = intro.isImplements() ? "+implements" : "+extends"; - Type[] types = intro.types(); - str += "%"; - for (int i = 0; i < types.length; i++) str += types[i].qualifiedTypeName(); - str += "%"; - ClassDoc[] targets = intro.targets(); - for (int i = 0; i < targets.length; i++) str += targets[i].qualifiedTypeName(); - return str; - } - - protected void printSummaryType(ProgramElementDoc member) {} - - protected void printBodyHtmlEnd(ClassDoc cd) {} - - protected void nonfinalPrintMember(ProgramElementDoc member) { - IntroducedSuperDoc intro = (IntroducedSuperDoc)member; - writer.anchor(link(intro)); - String head = intro.isImplements() ? "+implements " : "+extends "; - Type[] types = intro.types(); - for (int i = 0; i < types.length; i++) { - head += (i > 0 ? ", " : "") + types[i].typeName(); - } - printHead(head); - printFullComment(intro); - } - - protected void printDeprecatedLink(ProgramElementDoc member) { - //TODO: ??? - } - - protected List getMembers(ClassDoc cd) { - if (!(cd instanceof AspectDoc)) return Collections.EMPTY_LIST; - IntroductionDoc[] introductions = ((AspectDoc)cd).introductions(); - List list = new ArrayList(); - if (introductions == null) return list; - for (int i = 0; i < introductions.length; i++) { - IntroductionDoc intro = introductions[i]; - if (intro instanceof IntroducedSuperDoc) { - list.add(intro); - } - } - return list; - } - - public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { - org.aspectj.ajdoc.IntroducedSuperDoc intro = - (org.aspectj.ajdoc.IntroducedSuperDoc)member; - ClassDoc[] targets = intro.targets(); - if (targets.length > 0) { - writer.dt(); - writer.boldText("doclet.Introduced_on"); - writer.dd(); - writer.code(); - Set targetSet = new HashSet(); - for (int i = 0; i < targets.length; i++) { - targetSet.add(targets[i]); - } - List targetList = new ArrayList(targetSet); - Collections.sort(targetList); - for (Iterator i = targetList.iterator(); i.hasNext();) { - ClassDoc target = (ClassDoc)i.next(); - writer.printClassLink(target); - if (i.hasNext()) writer.print(", "); - - } - writer.codeEnd(); - } - } - - public void printSummaryCrosscuts(ClassDoc cd, - ProgramElementDoc member) { - Set set = new HashSet(); - org.aspectj.ajdoc.IntroducedSuperDoc intro = - (org.aspectj.ajdoc.IntroducedSuperDoc)member; - ClassDoc[] targets = intro.targets(); - for (int i = 0; i < targets.length; i++) { - set.add(targets[i]); - } - if (targets.length > 0) { - writer.boldText("doclet.Advises"); - List list = new ArrayList(set); - Collections.sort(list); - for (Iterator i = list.iterator(); i.hasNext();) { - print(' '); - ClassDoc target = (ClassDoc)i.next(); - writer.printClassLink(target); - if (i.hasNext()) print(","); - } - } - } - - public boolean hasCrosscuts(ClassDoc cd, ProgramElementDoc member) { - return true; - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/TreeWriter.java b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/TreeWriter.java deleted file mode 100644 index 4119176bf..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/TreeWriter.java +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * This file is part of the debugger and core tools for the AspectJ(tm) - * programming language; see http://aspectj.org - * - * The contents of this file are subject to the Mozilla Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/. - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is AspectJ. - * - * The Initial Developer of the Original Code is Xerox Corporation. Portions - * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation. - * All Rights Reserved. - */ -package org.aspectj.tools.doclets.standard; - -import com.sun.javadoc.ClassDoc; -import com.sun.tools.doclets.ClassTree; -import com.sun.tools.doclets.DocletAbortException; - -import java.io.IOException; -import java.util.List; - -public class TreeWriter - extends com.sun.tools.doclets.standard.TreeWriter -{ - protected class Del extends AbstractTreeWriter { - public Del(String s, ClassTree c) - throws IOException, DocletAbortException { - super(s, c); - } - public void print(String s) { - TreeWriter.this.print(s); - } - } - final protected Del del; - { - Standard.quiet(); - Del d = null; - try { - d = new Del(filename, classtree); - } catch (Exception e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - } finally { - del = d; - Standard.speak(); - } - } - protected void generateLevelInfo(ClassDoc parent, List list) { - del.generateLevelInfo(parent, list); - } - protected void generateTree(List list, String heading) { - del.generateTree(list, heading); - } - - public TreeWriter(String filename, ClassTree classtree) - throws IOException, DocletAbortException { - super(filename, classtree); - } - - public static void generate(ClassTree classtree) - throws DocletAbortException { - TreeWriter tw = null; - String filename = "overview-tree.html"; - try { - (tw = new TreeWriter(filename, classtree)). - generateTreeFile(); - } catch (IOException e) { - Standard.configuration().standardmessage. - error("doclet.exception_encountered", - e+"", filename); - throw new DocletAbortException(); - } finally { - if (tw != null) tw.close(); - } - } -} diff --git a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/resources/standard.properties b/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/resources/standard.properties deleted file mode 100644 index cc0021e82..000000000 --- a/aspectj-attic/ajdoc-src/org/aspectj/tools/doclets/standard/resources/standard.properties +++ /dev/null @@ -1,344 +0,0 @@ -# -doclet.exception_encountered= {0} encountered \n\ -\twhile attempting to create file: {1} -doclet.perform_copy_exception_encountered= {0} encountered while \n\ -performing copy. -doclet.exception={0} encountered \n\ -\twhile {1}. -doclet.Contents=Contents -doclet.Overview=Overview -doclet.Window_Overview={0}: Overview -doclet.Package=Package -doclet.Window_Package={0}: Package {1} -doclet.Window_ClassFile_label={0}: {1} -doclet.Window_Packages_title={0} -doclet.All_Packages=All Packages -doclet.Tree=Tree -doclet.Class_Hierarchy=Class Hierarchy -doclet.Class_Aspect_Hierarchy=Class/Aspect Hierarchy -doclet.Window_Class_Hierarchy={0}: Class/Aspect Hierarchy -doclet.Window_Package_Class_Hierarchy={0}: {1} Class Hierarchy -doclet.Interface_Hierarchy=Interface Hierarchy -doclet.Aspect_Hierarchy=Aspect Hierarchy -doclet.Prev=PREV -doclet.Next=NEXT -doclet.Prev_Class=PREV CLASS -doclet.Next_Class=NEXT CLASS -doclet.Prev_Package=PREV PACKAGE -doclet.Next_Package=NEXT PACKAGE -doclet.Prev_Letter=PREV LETTER -doclet.Next_Letter=NEXT LETTER -doclet.Show_Lists=SHOW LISTS -doclet.Hide_Lists=HIDE LISTS -doclet.Summary=SUMMARY: -doclet.Detail=DETAIL: -doclet.navInner=INNER -doclet.navField=FIELD -doclet.navField_Introduction=DECLARE FIELD -doclet.navSuper_Introduction=DECLARE PARENTS -doclet.navPointcut=POINTCUT -doclet.navConstructor=CONSTRUCTOR -doclet.navConstructor_Introduction=DECLARE CONSTRUCTOR -doclet.navMethod=METHOD -doclet.navMethod_Introduction=DECLARE METHOD -doclet.navAdvice=ADVICE -doclet.Index=Index -doclet.Window_Single_Index={0}: Index -doclet.Window_Split_Index={0}: {1}-Index -doclet.Help=Help -doclet.Interface=Interface -doclet.Class=Class -doclet.Aspect=Aspect -doclet.interface=interface -doclet.aspect=aspect -doclet.class=class -doclet.error=error -doclet.exception=exception -doclet.extends=extends -doclet.dominates=dominates -doclet.Package_private=(package private) -doclet.implements=implements -doclet.Since=Since: -doclet.Version=Version: -doclet.Author=Author: -doclet.See_Also=See Also: -doclet.introduced_by_parens=(declared in {0}) -doclet.by_parens= ({0} by {1}) -doclet.introduced_by=-- declared in {0} -doclet.Introduced_on=Declared for: -doclet.Introduced_from=Declared in: -doclet.See=See: -doclet.File_not_found=File not found: {0} -doclet.Package_Summary=Package Summary -doclet.Interface_Summary=Interface Summary -doclet.Exception_Summary=Exception Summary -doclet.Error_Summary=Error Summary -doclet.Class_Summary=Class Summary -doclet.Aspect_Summary=Aspect Summary -doclet.Inner_Class_Summary=Inner Class/Aspect Summary -doclet.Field_Summary=Field Summary -doclet.Field_Introduction_Summary=Summary of Fields Declared on Target Types -doclet.Super_Introduction_Summary=Summary of Parent Types Declared on Target Types -doclet.Pointcut_Summary=Pointcut Summary -doclet.Constructor_Summary=Constructor Summary -doclet.Constructor_Introduction_Summary=Summary of Constructors Declared on Target Types -doclet.Method_Summary=Method Summary -doclet.Method_Introduction_Summary=Summary of Methods Declared on Target Types -doclet.Advice_Summary=Advice Summary -doclet.Option_conflict=Option {0} conflicts with {1} -doclet.Option_reuse=Option reused: {0} -doclet.MissingSerialTag=in class {0}, missing @serial tag for default serializable field: {1}. -doclet.MissingSerialDataTag=in class {0}, missing @serialData tag in method {1}. -doclet.Interfaces=Interfaces -doclet.Exceptions=Exceptions -doclet.Errors=Errors -doclet.Classes=Classes -doclet.Aspects=Aspects -doclet.Packages=Packages -doclet.All_Classes=All Classes/Aspects -doclet.All_Superinterfaces=All Superinterfaces: -doclet.All_Implemented_Interfaces=All Implemented Interfaces: -doclet.Members=Members -doclet.None=None -doclet.CLASSES=CLASSES -doclet.MEMBERS=MEMBERS -doclet.NONE=NONE -doclet.Inner_Classes_Inherited_From_Class=Inner classes/aspects inherited from class {0} -doclet.Inner_Classes_Inherited_From=Inner classes/aspects inherited from {0} {1} -doclet.Methods_Inherited_From_Class=Methods inherited from class {0} -doclet.Methods_Inherited_From_Interface=Methods inherited from interface {0} -doclet.Methods_Inherited_From=Methods inherited from {0} {1} -doclet.Methods_Introduced_From=Methods declared in {0} {1} -doclet.Constructors_Introduced_From=Constructors declared in {0} {1} -doclet.Advice_Inherited_From_Aspect=Advice inherited from aspect {0} -doclet.Advice_Inherited_From=Advice inherited from {0} {1} -doclet.Fields_Inherited_From_Class=Fields inherited from class {0} -doclet.Fields_Inherited_From_Interface=Fields inherited from interface {0} -doclet.Fields_Inherited_From=Fields inherited from {0} {1} -doclet.Fields_Introduced_From=Fields declared in {0} {1} -doclet.Pointcuts_Inherited_From_Class=Pointcuts inherited from class {0} -doclet.Pointcuts_Inherited_From_Interface=Pointcuts inherited from interface {0} -doclet.Pointcuts_Inherited_From=Pointcuts inherited from {0} {1} -doclet.Serializable=Serializable -doclet.Externalizable=Externalizable -doclet.Class_0_implements_serializable=Class {0} implements Serializable -doclet.Serialized_Form=Serialized Form -doclet.Serialized_Form_methods=Serialization Methods -doclet.Serialized_Form_fields=Serialized Fields -doclet.Serialized_Form_class=Serialization Overview -doclet.Serializable_no_customization=No readObject or writeObject method declared. -doclet.Super_Introduction_Detail=Parent Types Declared on Target Types -doclet.Field_Detail=Field Detail -doclet.Field_Introduction_Detail=Fields Declared on Target Types -doclet.Pointcut_Detail=Pointcut Detail -doclet.Method_Detail=Method Detail -doclet.Method_Introduction_Detail=Methods Declared on Target Types -doclet.Advice_Detail=Advice Detail -doclet.Constructor_Detail=Constructor Detail -doclet.Constructor_Introduction_Detail=Constructors Declared on Target Types -doclet.Deprecated=Deprecated. -doclet.Deprecated_class=This class is deprecated. -doclet.navDeprecated=Deprecated -doclet.Deprecated_List=Deprecated List -doclet.Window_Deprecated_List={0}: Deprecated List -doclet.Note_0_is_deprecated=Note: {0} is deprecated. -doclet.Crosscuts=Affects: -doclet.Crosscut_by=Affected by: -doclet.Advised_by=Affected by: -doclet.Advises=Affects: -doclet.Parameters=Parameters: -doclet.Returns=Returns: -doclet.SerialData=Serial Data: -doclet.Throws=Throws: -doclet.Overrides=Overrides: -doclet.in_class={0} in class {1} -doclet.Generating_0=Generating {0}... -doclet.0_Fields_and_Methods="{0}" Fields and Methods -doclet.Index_of_Fields_and_Methods=Index of Fields and Methods -doclet.Static_variable_in=Static variable in {0} -doclet.Variable_in=Variable in {0} -doclet.Constructor_for=Constructor for {0} -doclet.Advice_in=Advice in {0} -doclet.Pointcut_in=Pointcut in {0} -doclet.Static_method_in=Static method in {0} -doclet.Method_in=Method in {0} -doclet.throws=throws -doclet.package=package -doclet.destination_directory_not_found_0=destination directory not found: {0} -doclet.MalformedURL=Malformed URL: {0} -doclet.File_error=Error reading file: {0} -doclet.URL_error=Error fetching URL: {0} -doclet.Method_Summary=Method Summary -doclet.No_Package_Comment_File=For Package {0} Package.Comment file not found -doclet.No_Source_For_Class=Source information for class {0} not available. -doclet.see.class_or_package_not_found=Tag {0}: Class or Package not found: {1} -doclet.see.malformed_tag=Tag {0}: Malformed: {1} -doclet.Inherited_API_Summary=Inherited API Summary -doclet.Deprecated_API=Deprecated API -doclet.Deprecated_Classes=Deprecated Classes -doclet.Deprecated_Interfaces=Deprecated Interfaces -doclet.Deprecated_Exceptions=Deprecated Exceptions -doclet.Deprecated_Errors=Deprecated Errors -doclet.Deprecated_Fields=Deprecated Fields -doclet.Deprecated_Constructors=Deprecated Constructors -doclet.Deprecated_Advices=Deprecated Advice -doclet.Deprecated_Pointcuts=Deprecated Pointcuts -doclet.Deprecated_Field_Introductions=Deprecated Fields Declared on Target Types -doclet.Deprecated_Method_Introductions=Deprecated Methods Declared on Target Types -doclet.Deprecated_Constructor_Introductions=Deprecated Constructors Declared on Target Types -doclet.Deprecated_Super_Introductions=Deprecated Parent Types Declared on Target Types -doclet.Deprecated_Methods=Deprecated Methods -doclet.Frame_Output=Frame Output -doclet.Docs_generated_by_Javadoc=Documentation generated by Javadoc. -doclet.Generated_Docs_Untitled=Generated Documentation (Untitled) -doclet.Blank=Blank -doclet.Other_Packages=Other Packages -doclet.Package_Description=Package {0} Description -doclet.Description=Description -doclet.Specified_By=Specified by: -doclet.in_interface={0} in interface {1} -doclet.Subclasses=Direct Known Subclasses or Subaspects: -doclet.Subinterfaces=All Known Subinterfaces: -doclet.Implementing_Classes=All Known Implementing Classes: -doclet.also=also -doclet.Option=Option -doclet.Or=Or -doclet.Frames=Frames -doclet.FRAMES=FRAMES -doclet.NO_FRAMES=NO FRAMES -doclet.Package_Hierarchies=Package Hierarchies: -doclet.Hierarchy_For_Package=Hierarchy For Package {0} -doclet.Source_Code=Source Code: -doclet.Help=Help -doclet.Hierarchy_For_All_Packages=Hierarchy For All Packages -doclet.Cannot_handle_no_packages=Cannot handle no packages. -doclet.Frame_Alert=Frame Alert -doclet.Overview-Member-Frame=Overview Member Frame -doclet.Frame_Warning_Message=This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. -doclet.Non_Frame_Version=Non-frame version. -doclet.Frame_Version=Frame version -doclet.Link_To=Link to -doclet.Following_From_Class=Following copied from class: {0} -doclet.Following_From_Interface=Following copied from interface: {0} -doclet.Description_From_Interface=Description copied from interface: {0} -doclet.Description_From_Class=Description copied from class: {0} -doclet.Copying_File_0_To_Dir_1=Copying file {0} to directory {1}... -doclet.Copying_File_0_To_File_1=Copying file {0} to file {1}... -doclet.Standard_doclet_invoked=Standard doclet invoked... -doclet.No_Public_Classes_To_Document=No public or protected classes found to document. -doclet.No_Non_Deprecated_Classes_To_Document=No non-deprecated classes found to document. -doclet.Interfaces_Italic=Interfaces (italic) -doclet.Enclosing_Class=Enclosing class: -doclet.All_Advisors:Known Advisors: -doclet.All_Advisees:Known Advisees: -doclet.Enclosing_=Enclosing {0}: -doclet.Help_title=API Help -doclet.Window_Help_title={0}: API Help -doclet.Help_line_1=How This API Document Is Organized -doclet.Help_line_2=This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows. -doclet.Help_line_3=The {0} page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages. -doclet.Help_line_4=Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain five categories: -doclet.Help_line_5=Class/Aspect/Interface -doclet.Help_line_6=Each class, aspect, interface, inner class, inner aspect, and inner interface has its own separate page. Each of these pages has three sections consisting of a class/aspect/interface description, summary tables, and detailed member descriptions: -doclet.Help_line_7=Class/aspect inheritance diagram -doclet.Help_line_8=Direct Subclasses/Subaspects -doclet.Help_line_9=All Known Subinterfaces -doclet.Help_line_10=All Known Implementing Classes/Aspects -doclet.Help_line_11=Class/aspect/interface declaration -doclet.Help_line_12=Class/aspect/interface description -doclet.Help_line_13=Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer. -doclet.Help_line_14=Use -doclet.Help_line_15=Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar. -doclet.Help_line_16=Tree (Class/Aspect Hierarchy) -doclet.Help_line_17_with_tree_link=There is a {0} page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>. -doclet.Help_line_18=When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages. -doclet.Help_line_19=When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package. -doclet.Help_line_20_with_deprecated_api_link=The {0} page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations. -doclet.Help_line_21=Index -doclet.Help_line_22=The {0} contains an alphabetic list of all classes, interfaces, constructors, methods, and fields. -doclet.Help_line_23=Prev/Next -doclet.Help_line_24=These links take you to the next or previous class, interface, package, or related page. -doclet.Help_line_25=Frames/No Frames -doclet.Help_line_26=These links show and hide the HTML frames. All pages are available with or without frames. -doclet.Help_line_27=Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description. -doclet.Help_line_28=This help file applies to API documentation generated using the standard doclet. -doclet.The=The -doclet.Style_line_1=Javadoc style sheet -doclet.Style_line_2=Define colors, fonts and other style attributes here to override the defaults -doclet.Style_line_3=Page background color -doclet.Style_line_4=Table colors -doclet.Style_line_5=Dark mauve -doclet.Style_line_6=Light mauve -doclet.Style_line_7=White -doclet.Style_line_8=Font used in left-hand frame lists -doclet.Style_line_9=Example of smaller, sans-serif font in frames -doclet.Style_line_10=Navigation bar fonts and colors -doclet.Style_line_11=Dark Blue -doclet.ClassUse_Packages.that.use.0=Packages that use {0} -doclet.ClassUse_Uses.of.0.in.1=Uses of {0} in {1} -doclet.ClassUse_Classes.in.0.used.by.1=Classes in {0} used by {1} -doclet.ClassUse_Aspects.in.0.used.by.1=Aspects in {0} used by {1} -doclet.ClassUse_Subclass=Subclasses or subaspects of {0} in {1} -doclet.ClassUse_Subinterface=Subinterfaces of {0} in {1} -doclet.ClassUse_ImplementingClass=Classes in {1} that implement {0} -doclet.ClassUse_Field=Fields in {1} declared as {0} - -doclet.ClassUse_AdviceReturn=Advice in {1} that return {0} -doclet.ClassUse_AdviceArgs=Advice in {1} with parameters of type {0} -doclet.ClassUse_PointcutReturn=Pointcuts in {1} that return {0} -doclet.ClassUse_PointcutArgs=Pointcuts in {1} with parameters of type {0} -doclet.ClassUse_FieldIntroductions={0} fields declared by aspects in {1} -doclet.ClassUse_ClassIntroductions={0} parent class declarations by aspects in {1} -doclet.ClassUse_InterfaceIntroductions={0} parent interface declarations by aspects in {1} -doclet.ClassUse_ClassAdvisors=Aspects in {1} that affect {0} -doclet.ClassUse_AspectDominatees=Aspects in {1} that are dominated by {0} -doclet.ClassUse_AspectDominators=Aspects in {1} that dominate {0} - -doclet.ClassUse_MethodReturn=Methods in {1} that return {0} -doclet.ClassUse_MethodArgs=Methods in {1} with parameters of type {0} -doclet.ClassUse_MethodThrows=Methods in {1} that throw {0} -doclet.ClassUse_ConstructorArgs=Constructors in {1} with parameters of type {0} -doclet.ClassUse_ConstructorThrows=Constructors in {1} that throw {0} -doclet.ClassUse_No.usage.of.0=No usage of {0} -doclet.Window_ClassUse_Header={0}: Uses of {1} {2} -doclet.ClassUse_Title=Uses of {0}<br>{1} -doclet.navClassUse=Use -doclet.link_option_twice=Extern URL link option(link or linkoffline) used twice. -doclet.Error_in_packagelist=Error in using -group option: {0} {1} -doclet.Groupname_already_used=In -group option, groupname already used: {0} -doclet.Same_package_name_used=Package name format used twice: {0} -doclet.Packages_File_line_1=The front page has been relocated. -doclet.Packages_File_line_2=Please see: -doclet.usage=Provided by Standard doclet:\n\ - -d <directory> Destination directory for output files\n\ - -use Create class and package usage pages\n\ - -version Include @version paragraphs\n\ - -author Include @author paragraphs\n\ - -splitindex Split index into one file per letter\n\ - -windowtitle <text> Browser window title for the documenation\n\ - -doctitle <html-code> Include title for the package index(first) page\n\ - -header <html-code> Include header text for each page\n\ - -footer <html-code> Include footer text for each page\n\ - -bottom <html-code> Include bottom text for each page\n\ - -link <url> Create links to javadoc output at <url>\n\ - -linkoffline <url> <url2> Link to docs at <url> using package list at <url2>\n\ - -group <name> <p1>:<p2>.. Group specified packages together in overview page\n\ - -nodeprecated Do not include @deprecated information\n\ - -nosince Do not include @since information\n\ - -nodeprecatedlist Do not generate deprecated list\n\ - -notree Do not generate class hierarchy\n\ - -noindex Do not generate index\n\ - -nohelp Do not generate help link\n\ - -nonavbar Do not generate navigation bar\n\ - -serialwarn Generate warning about @serial tag\n\ - -charset <charset> Charset for cross-platform viewing of generated documentation.\n\ - -helpfile <file> Include file that help link links to\n\ - -stylesheetfile <path> File to change style of the generated documentation\n\ - -docencoding <name> Output encoding name -doclet.xusage=Special options:\n\ - -Xnodate Do not include generation date in output -doclet.pass_msg=[ {0} started ] -doclet.done_msg=[ {0} done in {1} ms ] -doclet.starting_internal_compile=Starting internal compile... -doclet.initializing_world=Initializing world... -doclet.declare_parents=declare parents: |