APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.javadoc.internal.doclets.toolkit.util

pack-priv Class StandardDocFileFactory

extends DocFileFactory
Class Inheritance
Imports
java.io.BufferedInputStream, .BufferedOutputStream, .BufferedWriter, .IOException, .InputStream, .OutputStream, .OutputStreamWriter, .UnsupportedEncodingException, .Writer, java.nio.file.DirectoryStream, .Files, .Path, .Paths, java.util.ArrayList, .Arrays, .LinkedHashSet, .List, .Objects, .Set, javax.tools.DocumentationTool, .FileObject, .JavaFileManager.Location, .JavaFileObject, .StandardJavaFileManager, .StandardLocation, com.sun.tools.javac.util.Assert, jdk.javadoc.internal.doclets.toolkit.BaseConfiguration

Implementation of DocFileFactory using a StandardJavaFileManager.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private Path
private final StandardJavaFileManager
Inherited from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory:
configuration

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DocFile
public DocFile
createFileForInput(String file)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForInput.

Create a DocFile for a file that will be opened for reading.

public DocFile
createFileForInput(Path file)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForInput.

Create a DocFile for a file that will be opened for reading.

public DocFile
createFileForOutput(DocPath path)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForOutput.

Create a DocFile for a file that will be opened for writing.

private Path
pack-priv Iterable<DocFile>
list(JavaFileManager.Location location, DocPath path)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.list.

List the directories and files found in subdirectories along the elements of the given location.

private static Path
newFile(Path dir, String path)

public void
Inherited from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory:
getFactory

Field Detail

destDirback to summary
private Path destDir
fileManagerback to summary
private final StandardJavaFileManager fileManager

Constructor Detail

StandardDocFileFactoryback to summary
public StandardDocFileFactory(BaseConfiguration configuration)

Method Detail

createFileForDirectoryback to summary
public DocFile createFileForDirectory(String file)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForDirectory.

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForDirectory.

Create a DocFile for a directory.

Annotations
@Override
createFileForInputback to summary
public DocFile createFileForInput(String file)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForInput.

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForInput.

Create a DocFile for a file that will be opened for reading.

Annotations
@Override
createFileForInputback to summary
public DocFile createFileForInput(Path file)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForInput.

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForInput.

Create a DocFile for a file that will be opened for reading.

Annotations
@Override
createFileForOutputback to summary
public DocFile createFileForOutput(DocPath path)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForOutput.

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.createFileForOutput.

Create a DocFile for a file that will be opened for writing.

Annotations
@Override
getDestDirback to summary
private Path getDestDir()
listback to summary
pack-priv Iterable<DocFile> list(JavaFileManager.Location location, DocPath path)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.list.

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.list.

List the directories and files found in subdirectories along the elements of the given location.

Annotations
@Override
newFileback to summary
private static Path newFile(Path dir, String path)
setDestDirback to summary
public void setDestDir(String destDirName) throws SimpleDocletException

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory.setDestDir.

Annotations
@Override
jdk.javadoc.internal.doclets.toolkit.util back to summary

pack-priv Class StandardDocFileFactory.StandardDocFile

extends DocFile
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Path
Inherited from jdk.javadoc.internal.doclets.toolkit.util.DocFile:
locationpathPLATFORM_LINE_SEPARATOR

Constructor Summary

AccessConstructor and Description
pack-priv
StandardDocFile(Path file)

Create a StandardDocFile for a given file.

pack-priv
StandardDocFile(JavaFileManager.Location location, DocPath path)

Create a StandardDocFile for a given location and relative path.

Method Summary

Modifier and TypeMethod and Description
public boolean
canRead()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.canRead.

Return true if the file can be read.

public boolean
canWrite()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.canWrite.

Return true if the file can be written.

public boolean
exists()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.exists.

Return true if the file exists.

public FileObject
getFileObject()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.getFileObject.

Returns a file object for the file.

private FileObject
private JavaFileObject
public String
getName()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.getName.

Return the base name (last component) of the file name.

public String
getPath()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.getPath.

Return the file system path for this file.

public boolean
isAbsolute()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isAbsolute.

Return true is file has an absolute path name.

public boolean
isDirectory()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isDirectory.

Return true is file identifies a directory.

public boolean
isFile()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isFile.

Return true is file identifies a file.

public boolean
isSameFile(DocFile other)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isSameFile.

Return true if this file is the same as another.

public Iterable<DocFile>
list()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.list.

If the file is a directory, list its contents.

public boolean
mkdirs()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.mkdirs.

Create the file as a directory, including any parent directories.

public InputStream
openInputStream()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.openInputStream.

Open an input stream for the file.

public OutputStream
openOutputStream()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.openOutputStream.

Open an output stream for the file.

public Writer
openWriter()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.openWriter.

Open an writer for the file, using the encoding (if any) given in the doclet configuration.

public DocFile
resolve(DocPath p)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.resolve.

Derive a new file by resolving a relative path against this file.

public DocFile
resolve(String p)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.resolve.

Derive a new file by resolving a relative path against this file.

public DocFile
resolveAgainst(JavaFileManager.Location locn)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.resolveAgainst.

Resolve a relative file against the given output location.

public String
toString()

Overrides java.lang.Object.toString.

Return a string to identify the contents of this object, for debugging purposes.

Inherited from jdk.javadoc.internal.doclets.toolkit.util.DocFile:
copyFilecopyResourcecopyResourcecopyResourcecreateFileForDirectorycreateFileForInputcreateFileForInputcreateFileForOutputlist

Field Detail

fileback to summary
private final Path file

Constructor Detail

StandardDocFileback to summary
pack-priv StandardDocFile(Path file)

Create a StandardDocFile for a given file.

StandardDocFileback to summary
pack-priv StandardDocFile(JavaFileManager.Location location, DocPath path)

Create a StandardDocFile for a given location and relative path.

Method Detail

canReadback to summary
public boolean canRead()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.canRead.

Return true if the file can be read.

Annotations
@Override
canWriteback to summary
public boolean canWrite()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.canWrite.

Return true if the file can be written.

Annotations
@Override
existsback to summary
public boolean exists()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.exists.

Return true if the file exists.

Annotations
@Override
getFileObjectback to summary
public FileObject getFileObject()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.getFileObject.

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFile.getFileObject.

Returns a file object for the file.

Annotations
@Override
getFileObjectForOutputback to summary
private FileObject getFileObjectForOutput(DocPath path) throws IOException
getJavaFileObjectForInputback to summary
private JavaFileObject getJavaFileObjectForInput(Path file)
getNameback to summary
public String getName()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.getName.

Return the base name (last component) of the file name.

Annotations
@Override
getPathback to summary
public String getPath()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.getPath.

Return the file system path for this file.

Annotations
@Override
isAbsoluteback to summary
public boolean isAbsolute()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isAbsolute.

Return true is file has an absolute path name.

Annotations
@Override
isDirectoryback to summary
public boolean isDirectory()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isDirectory.

Return true is file identifies a directory.

Annotations
@Override
isFileback to summary
public boolean isFile()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isFile.

Return true is file identifies a file.

Annotations
@Override
isSameFileback to summary
public boolean isSameFile(DocFile other)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.isSameFile.

Return true if this file is the same as another.

Annotations
@Override
listback to summary
public Iterable<DocFile> list() throws DocFileIOException

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.list.

If the file is a directory, list its contents.

Annotations
@Override
Exceptions
DocFileIOException:

Doc from jdk.javadoc.internal.doclets.toolkit.util.DocFile.list.

if there is a problem while listing the directory

mkdirsback to summary
public boolean mkdirs()

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.mkdirs.

Create the file as a directory, including any parent directories.

Annotations
@Override
openInputStreamback to summary
public InputStream openInputStream() throws DocFileIOException

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.openInputStream.

Open an input stream for the file.

Annotations
@Override
Exceptions
DocFileIOException:
if there is a problem while opening stream
openOutputStreamback to summary
public OutputStream openOutputStream() throws DocFileIOException

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.openOutputStream.

Open an output stream for the file. The file must have been created with a location of DocumentationTool.Location#DOCUMENTATION_OUTPUT and a corresponding relative path.

Annotations
@Override
Exceptions
DocFileIOException:
if there is a problem while opening stream
openWriterback to summary
public Writer openWriter() throws DocFileIOException, UnsupportedEncodingException

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.openWriter.

Open an writer for the file, using the encoding (if any) given in the doclet configuration. The file must have been created with a location of DocumentationTool.Location#DOCUMENTATION_OUTPUT and a corresponding relative path.

Annotations
@Override
Exceptions
DocFileIOException:
if there is a problem while opening stream
UnsupportedEncodingException:
if the configured encoding is not supported
resolveback to summary
public DocFile resolve(DocPath p)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.resolve.

Derive a new file by resolving a relative path against this file. The new file will inherit the configuration and location of this file If this file has a path set, the new file will have a corresponding new path.

Annotations
@Override
resolveback to summary
public DocFile resolve(String p)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.resolve.

Derive a new file by resolving a relative path against this file. The new file will inherit the configuration and location of this file If this file has a path set, the new file will have a corresponding new path.

Annotations
@Override
resolveAgainstback to summary
public DocFile resolveAgainst(JavaFileManager.Location locn)

Implements abstract jdk.javadoc.internal.doclets.toolkit.util.DocFile.resolveAgainst.

Resolve a relative file against the given output location.

Parameters
locn:JavaFileManager.Location

Currently, only DocumentationTool.Location#DOCUMENTATION_OUTPUT is supported.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return a string to identify the contents of this object, for debugging purposes.

Annotations
@Override