Spec-Zone.ru › OpenJDK 27

Interface DocletEnvironment

public interface DocletEnvironment
Represents the operating environment of a single invocation of the doclet. This object can be used to access the program structures, various utilities and the user specified elements on the command line.
Since:
9

Nested Class Summary

Modifier and Type Interface Description
static enum  DocletEnvironment.ModuleMode
The mode specifying the level of detail of module documentation.

Method Summary

Modifier and Type Method Description
DocTrees getDocTrees()
Returns an instance of the DocTrees utility class.
Elements getElementUtils()
Returns an instance of the Elements utility class.
JavaFileObject.Kind getFileKind(TypeElement type)
Returns the file kind of a type element.
Set<? extends Element> getIncludedElements()
Returns the module, package and type elements that should be included in the documentation.
JavaFileManager getJavaFileManager()
Returns the file manager used to read and write files.
DocletEnvironment.ModuleMode getModuleMode()
Returns the required level of module documentation.
SourceVersion getSourceVersion()
Returns the source version of the source files that were read.
Set<? extends Element> getSpecifiedElements()
Returns the elements specified when the tool is invoked.
Types getTypeUtils()
Returns an instance of the Types utility class.
boolean isIncluded(Element e)
Returns true if an element should be included in the documentation.
boolean isSelected(Element e)
Returns true if the element is selected.

Method Details

getSpecifiedElements

Set<? extends Element> getSpecifiedElements()
Returns the elements specified when the tool is invoked.
Returns:
the set of specified elements

getIncludedElements

Set<? extends Element> getIncludedElements()
Returns the module, package and type elements that should be included in the documentation.
Returns:
the set of included elements

getDocTrees

DocTrees getDocTrees()
Returns an instance of the DocTrees utility class. This class provides methods to access TreePaths, DocCommentTrees and so on.
Returns:
a utility class to operate on doc trees

getElementUtils

Elements getElementUtils()
Returns an instance of the Elements utility class. This class provides methods for operating on elements.
Returns:
a utility class to operate on elements

getTypeUtils

Types getTypeUtils()
Returns an instance of the Types utility class. This class provides methods for operating on type mirrors.
Returns:
a utility class to operate on type mirrors

isIncluded

boolean isIncluded(Element e)
Returns true if an element should be included in the documentation.
Parameters:
e - the element
Returns:
true if included, false otherwise

isSelected

boolean isSelected(Element e)
Returns true if the element is selected.
Parameters:
e - the element
Returns:
true if selected, false otherwise

getJavaFileManager

JavaFileManager getJavaFileManager()
Returns the file manager used to read and write files.
Returns:
the file manager used to read and write files

getSourceVersion

SourceVersion getSourceVersion()
Returns the source version of the source files that were read.
Returns:
the source version

getModuleMode

DocletEnvironment.ModuleMode getModuleMode()
Returns the required level of module documentation.
Returns:
the required level of module documentation

getFileKind

JavaFileObject.Kind getFileKind(TypeElement type)
Returns the file kind of a type element.
Parameters:
type - the type element
Returns:
the file kind

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API