langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java
changeset 40315 9e994c77db6a
parent 40303 96a1226aca18
child 40508 74ef30d16fb9
equal deleted inserted replaced
40314:52f8470ce3e4 40315:9e994c77db6a
    30 
    30 
    31 import javax.lang.model.SourceVersion;
    31 import javax.lang.model.SourceVersion;
    32 import javax.lang.model.element.PackageElement;
    32 import javax.lang.model.element.PackageElement;
    33 import javax.lang.model.element.TypeElement;
    33 import javax.lang.model.element.TypeElement;
    34 
    34 
       
    35 import jdk.javadoc.doclet.Doclet;
    35 import jdk.javadoc.doclet.DocletEnvironment;
    36 import jdk.javadoc.doclet.DocletEnvironment;
    36 import jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder;
    37 import jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder;
    37 import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory;
    38 import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory;
    38 import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
    39 import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
    39 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
    40 import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
    51  *  This code and its internal interfaces are subject to change or
    52  *  This code and its internal interfaces are subject to change or
    52  *  deletion without notice.</b>
    53  *  deletion without notice.</b>
    53  *
    54  *
    54  * @author Jamie Ho
    55  * @author Jamie Ho
    55  */
    56  */
    56 public abstract class AbstractDoclet {
    57 public abstract class AbstractDoclet implements Doclet {
    57 
    58 
    58     /**
    59     /**
    59      * The global configuration information for this run.
    60      * The global configuration information for this run.
    60      */
    61      */
    61     private Configuration configuration;
    62     private Configuration configuration;
    90      * The method that starts the execution of the doclet.
    91      * The method that starts the execution of the doclet.
    91      *
    92      *
    92      * @param root   the {@link DocletEnvironment} that points to the source to document.
    93      * @param root   the {@link DocletEnvironment} that points to the source to document.
    93      * @return true if the doclet executed without error.  False otherwise.
    94      * @return true if the doclet executed without error.  False otherwise.
    94      */
    95      */
    95     public boolean startDoclet(DocletEnvironment root) {
    96     @Override
       
    97     public boolean run(DocletEnvironment root) {
    96         configuration = configuration();
    98         configuration = configuration();
    97         configuration.docEnv = root;
    99         configuration.docEnv = root;
    98         configuration.cmtUtils = new CommentUtils(configuration);
   100         configuration.cmtUtils = new CommentUtils(configuration);
    99         configuration.utils = new Utils(configuration);
   101         configuration.utils = new Utils(configuration);
   100         utils = configuration.utils;
   102         utils = configuration.utils;
   129 
   131 
   130     /**
   132     /**
   131      * Returns the SourceVersion indicating the features supported by this doclet.
   133      * Returns the SourceVersion indicating the features supported by this doclet.
   132      * @return SourceVersion
   134      * @return SourceVersion
   133      */
   135      */
   134     public SourceVersion sourceVersion() {
   136     @Override
       
   137     public SourceVersion getSupportedSourceVersion() {
   135         return SourceVersion.RELEASE_9;
   138         return SourceVersion.RELEASE_9;
   136     }
   139     }
   137 
   140 
   138 
   141 
   139     /**
   142     /**