APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.javadoc.internal.doclint

public Class Env

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .EnumSet, .HashMap, .HashSet, .LinkedHashSet, .List, .Map, .Set, java.util.function.Function, java.util.regex.Pattern, java.util.stream.Collectors, javax.lang.model.element.AnnotationMirror, .AnnotationValue, .Element, .ElementKind, .ExecutableElement, javax.lang.model.type.DeclaredType, .TypeKind, .TypeMirror, javax.lang.model.util.Elements, .Types, com.sun.source.doctree.DocCommentTree, com.sun.source.tree.CompilationUnitTree, com.sun.source.util.DocTrees, .JavacTask, .SourcePositions, .TreePath, com.sun.tools.javac.model.JavacTypes, com.sun.tools.javac.tree.JCTree, com.sun.tools.javac.util.MatchingUtils, jdk.javadoc.internal.tool.AccessLevel

Utility container for current execution environment, providing the current declaration and its doc comment.

Field Summary

Modifier and TypeField and Description
pack-priv AccessLevel
currAccess

The access level of the declaration containing the comment currently being analyzed.

pack-priv DocCommentTree
currDocComment

The comment current being analyzed.

pack-priv Element
currElement

The element for the declaration containing the comment currently being analyzed.

pack-priv Set<? extends ExecutableElement>
currOverriddenMethods

The set of methods, if any, that the current declaration overrides.

pack-priv TreePath
currPath

The path for the declaration containing the comment currently being analyzed.

pack-priv Set<String>
pack-priv Elements
pack-priv Set<Pattern>
pack-priv Set<Pattern>
pack-priv TypeMirror
pack-priv TypeMirror
pack-priv TypeMirror
pack-priv TypeMirror
pack-priv TypeMirror
pack-priv final Messages
messages

Message handler.

pack-priv boolean
strictReferenceChecks

How to handle bad references.

pack-priv Map<Element, Set<Messages.Group>>
suppressWarnings

A map containing the info derived from @SuppressWarnings for an element.

pack-priv DocTrees
pack-priv Types

Constructor Summary

AccessConstructor and Description
pack-priv
Env()

Method Summary

Modifier and TypeMethod and Description
pack-priv long
pack-priv long
private Set<Messages.Group>

Returns:

the set
getSuppressedGroups
(Element
the element
e
)

Returns the set of groups for an element for which messages should be suppressed.

private List<String>

Returns:

the list
getSuppressWarningsValue
(Element
the element
e
)

Returns the list of values given to an instance of @SuppressWarnings for an element, or an empty list if there is no annotation.

pack-priv void
pack-priv void
init(DocTrees trees, Elements elements, Types types)

pack-priv void
pack-priv void
pack-priv void
setCurrent(TreePath path, DocCommentTree comment)

Set the current declaration and its doc comment.

pack-priv void
pack-priv boolean
pack-priv boolean

Returns:

whether or not warnings in a group are suppressed for the current element
suppressWarnings
(Messages.Group
the group
g
)

Returns whether or not warnings in a group are suppressed for the current element.

pack-priv boolean

Returns:

whether or not warnings in a group are suppressed for a given element
suppressWarnings
(Element
the element
e
,
Messages.Group
the group
g
)

Returns whether or not warnings in a group are suppressed for a given element.

pack-priv static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currAccessback to summary
pack-priv AccessLevel currAccess

The access level of the declaration containing the comment currently being analyzed. This is the most limiting access level of the declaration itself and that of its containers. For example, a public method in a private class is noted as private.

currDocCommentback to summary
pack-priv DocCommentTree currDocComment

The comment current being analyzed.

currElementback to summary
pack-priv Element currElement

The element for the declaration containing the comment currently being analyzed.

currOverriddenMethodsback to summary
pack-priv Set<? extends ExecutableElement> currOverriddenMethods

The set of methods, if any, that the current declaration overrides.

currPathback to summary
pack-priv TreePath currPath

The path for the declaration containing the comment currently being analyzed.

customTagsback to summary
pack-priv Set<String> customTags
elementsback to summary
pack-priv Elements elements
excludePackagesback to summary
pack-priv Set<Pattern> excludePackages
includePackagesback to summary
pack-priv Set<Pattern> includePackages
java_lang_Errorback to summary
pack-priv TypeMirror java_lang_Error
java_lang_RuntimeExceptionback to summary
pack-priv TypeMirror java_lang_RuntimeException
java_lang_SuppressWarningsback to summary
pack-priv TypeMirror java_lang_SuppressWarnings
java_lang_Throwableback to summary
pack-priv TypeMirror java_lang_Throwable
java_lang_Voidback to summary
pack-priv TypeMirror java_lang_Void
messagesback to summary
pack-priv final Messages messages

Message handler.

strictReferenceChecksback to summary
pack-priv boolean strictReferenceChecks

How to handle bad references. If false, a reference into a module that is not in the module graph will just be reported as a warning. All other bad references will be reported as errors. This is the desired behavior for javac. If true, all bad references will be reported as errors. This is the desired behavior for javadoc.

suppressWarningsback to summary
pack-priv Map<Element, Set<Messages.Group>> suppressWarnings

A map containing the info derived from @SuppressWarnings for an element.

treesback to summary
pack-priv DocTrees trees
typesback to summary
pack-priv Types types

Constructor Detail

Envback to summary
pack-priv Env()

Method Detail

getPosback to summary
pack-priv long getPos(TreePath p)
getStartPosback to summary
pack-priv long getStartPos(TreePath p)
getSuppressedGroupsback to summary
private Set<Messages.Group> getSuppressedGroups(Element e)

Returns the set of groups for an element for which messages should be suppressed. The set is determined by examining the arguments for any @SuppressWarnings annotation that may be present on the element. The supported strings are: "doclint" and "doclint:GROUP,..." for each GROUP

Parameters
e:Element

the element

Returns:Set<Messages.Group>

the set

getSuppressWarningsValueback to summary
private List<String> getSuppressWarningsValue(Element e)

Returns the list of values given to an instance of @SuppressWarnings for an element, or an empty list if there is no annotation.

Parameters
e:Element

the element

Returns:List<String>

the list

initback to summary
pack-priv void init(JavacTask task)
initback to summary
pack-priv void init(DocTrees trees, Elements elements, Types types)
initTypesback to summary
pack-priv void initTypes()
setCheckPackagesback to summary
pack-priv void setCheckPackages(String packages)
setCurrentback to summary
pack-priv void setCurrent(TreePath path, DocCommentTree comment)

Set the current declaration and its doc comment.

setCustomTagsback to summary
pack-priv void setCustomTags(String cTags)
shouldCheckback to summary
pack-priv boolean shouldCheck(CompilationUnitTree unit)
suppressWarningsback to summary
pack-priv boolean suppressWarnings(Messages.Group g)

Returns whether or not warnings in a group are suppressed for the current element.

Parameters
g:Messages.Group

the group

Returns:boolean

whether or not warnings in a group are suppressed for the current element

suppressWarningsback to summary
pack-priv boolean suppressWarnings(Element e, Messages.Group g)

Returns whether or not warnings in a group are suppressed for a given element.

Parameters
e:Element

the element

g:Messages.Group

the group

Returns:boolean

whether or not warnings in a group are suppressed for a given element

validatePackagesback to summary
pack-priv static boolean validatePackages(String packages)