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

public Class VisibleMemberTable

extends Object
Class Inheritance
Imports
javax.lang.model.element.AnnotationMirror, .Element, .ElementKind, .ExecutableElement, .Modifier, .Name, .TypeElement, .VariableElement, javax.lang.model.type.ArrayType, .DeclaredType, .ExecutableType, .TypeKind, .TypeMirror, .WildcardType, javax.lang.model.util.Elements, .SimpleTypeVisitor14, java.lang.ref.SoftReference, java.util.ArrayList, .Collection, .Collections, .EnumMap, .EnumSet, .HashMap, .HashSet, .LinkedHashMap, .LinkedHashSet, .List, .Map, .Objects, .Set, java.util.function.Predicate, java.util.stream.Stream, jdk.javadoc.internal.doclets.toolkit.BaseConfiguration, .BaseOptions, .PropertyUtils

This class computes the main data structure for the doclet's operations. Essentially, the implementation encapsulating the javax.lang.model's view of what can be documented about a type element's members.

The general operations are as follows:

Members: these are the members from j.l.m's view but are structured along the kinds of this class.

Extra Members: these are members enclosed in an undocumented package-private type element, and may not be linkable (or documented), however, the members of such a type element may be documented, as if declared in the subtype, only if the enclosing type is not being documented by a filter such as -public, -protected, etc.

Visible Members: these are the members that are "visible" and available and should be documented, in a type element.

The basic rule for computation: when considering a type element, besides its immediate direct types and interfaces, the computation should not expand to any other type in the inheritance hierarchy.

This table generates all the data structures it needs for each type, as its own view, and will present some form of this to the doclet as and when required to.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
public static enum
private class
private static record
private static record

Field Summary

Modifier and TypeField and Description
private final Set<VisibleMemberTable>
allSuperclasses

Tables for direct and indirect superclasses.

private final List<VisibleMemberTable>
allSuperinterfaces

Tables for direct and indirect superinterfaces.

private final BaseConfiguration
private final Map<ExecutableElement, SoftReference<VisibleMemberTable.ImplementedMethods>>
private final VisibleMemberCache
private final BaseOptions
private final Map<ExecutableElement, VisibleMemberTable.OverrideInfo>
overriddenMethodTable

Maps a method m declared in te to a visible method m' in a te's supertype such that m overrides m'.

private final TypeElement
parent

The superclass of te or null if te is an interface or java.lang.Object.

private final Set<VisibleMemberTable>
parents

Tables for direct superclass and direct superinterfaces.

private final Map<ExecutableElement, VisibleMemberTable.PropertyMembers>
private final TypeElement
te

The class or interface described by this table.

private final Utils
private Map<VisibleMemberTable.Kind, List<Element>>

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private void
addDocumentedAnnotations(Set<AnnotationMirror> annotations, List<? extends AnnotationMirror> annotationMirrors)

private boolean
private boolean
private void
private void
private void
pack-priv void
private void
private void
private void
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

private Set<VisibleMemberTable>
private List<VisibleMemberTable>
public List<Element>

Returns:

a list of all visible members
getAllVisibleMembers
(VisibleMemberTable.Kind
the member kind
kind
)

Returns a list of all visible enclosed members of a type element, and inherited members.

private Set<AnnotationMirror>
public TypeMirror
public List<ExecutableElement>
private VisibleMemberTable.ImplementedMethods
public List<Element>

Returns:

a list of visible enclosed members in this type
getMembers
(VisibleMemberTable.Kind kind)

Returns a list of visible enclosed members of given kind, declared in this type element, and does not include any inherited members or extra members.

public ExecutableElement

Returns:

the method found or null
getOverriddenMethod
(ExecutableElement
the method to check
e
)

Returns the method overridden by the provided method, or null.

public VariableElement

Returns:

the field or null if absent
getPropertyField
(ExecutableElement
the method
ee
)

Returns the field for a property identified by any of the methods for that property.

public ExecutableElement

Returns:

the getter or null if absent
getPropertyGetter
(ExecutableElement
the method
ee
)

Returns the getter method for a property identified by any of the methods for that property.

public ExecutableElement

Returns:

the property method or null if absent
getPropertyMethod
(ExecutableElement
the method
ee
)

Returns the property method for a property identified by any of the methods for that property.

public ExecutableElement

Returns:

the setter or null if absent
getPropertySetter
(ExecutableElement
the method
ee
)

Returns the setter method for a property identified by any of the methods for that property.

public List<Element>

Returns:

a list of visible enclosed members
getVisibleMembers
(VisibleMemberTable.Kind
the member kind
kind
,
Predicate<Element>
the predicate used to filter the output
p
)

Returns a list of visible enclosed members of a specified kind, filtered by the specified predicate.

public List<Element>

Returns:

a list of visible enclosed members
getVisibleMembers
(VisibleMemberTable.Kind
the member kind
kind
)

Returns a list of all enclosed members including any extra members.

public Set<TypeElement>

Returns:

the set of visible classes in this map
getVisibleTypeElements
()

Returns a set of visible type elements in this type element's lineage.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean

Returns:

true if visible members are present.
hasVisibleMembers
()

Returns true if this table contains visible members of any kind, including inherited members.

public boolean

Returns:

true if visible members are present.
hasVisibleMembers
(VisibleMemberTable.Kind kind)

Returns true if this table contains visible members of the specified kind, including inherited members.

private boolean
private boolean
private boolean
private boolean

Returns:

true if the specified method is NOT a simple override of some other method, otherwise false
isNotSimpleOverride
(ExecutableElement
the method to check
e
)

Returns true if the specified method is NOT a simple override of some other method, otherwise false.

private boolean
private boolean
private static <K, V> boolean
putAllIsNonReplacing(Map<K, V> dst, Map<K, V> src)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait