Java Code Examples for com.sun.tools.doclets.internal.toolkit.Configuration#getFileManager()

The following examples show how to use com.sun.tools.doclets.internal.toolkit.Configuration#getFileManager() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DocFileFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 2
Source File: PathDocFileFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
Example 3
Source File: DocFileFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 4
Source File: PathDocFileFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
Example 5
Source File: DocFileFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 6
Source File: PathDocFileFactory.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
Example 7
Source File: PathDocFileFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
Example 8
Source File: DocFileFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 9
Source File: PathDocFileFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
Example 10
Source File: DocFileFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 11
Source File: DocFileFactory.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager)
            f = new StandardDocFileFactory(configuration);
        else {
            try {
                Class<?> pathFileManagerClass =
                        Class.forName("com.sun.tools.javac.nio.PathFileManager");
                if (pathFileManagerClass.isAssignableFrom(fm.getClass()))
                    f = new PathDocFileFactory(configuration);
            } catch (Throwable t) {
                throw new IllegalStateException(t);
            }
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 12
Source File: DocFileFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the appropriate factory, based on the file manager given in the
 * configuration.
 */
static synchronized DocFileFactory getFactory(Configuration configuration) {
    DocFileFactory f = factories.get(configuration);
    if (f == null) {
        JavaFileManager fm = configuration.getFileManager();
        if (fm instanceof StandardJavaFileManager) {
            f = new StandardDocFileFactory(configuration);
        } else {
            throw new IllegalStateException();
        }
        factories.put(configuration, f);
    }
    return f;
}
 
Example 13
Source File: PathDocFileFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public PathDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (PathFileManager) configuration.getFileManager();

    if (!configuration.destDirName.isEmpty()
            || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
        try {
            String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
            Path dir = fileManager.getDefaultFileSystem().getPath(dirName);
            fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
        } catch (IOException e) {
            throw new DocletAbortException(e);
        }
    }

    destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
}
 
Example 14
Source File: StandardDocFileFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}
 
Example 15
Source File: StandardDocFileFactory.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}
 
Example 16
Source File: StandardDocFileFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}
 
Example 17
Source File: StandardDocFileFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}
 
Example 18
Source File: StandardDocFileFactory.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}
 
Example 19
Source File: StandardDocFileFactory.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}
 
Example 20
Source File: StandardDocFileFactory.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public StandardDocFileFactory(Configuration configuration) {
    super(configuration);
    fileManager = (StandardJavaFileManager) configuration.getFileManager();
}