public interface IndexView
| Modifier and Type | Method and Description |
|---|---|
default Collection<ClassInfo> |
getAllKnownImplementors(Class<?> interfaceClass)
Returns all known classes that implement the given interface, directly and indirectly.
|
Collection<ClassInfo> |
getAllKnownImplementors(DotName interfaceName)
Returns all known classes that implement the given interface, directly and indirectly.
|
default Collection<ClassInfo> |
getAllKnownImplementors(String interfaceName)
Returns all known classes that implement the given interface, directly and indirectly.
|
default Collection<ClassInfo> |
getAllKnownSubclasses(Class<?> clazz)
Returns all known (including non-direct) subclasses of the given class.
|
Collection<ClassInfo> |
getAllKnownSubclasses(DotName className)
Returns all known (including non-direct) subclasses of the given class.
|
default Collection<ClassInfo> |
getAllKnownSubclasses(String className)
Returns all known (including non-direct) subclasses of the given class.
|
default Collection<ClassInfo> |
getAllKnownSubinterfaces(Class<?> iface)
Returns all known interfaces that extend the given interface, directly and indirectly.
|
Collection<ClassInfo> |
getAllKnownSubinterfaces(DotName interfaceName)
Returns all known interfaces that extend the given interface, directly and indirectly.
|
default Collection<ClassInfo> |
getAllKnownSubinterfaces(String interfaceName)
Returns all known interfaces that extend the given interface, directly and indirectly.
|
default Collection<AnnotationInstance> |
getAnnotations(Class<?> annotationType)
Obtains a list of instances for the specified annotation.
|
Collection<AnnotationInstance> |
getAnnotations(DotName annotationName)
Obtains a list of instances for the specified annotation.
|
default Collection<AnnotationInstance> |
getAnnotations(String annotationName)
Obtains a list of instances for the specified annotation.
|
default Collection<AnnotationInstance> |
getAnnotationsWithRepeatable(Class<?> annotationType,
IndexView index)
Obtains a list of instances for the specified annotation.
|
Collection<AnnotationInstance> |
getAnnotationsWithRepeatable(DotName annotationName,
IndexView index)
Obtains a list of instances for the specified annotation.
|
default Collection<AnnotationInstance> |
getAnnotationsWithRepeatable(String annotationName,
IndexView index)
Obtains a list of instances for the specified annotation.
|
default ClassInfo |
getClassByName(Class<?> clazz)
Gets the class (or interface, or annotation) that was scanned during the
indexing phase.
|
ClassInfo |
getClassByName(DotName className)
Gets the class (or interface, or annotation) that was scanned during the
indexing phase.
|
default ClassInfo |
getClassByName(String className)
Gets the class (or interface, or annotation) that was scanned during the
indexing phase.
|
Collection<ClassInfo> |
getClassesInPackage(DotName packageName)
Returns all classes known to this index that are present in given package.
|
default Collection<ClassInfo> |
getClassesInPackage(String packageName)
Returns all classes known to this index that are present in given package.
|
Collection<ClassInfo> |
getKnownClasses()
Gets all known classes by this index (those which were scanned).
|
default Collection<ClassInfo> |
getKnownDirectImplementors(Class<?> clazz)
Gets all known direct implementors of the specified interface name.
|
Collection<ClassInfo> |
getKnownDirectImplementors(DotName className)
Gets all known direct implementors of the specified interface.
|
default Collection<ClassInfo> |
getKnownDirectImplementors(String className)
Gets all known direct implementors of the specified interface name.
|
default Collection<ClassInfo> |
getKnownDirectSubclasses(Class<?> clazz)
Gets all known direct subclasses of the specified class.
|
Collection<ClassInfo> |
getKnownDirectSubclasses(DotName className)
Gets all known direct subclasses of the specified class.
|
default Collection<ClassInfo> |
getKnownDirectSubclasses(String className)
Gets all known direct subclasses of the specified class.
|
default Collection<ClassInfo> |
getKnownDirectSubinterfaces(Class<?> iface)
Gets all known direct subinterfaces of the specified interface.
|
Collection<ClassInfo> |
getKnownDirectSubinterfaces(DotName interfaceName)
Gets all known direct subinterfaces of the specified interface.
|
default Collection<ClassInfo> |
getKnownDirectSubinterfaces(String interfaceName)
Gets all known direct subinterfaces of the specified interface.
|
Collection<ModuleInfo> |
getKnownModules()
Gets all known modules by this index (those which were scanned).
|
default Collection<ClassInfo> |
getKnownUsers(Class<?> clazz)
Obtains a list of classes that use the specified class.
|
Collection<ClassInfo> |
getKnownUsers(DotName className)
Obtains a list of classes that use the specified class.
|
default Collection<ClassInfo> |
getKnownUsers(String className)
Obtains a list of classes that use the specified class.
|
ModuleInfo |
getModuleByName(DotName moduleName)
Gets the module that was scanned during the indexing phase.
|
default ModuleInfo |
getModuleByName(String moduleName)
Gets the module that was scanned during the indexing phase.
|
Set<DotName> |
getSubpackages(DotName packageName)
Returns a set of packages known to this index that are direct subpackages of given package.
|
default Set<DotName> |
getSubpackages(String packageName)
Returns a set of packages known to this index that are direct subpackages of given package.
|
Collection<ClassInfo> getKnownClasses()
ClassInfo getClassByName(DotName className)
className - the name of the classdefault ClassInfo getClassByName(String className)
className - the name of the classdefault ClassInfo getClassByName(Class<?> clazz)
clazz - the classCollection<ClassInfo> getKnownDirectSubclasses(DotName className)
Note that this will only pick up direct subclasses of the class. It will not pick up subclasses of subclasses.
className - the super class of the desired subclassesdefault Collection<ClassInfo> getKnownDirectSubclasses(String className)
Note that this will only pick up direct subclasses of the class. It will not pick up subclasses of subclasses.
className - the super class of the desired subclassesdefault Collection<ClassInfo> getKnownDirectSubclasses(Class<?> clazz)
Note that this will only pick up direct subclasses of the class. It will not pick up subclasses of subclasses.
clazz - the super class of the desired subclassesCollection<ClassInfo> getAllKnownSubclasses(DotName className)
className - The classdefault Collection<ClassInfo> getAllKnownSubclasses(String className)
className - The classdefault Collection<ClassInfo> getAllKnownSubclasses(Class<?> clazz)
clazz - The classCollection<ClassInfo> getKnownDirectSubinterfaces(DotName interfaceName)
Note that this will only pick up direct subinterfaces of the interface. It will not pick up subinterfaces of subinterfaces.
interfaceName - the super interface of the desired subinterfacesdefault Collection<ClassInfo> getKnownDirectSubinterfaces(String interfaceName)
Note that this will only pick up direct subinterfaces of the interface. It will not pick up subinterfaces of subinterfaces.
interfaceName - the super interface of the desired subinterfacesdefault Collection<ClassInfo> getKnownDirectSubinterfaces(Class<?> iface)
Note that this will only pick up direct subinterfaces of the interface. It will not pick up subinterfaces of subinterfaces.
iface - the super interface of the desired subinterfacesCollection<ClassInfo> getAllKnownSubinterfaces(DotName interfaceName)
interfaceName - The interacedefault Collection<ClassInfo> getAllKnownSubinterfaces(String interfaceName)
interfaceName - The interacedefault Collection<ClassInfo> getAllKnownSubinterfaces(Class<?> iface)
iface - The interaceCollection<ClassInfo> getKnownDirectImplementors(DotName className)
The list of implementors also includes direct subinterfaces. This is inconsistent
with getAllKnownImplementors(DotName), which doesn't return subinterfaces.
Note that this will only pick up classes that directly implement given interface. It will not pick up classes implementing subinterfaces.
className - the super class of the desired subclassesdefault Collection<ClassInfo> getKnownDirectImplementors(String className)
The list of implementors also includes direct subinterfaces. This is inconsistent
with getAllKnownImplementors(String), which doesn't return subinterfaces.
Note that this will only pick up classes that directly implement given interface. It will not pick up classes implementing subinterfaces.
className - the super class of the desired subclassesdefault Collection<ClassInfo> getKnownDirectImplementors(Class<?> clazz)
The list of implementors also includes direct subinterfaces. This is inconsistent
with getAllKnownImplementors(Class), which doesn't return subinterfaces.
Note that this will only pick up classes that directly implement given interface. It will not pick up classes implementing subinterfaces.
clazz - the super class of the desired subclassesCollection<ClassInfo> getAllKnownImplementors(DotName interfaceName)
Note that this method only returns classes. Unlike getKnownDirectImplementors(DotName),
this method does not return subinterfaces of given interface.
interfaceName - The interfacedefault Collection<ClassInfo> getAllKnownImplementors(String interfaceName)
Note that this method only returns classes. Unlike getKnownDirectImplementors(String),
this method does not return subinterfaces of given interface.
interfaceName - The interfacedefault Collection<ClassInfo> getAllKnownImplementors(Class<?> interfaceClass)
Note that this method only returns classes. Unlike getKnownDirectImplementors(Class),
this method does not return subinterfaces of given interface.
interfaceClass - The interfaceCollection<AnnotationInstance> getAnnotations(DotName annotationName)
annotationName - the name of the annotation to look fordefault Collection<AnnotationInstance> getAnnotations(String annotationName)
annotationName - the name of the annotation to look fordefault Collection<AnnotationInstance> getAnnotations(Class<?> annotationType)
annotationType - the type of the annotation to look forCollection<AnnotationInstance> getAnnotationsWithRepeatable(DotName annotationName, IndexView index)
AnnotationInstance.target() returns the target of the container annotation instance.annotationName - the name of the repeatable annotationindex - the index containing the annotation classIllegalArgumentException - If the index does not contain the annotation definition or if it does not represent
an annotation typedefault Collection<AnnotationInstance> getAnnotationsWithRepeatable(String annotationName, IndexView index)
AnnotationInstance.target() returns the target of the container annotation instance.annotationName - the name of the repeatable annotationindex - the index containing the annotation classIllegalArgumentException - If the index does not contain the annotation definition or if it does not represent
an annotation typedefault Collection<AnnotationInstance> getAnnotationsWithRepeatable(Class<?> annotationType, IndexView index)
AnnotationInstance.target() returns the target of the container annotation instance.annotationType - the name of the repeatable annotationindex - the index containing the annotation classIllegalArgumentException - If the index does not contain the annotation definition or if it does not represent
an annotation typeCollection<ModuleInfo> getKnownModules()
ModuleInfo getModuleByName(DotName moduleName)
moduleName - the name of the moduledefault ModuleInfo getModuleByName(String moduleName)
moduleName - the name of the moduleCollection<ClassInfo> getKnownUsers(DotName className)
className - the name of the class to look fordefault Collection<ClassInfo> getKnownUsers(String className)
className - the name of the class to look fordefault Collection<ClassInfo> getKnownUsers(Class<?> clazz)
clazz - the class to look forCollection<ClassInfo> getClassesInPackage(DotName packageName)
null as the package name. If this index does not contain
any class in given package, returns an empty collection.
In the default Index implementation, this information is not stored in the index initially.
Instead, an index of classes by package name is constructed on demand (on the first invocation
of this method).
packageName - package name in the common, dot-separated form (e.g. com.example.foobar);
null means the unnamed packagenulldefault Collection<ClassInfo> getClassesInPackage(String packageName)
null as the package name. If this index does not contain
any class in given package, returns an empty collection.
In the default Index implementation, this information is not stored in the index initially.
Instead, an index of classes by package name is constructed on demand (on the first invocation
of this method).
packageName - package name in the common, dot-separated form (e.g. com.example.foobar);
null means the unnamed packagenullSet<DotName> getSubpackages(DotName packageName)
Given that the unnamed package may not contain subpackages, passing null as the package
name is permitted, but always results in an empty set.
In the default Index implementation, this information is not stored in the index initially.
Instead, an index of packages is constructed on demand (on the first invocation of this method).
packageName - package name in the common, dot-separated form (e.g. com.example.foobar);
null means the unnamed packagenulldefault Set<DotName> getSubpackages(String packageName)
Given that the unnamed package may not contain subpackages, passing null as the package
name is permitted, but always results in an empty set.
In the default Index implementation, this information is not stored in the index initially.
Instead, an index of packages is constructed on demand (on the first invocation of this method).
packageName - package name in the common, dot-separated form (e.g. com.example.foobar);
null means the unnamed packagenullCopyright © 2018–2022. All rights reserved.