Index instances.
An example application is a Java EE deployment, which can contain multiple nested jars, each with
their own index.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Collection |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static CompositeIndex | |
| public static CompositeIndex | |
| public static CompositeIndex | |
| public Set | getAllKnownImplementors(final DotName
The interface interfaceName)Implements org. |
| public Set | getAllKnownSubclasses(final DotName
The class className)Implements org. |
| private void | |
| private void | |
| public Collection | getAllKnownSubinterfaces(DotName
The interace interfaceName)Implements org. |
| public List | getAnnotations(final DotName
the name of the annotation to look for annotationName)Implements org. |
| public Collection | getAnnotationsWithRepeatable(DotName
the name of the repeatable annotation annotationName, IndexView the index containing the annotation class index)Implements org. |
| public ClassInfo | getClassByName(final DotName
the name of the class className)Implements org. |
| public Collection | getClassesInPackage(DotName
package name in the common, dot-separated form (e.g. packageName)com.example.foobar);
null means the unnamed packageImplements org. |
| public Collection | getKnownClasses()
Implements org. |
| public Collection | getKnownDirectImplementors(final DotName
the super class of the desired subclasses className)Implements org. |
| public Set | getKnownDirectSubclasses(final DotName
the super class of the desired subclasses className)Implements org. |
| public Collection | getKnownDirectSubinterfaces(DotName
the super interface of the desired subinterfaces interfaceName)Implements org. |
| private void | |
| public Collection | getKnownModules()
Implements org. |
| public Collection | getKnownUsers(DotName
the name of the class to look for className)Implements org. |
| public ModuleInfo | getModuleByName(final DotName
the name of the module moduleName)Implements org. |
| public Set | getSubpackages(DotName
package name in the common, dot-separated form (e.g. packageName)com.example.foobar);
null means the unnamed packageImplements org. |
| indexes | back to summary |
|---|---|
| pack-priv final Collection<IndexView> indexes | |
| CompositeIndex | back to summary |
|---|---|
| private CompositeIndex(final Collection<IndexView> indexes) | |
| create | back to summary |
|---|---|
| public static CompositeIndex create(Collection<IndexView> indexes) | |
| create | back to summary |
|---|---|
| public static CompositeIndex create(final IndexView... indexes) | |
| createMerged | back to summary |
|---|---|
| public static CompositeIndex createMerged(final CompositeIndex... indexes) | |
| getAllKnownImplementors | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns all known classes that implement the given interface, directly and indirectly. This will return all classes that implement the interface and its subinterfaces, as well as subclasses of classes that implement the interface and its subinterfaces. (In short, it will return every class in the index that is assignable to the interface.)
Note that this method only returns classes. Unlike | |
| getAllKnownSubclasses | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns all known (including non-direct) subclasses of the given class. I.e., returns all known classes that are assignable to the given class. | |
| getAllKnownSubClasses | back to summary |
|---|---|
| private void getAllKnownSubClasses(DotName className, Set<ClassInfo> allKnown, Set<DotName> processedClasses) | |
| getAllKnownSubClasses | back to summary |
|---|---|
| private void getAllKnownSubClasses(DotName name, Set<ClassInfo> allKnown, Set<DotName> subClassesToProcess, Set<DotName> processedClasses) | |
| getAllKnownSubinterfaces | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Returns all known interfaces that extend the given interface, directly and indirectly. I.e., returns every interface in the index that is assignable to the given interface.
| |
| getAnnotations | back to summary |
|---|---|
| public List Implements org. Doc from org. Obtains a list of instances for the specified annotation. This is done using an O(1) lookup. Valid instance targets include field, method, parameter, and class.
| |
| getAnnotationsWithRepeatable | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Obtains a list of instances for the specified annotation. If the specified annotation is repeatable (JLS 9.6), the result
also contains all values from all instances of the container annotation. In this case, the
| |
| getClassByName | back to summary |
|---|---|
| public ClassInfo getClassByName(final DotName className) Implements org. Doc from org. Gets the class (or interface, or annotation) that was scanned during the indexing phase. | |
| getClassesInPackage | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Returns all classes known to this index that are present in given package.
Classes present in subpackages of given package are not returned. Classes present in the unnamed
package may be looked up using
In the default
| |
| getKnownClasses | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Gets all known classes by this index (those which were scanned).
| |
| getKnownDirectImplementors | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Gets all known direct implementors of the specified interface. A known direct implementor is one which was found during the scanning process; however, this is often not the complete universe of implementors, since typically indexes are constructed per jar. It is expected that several indexes will need to be searched when analyzing a jar that is a part of a complex multi-module/classloader environment (like an EE application server).
The list of implementors also includes direct subinterfaces. This is inconsistent
with Note that this will only pick up classes that directly implement given interface. It will not pick up classes implementing subinterfaces.
| |
| getKnownDirectSubclasses | back to summary |
|---|---|
| public Set Implements org. Doc from org. Gets all known direct subclasses of the specified class. A known direct subclass is one which was found during the scanning process; however, this is often not the complete universe of subclasses, since typically indexes are constructed per jar. It is expected that several indexes will need to be searched when analyzing a jar that is a part of a complex multi-module/classloader environment (like an EE application server). Note that this will only pick up direct subclasses of the class. It will not pick up subclasses of subclasses. | |
| getKnownDirectSubinterfaces | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Gets all known direct subinterfaces of the specified interface. A known direct subinterface is one which was found during the scanning process; however, this is often not the complete universe of subinterfaces, since typically indexes are constructed per jar. It is expected that several indexes will need to be searched when analyzing a jar that is a part of a complex multi-module/classloader environment (like an EE application server). Note that this will only pick up direct subinterfaces of the interface. It will not pick up subinterfaces of subinterfaces.
| |
| getKnownImplementors | back to summary |
|---|---|
| private void getKnownImplementors(DotName name, Set<ClassInfo> allKnown, Set<DotName> subInterfacesToProcess, Set<DotName> processedClasses) | |
| getKnownModules | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Gets all known modules by this index (those which were scanned).
| |
| getKnownUsers | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Obtains a list of classes that use the specified class. In other words, a list of classes that include a reference to the specified class in their constant pool.
| |
| getModuleByName | back to summary |
|---|---|
| public ModuleInfo getModuleByName(final DotName moduleName) Implements org. Doc from org. Gets the module that was scanned during the indexing phase.
| |
| getSubpackages | back to summary |
|---|---|
| public Set Implements org. Doc from org. Returns a set of packages known to this index that are direct subpackages of given package. Indirect subpackages of given package (subpackages of subpackages) are not returned. If this index does not contain any class in a direct or indirect subpackage of given package, returns an empty collection.
Given that the unnamed package may not contain subpackages, passing
In the default | |