src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SimpleDocFileFactory.java

changeset 1413
bdcef2ef52d2
parent 1412
400a4e8accd3
child 1985
0e6577980181
     1.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SimpleDocFileFactory.java	Thu Nov 15 19:54:20 2012 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SimpleDocFileFactory.java	Thu Nov 15 23:07:24 2012 -0800
     1.3 @@ -43,6 +43,7 @@
     1.4  import java.util.List;
     1.5  import java.util.Set;
     1.6  
     1.7 +import javax.tools.DocumentationTool;
     1.8  import javax.tools.JavaFileManager.Location;
     1.9  import javax.tools.StandardLocation;
    1.10  
    1.11 @@ -74,7 +75,7 @@
    1.12      }
    1.13  
    1.14      public DocFile createFileForOutput(DocPath path) {
    1.15 -        return new SimpleDocFile(StandardLocation.CLASS_OUTPUT, path);
    1.16 +        return new SimpleDocFile(DocumentationTool.Location.DOCUMENTATION_OUTPUT, path);
    1.17      }
    1.18  
    1.19      @Override
    1.20 @@ -121,10 +122,10 @@
    1.21          /**
    1.22           * Open an output stream for the file.
    1.23           * The file must have been created with a location of
    1.24 -         * {@link StandardLocation#CLASS_OUTPUT} and a corresponding relative path.
    1.25 +         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
    1.26           */
    1.27          public OutputStream openOutputStream() throws IOException, UnsupportedEncodingException {
    1.28 -            if (location != StandardLocation.CLASS_OUTPUT)
    1.29 +            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
    1.30                  throw new IllegalStateException();
    1.31  
    1.32              createDirectoryForFile(file);
    1.33 @@ -135,10 +136,10 @@
    1.34           * Open an writer for the file, using the encoding (if any) given in the
    1.35           * doclet configuration.
    1.36           * The file must have been created with a location of
    1.37 -         * {@link StandardLocation#CLASS_OUTPUT} and a corresponding relative path.
    1.38 +         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
    1.39           */
    1.40          public Writer openWriter() throws IOException, UnsupportedEncodingException {
    1.41 -            if (location != StandardLocation.CLASS_OUTPUT)
    1.42 +            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
    1.43                  throw new IllegalStateException();
    1.44  
    1.45              createDirectoryForFile(file);
    1.46 @@ -243,10 +244,11 @@
    1.47  
    1.48          /**
    1.49           * Resolve a relative file against the given output location.
    1.50 -         * @param locn Currently, only SOURCE_OUTPUT is supported.
    1.51 +         * @param locn Currently, only
    1.52 +         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} is supported.
    1.53           */
    1.54 -        public DocFile resolveAgainst(StandardLocation locn) {
    1.55 -            if (locn != StandardLocation.CLASS_OUTPUT)
    1.56 +        public DocFile resolveAgainst(Location locn) {
    1.57 +            if (locn != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
    1.58                  throw new IllegalArgumentException();
    1.59              return new SimpleDocFile(
    1.60                      new File(configuration.destDirName, file.getPath()));

mercurial