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

public Class TypeElementCatalog

extends Object
Class Inheritance
Imports
java.util.*, javax.lang.model.element.Element, .PackageElement, .TypeElement, jdk.javadoc.internal.doclets.toolkit.BaseConfiguration

This class acts as an artificial container for classes specified on the command line when running Javadoc. For example, if you specify several classes from package java.lang, this class will catalog those classes so that we can retrieve all of the classes from a particular package later.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Field Summary

Modifier and TypeField and Description
private final Map<PackageElement, SortedSet<TypeElement>>
allClasses

Stores all classes for each package

private final Comparator<Element>
private final BaseConfiguration
private final SortedSet<PackageElement>
packageSet

Stores the set of packages that the classes specified on the command line belong to.

private final Utils

Constructor Summary

AccessConstructor and Description
public
TypeElementCatalog(Iterable<TypeElement>
the array of TypeElements to catalog
typeElements
,
BaseConfiguration config)

Construct a new TypeElementCatalog.

public
TypeElementCatalog(BaseConfiguration config)

Construct a new TypeElementCatalog.

Method Summary

Modifier and TypeMethod and Description
public final void
addTypeElement(TypeElement
the TypeElement to add to the catalog.
typeElement
)

Add the given class to the catalog.

private void
addTypeElement(TypeElement
the class to add to the catalog.
typeElement
,
Map<PackageElement, SortedSet<TypeElement>>
the Map to add the TypeElement to.
map
)

Add the given class to the given map.

public SortedSet<TypeElement>
allClasses(PackageElement
the package to return the classes for.
packageElement
)

Return all of the classes specified on the command-line that belong to the given package.

public SortedSet<TypeElement>
allUnnamedClasses()

Return all of the classes specified on the command-line that belong to the unnamed package.

public SortedSet<PackageElement>
packages()

Return a SortedSet of packages that this catalog stores.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allClassesback to summary
private final Map<PackageElement, SortedSet<TypeElement>> allClasses

Stores all classes for each package

comparatorback to summary
private final Comparator<Element> comparator
configurationback to summary
private final BaseConfiguration configuration
packageSetback to summary
private final SortedSet<PackageElement> packageSet

Stores the set of packages that the classes specified on the command line belong to. Note that the default package is "".

utilsback to summary
private final Utils utils

Constructor Detail

TypeElementCatalogback to summary
public TypeElementCatalog(Iterable<TypeElement> typeElements, BaseConfiguration config)

Construct a new TypeElementCatalog.

Parameters
typeElements:Iterable<TypeElement>

the array of TypeElements to catalog

TypeElementCatalogback to summary
public TypeElementCatalog(BaseConfiguration config)

Construct a new TypeElementCatalog.

Method Detail

addTypeElementback to summary
public final void addTypeElement(TypeElement typeElement)

Add the given class to the catalog.

Parameters
typeElement:TypeElement

the TypeElement to add to the catalog.

addTypeElementback to summary
private void addTypeElement(TypeElement typeElement, Map<PackageElement, SortedSet<TypeElement>> map)

Add the given class to the given map.

Parameters
typeElement:TypeElement

the class to add to the catalog.

map:Map<PackageElement, SortedSet<TypeElement>>

the Map to add the TypeElement to.

allClassesback to summary
public SortedSet<TypeElement> allClasses(PackageElement packageElement)

Return all of the classes specified on the command-line that belong to the given package.

Parameters
packageElement:PackageElement

the package to return the classes for.

allUnnamedClassesback to summary
public SortedSet<TypeElement> allUnnamedClasses()

Return all of the classes specified on the command-line that belong to the unnamed package.

packagesback to summary
public SortedSet<PackageElement> packages()

Return a SortedSet of packages that this catalog stores.