Top Description Methods
org.jboss.jandex

public Interface IndexView

Known Direct Implementers
org.jboss.jandex.CompositeIndex, org.jboss.jandex.Index
Imports
java.util.Collection, .Set

The basic contract for accessing Jandex indexed information.
Authors
Jason T. Greene, Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public Collection<ClassInfo>

Returns:

All known implementors of the interface
getAllKnownImplementors
(final DotName
The interface
interfaceName
)

Returns all known classes that implement the given interface, directly and indirectly.

public default Collection<ClassInfo>

Returns:

All known implementors of the interface
getAllKnownImplementors
(final String
The interface
interfaceName
)

Returns all known classes that implement the given interface, directly and indirectly.

public default Collection<ClassInfo>

Returns:

All known implementors of the interface
getAllKnownImplementors
(final Class<?>
The interface
interfaceClass
)

Returns all known classes that implement the given interface, directly and indirectly.

public Collection<ClassInfo>

Returns:

All known subclasses
getAllKnownSubclasses
(final DotName
The class
className
)

Returns all known (including non-direct) subclasses of the given class.

public default Collection<ClassInfo>

Returns:

All known subclasses
getAllKnownSubclasses
(final String
The class
className
)

Returns all known (including non-direct) subclasses of the given class.

public default Collection<ClassInfo>

Returns:

All known subclasses
getAllKnownSubclasses
(final Class<?>
The class
clazz
)

Returns all known (including non-direct) subclasses of the given class.

public Collection<ClassInfo>

Returns:

all known subinterfaces
getAllKnownSubinterfaces
(DotName
The interace
interfaceName
)

Returns all known interfaces that extend the given interface, directly and indirectly.

public default Collection<ClassInfo>

Returns:

all known subinterfaces
getAllKnownSubinterfaces
(String
The interace
interfaceName
)

Returns all known interfaces that extend the given interface, directly and indirectly.

public default Collection<ClassInfo>

Returns:

all known subinterfaces
getAllKnownSubinterfaces
(Class<?>
The interace
iface
)

Returns all known interfaces that extend the given interface, directly and indirectly.

public Collection<AnnotationInstance>

Returns:

a non-null list of annotation instances
getAnnotations
(DotName
the name of the annotation to look for
annotationName
)

Obtains a list of instances for the specified annotation.

public default Collection<AnnotationInstance>

Returns:

a non-null list of annotation instances
getAnnotations
(String
the name of the annotation to look for
annotationName
)

Obtains a list of instances for the specified annotation.

public default Collection<AnnotationInstance>

Returns:

a non-null list of annotation instances
getAnnotations
(Class<?>
the type of the annotation to look for
annotationType
)

Obtains a list of instances for the specified annotation.

public Collection<AnnotationInstance>

Returns:

a non-null list of annotation instances
getAnnotationsWithRepeatable
(DotName
the name of the repeatable annotation
annotationName
,
IndexView
the index containing the annotation class
index
)

Obtains a list of instances for the specified annotation.

public default Collection<AnnotationInstance>

Returns:

a non-null list of annotation instances
getAnnotationsWithRepeatable
(String
the name of the repeatable annotation
annotationName
,
IndexView
the index containing the annotation class
index
)

Obtains a list of instances for the specified annotation.

public default Collection<AnnotationInstance>

Returns:

a non-null list of annotation instances
getAnnotationsWithRepeatable
(Class<?>
the name of the repeatable annotation
annotationType
,
IndexView
the index containing the annotation class
index
)

Obtains a list of instances for the specified annotation.

public ClassInfo

Returns:

information about the class or null if it is not known
getClassByName
(DotName
the name of the class
className
)

Gets the class (or interface, or annotation) that was scanned during the indexing phase.

public default ClassInfo

Returns:

information about the class or null if it is not known
getClassByName
(String
the name of the class
className
)

Gets the class (or interface, or annotation) that was scanned during the indexing phase.

public default ClassInfo

Returns:

information about the class or null if it is not known
getClassByName
(Class<?>
the class
clazz
)

Gets the class (or interface, or annotation) that was scanned during the indexing phase.

public Collection<ClassInfo>

Returns:

immutable collection of classes present in given package, never null
getClassesInPackage
(DotName
package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package
packageName
)

Returns all classes known to this index that are present in given package.

public default Collection<ClassInfo>

Returns:

immutable collection of classes present in given package, never null
getClassesInPackage
(String
package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package
packageName
)

Returns all classes known to this index that are present in given package.

public Collection<ClassInfo>

Returns:

a collection of known classes
getKnownClasses
()

Gets all known classes by this index (those which were scanned).

public Collection<ClassInfo>

Returns:

a non-null list of all known subclasses of className
getKnownDirectImplementors
(DotName
the super class of the desired subclasses
className
)

Gets all known direct implementors of the specified interface.

public default Collection<ClassInfo>

Returns:

a non-null list of all known subclasses of className
getKnownDirectImplementors
(String
the super class of the desired subclasses
className
)

Gets all known direct implementors of the specified interface name.

public default Collection<ClassInfo>

Returns:

a non-null list of all known subclasses of className
getKnownDirectImplementors
(Class<?>
the super class of the desired subclasses
clazz
)

Gets all known direct implementors of the specified interface name.

public Collection<ClassInfo>

Returns:

a non-null list of all known subclasses of className
getKnownDirectSubclasses
(DotName
the super class of the desired subclasses
className
)

Gets all known direct subclasses of the specified class.

public default Collection<ClassInfo>

Returns:

a non-null list of all known subclasses of className
getKnownDirectSubclasses
(String
the super class of the desired subclasses
className
)

Gets all known direct subclasses of the specified class.

public default Collection<ClassInfo>

Returns:

a non-null list of all known subclasses of className
getKnownDirectSubclasses
(Class<?>
the super class of the desired subclasses
clazz
)

Gets all known direct subclasses of the specified class.

public Collection<ClassInfo>

Returns:

a non-null list of all known subinterfaces of interfaceName
getKnownDirectSubinterfaces
(DotName
the super interface of the desired subinterfaces
interfaceName
)

Gets all known direct subinterfaces of the specified interface.

public default Collection<ClassInfo>

Returns:

a non-null list of all known subinterfaces of interfaceName
getKnownDirectSubinterfaces
(String
the super interface of the desired subinterfaces
interfaceName
)

Gets all known direct subinterfaces of the specified interface.

public default Collection<ClassInfo>

Returns:

a non-null list of all known subinterfaces of iface
getKnownDirectSubinterfaces
(Class<?>
the super interface of the desired subinterfaces
iface
)

Gets all known direct subinterfaces of the specified interface.

public Collection<ModuleInfo>

Returns:

a collection of known modules
getKnownModules
()

Gets all known modules by this index (those which were scanned).

public Collection<ClassInfo>

Returns:

a non-null list of classes that use the specified class
getKnownUsers
(DotName
the name of the class to look for
className
)

Obtains a list of classes that use the specified class.

public default Collection<ClassInfo>

Returns:

a non-null list of classes that use the specified class
getKnownUsers
(String
the name of the class to look for
className
)

Obtains a list of classes that use the specified class.

public default Collection<ClassInfo>

Returns:

a non-null list of classes that use the specified class
getKnownUsers
(Class<?>
the class to look for
clazz
)

Obtains a list of classes that use the specified class.

public ModuleInfo

Returns:

information about the module or null if it is not known
getModuleByName
(DotName
the name of the module
moduleName
)

Gets the module that was scanned during the indexing phase.

public default ModuleInfo

Returns:

information about the module or null if it is not known
getModuleByName
(String
the name of the module
moduleName
)

Gets the module that was scanned during the indexing phase.

public Set<DotName>

Returns:

immutable set of subpackages of given package, never null
getSubpackages
(DotName
package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package
packageName
)

Returns a set of packages known to this index that are direct subpackages of given package.

public default Set<DotName>

Returns:

immutable set of subpackages of given package, never null
getSubpackages
(String
package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package
packageName
)

Returns a set of packages known to this index that are direct subpackages of given package.

Method Detail

getAllKnownImplementorsback to summary
public Collection<ClassInfo> getAllKnownImplementors(final DotName interfaceName)

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 getKnownDirectImplementors(DotName), this method does not return subinterfaces of given interface.

Parameters
interfaceName:DotName

The interface

Returns:Collection<ClassInfo>

All known implementors of the interface

getAllKnownImplementorsback to summary
public default Collection<ClassInfo> getAllKnownImplementors(final String interfaceName)

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 getKnownDirectImplementors(String), this method does not return subinterfaces of given interface.

Parameters
interfaceName:String

The interface

Returns:Collection<ClassInfo>

All known implementors of the interface

getAllKnownImplementorsback to summary
public default Collection<ClassInfo> getAllKnownImplementors(final Class<?> interfaceClass)

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 getKnownDirectImplementors(Class), this method does not return subinterfaces of given interface.

Parameters
interfaceClass:Class<?>

The interface

Returns:Collection<ClassInfo>

All known implementors of the interface

getAllKnownSubclassesback to summary
public Collection<ClassInfo> getAllKnownSubclasses(final DotName className)

Returns all known (including non-direct) subclasses of the given class. I.e., returns all known classes that are assignable to the given class.

Parameters
className:DotName

The class

Returns:Collection<ClassInfo>

All known subclasses

getAllKnownSubclassesback to summary
public default Collection<ClassInfo> getAllKnownSubclasses(final String className)

Returns all known (including non-direct) subclasses of the given class. I.e., returns all known classes that are assignable to the given class.

Parameters
className:String

The class

Returns:Collection<ClassInfo>

All known subclasses

getAllKnownSubclassesback to summary
public default Collection<ClassInfo> getAllKnownSubclasses(final Class<?> clazz)

Returns all known (including non-direct) subclasses of the given class. I.e., returns all known classes that are assignable to the given class.

Parameters
clazz:Class<?>

The class

Returns:Collection<ClassInfo>

All known subclasses

getAllKnownSubinterfacesback to summary
public Collection<ClassInfo> getAllKnownSubinterfaces(DotName interfaceName)

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.

Parameters
interfaceName:DotName

The interace

Returns:Collection<ClassInfo>

all known subinterfaces

Since
3.0
getAllKnownSubinterfacesback to summary
public default Collection<ClassInfo> getAllKnownSubinterfaces(String interfaceName)

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.

Parameters
interfaceName:String

The interace

Returns:Collection<ClassInfo>

all known subinterfaces

Since
3.0
getAllKnownSubinterfacesback to summary
public default Collection<ClassInfo> getAllKnownSubinterfaces(Class<?> iface)

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.

Parameters
iface:Class<?>

The interace

Returns:Collection<ClassInfo>

all known subinterfaces

Since
3.0
getAnnotationsback to summary
public Collection<AnnotationInstance> getAnnotations(DotName annotationName)

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.

Parameters
annotationName:DotName

the name of the annotation to look for

Returns:Collection<AnnotationInstance>

a non-null list of annotation instances

getAnnotationsback to summary
public default Collection<AnnotationInstance> getAnnotations(String annotationName)

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.

Parameters
annotationName:String

the name of the annotation to look for

Returns:Collection<AnnotationInstance>

a non-null list of annotation instances

getAnnotationsback to summary
public default Collection<AnnotationInstance> getAnnotations(Class<?> annotationType)

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.

Parameters
annotationType:Class<?>

the type of the annotation to look for

Returns:Collection<AnnotationInstance>

a non-null list of annotation instances

getAnnotationsWithRepeatableback to summary
public Collection<AnnotationInstance> getAnnotationsWithRepeatable(DotName annotationName, IndexView index)

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 AnnotationInstance#target() returns the target of the container annotation instance.

Parameters
annotationName:DotName

the name of the repeatable annotation

index:IndexView

the index containing the annotation class

Returns:Collection<AnnotationInstance>

a non-null list of annotation instances

Exceptions
IllegalArgumentException:
If the index does not contain the annotation definition or if it does not represent an annotation type
getAnnotationsWithRepeatableback to summary
public default Collection<AnnotationInstance> getAnnotationsWithRepeatable(String annotationName, IndexView index)

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 AnnotationInstance#target() returns the target of the container annotation instance.

Parameters
annotationName:String

the name of the repeatable annotation

index:IndexView

the index containing the annotation class

Returns:Collection<AnnotationInstance>

a non-null list of annotation instances

Exceptions
IllegalArgumentException:
If the index does not contain the annotation definition or if it does not represent an annotation type
getAnnotationsWithRepeatableback to summary
public default Collection<AnnotationInstance> getAnnotationsWithRepeatable(Class<?> annotationType, IndexView index)

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 AnnotationInstance#target() returns the target of the container annotation instance.

Parameters
annotationType:Class<?>

the name of the repeatable annotation

index:IndexView

the index containing the annotation class

Returns:Collection<AnnotationInstance>

a non-null list of annotation instances

Exceptions
IllegalArgumentException:
If the index does not contain the annotation definition or if it does not represent an annotation type
getClassByNameback to summary
public ClassInfo getClassByName(DotName className)

Gets the class (or interface, or annotation) that was scanned during the indexing phase.

Parameters
className:DotName

the name of the class

Returns:ClassInfo

information about the class or null if it is not known

getClassByNameback to summary
public default ClassInfo getClassByName(String className)

Gets the class (or interface, or annotation) that was scanned during the indexing phase.

Parameters
className:String

the name of the class

Returns:ClassInfo

information about the class or null if it is not known

getClassByNameback to summary
public default ClassInfo getClassByName(Class<?> clazz)

Gets the class (or interface, or annotation) that was scanned during the indexing phase.

Parameters
clazz:Class<?>

the class

Returns:ClassInfo

information about the class or null if it is not known

getClassesInPackageback to summary
public Collection<ClassInfo> getClassesInPackage(DotName packageName)

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 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).

Parameters
packageName:DotName

package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package

Returns:Collection<ClassInfo>

immutable collection of classes present in given package, never null

Since
3.0
getClassesInPackageback to summary
public default Collection<ClassInfo> getClassesInPackage(String packageName)

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 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).

Parameters
packageName:String

package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package

Returns:Collection<ClassInfo>

immutable collection of classes present in given package, never null

Since
3.0
getKnownClassesback to summary
public Collection<ClassInfo> getKnownClasses()

Gets all known classes by this index (those which were scanned).

Returns:Collection<ClassInfo>

a collection of known classes

getKnownDirectImplementorsback to summary
public Collection<ClassInfo> getKnownDirectImplementors(DotName className)

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 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.

Parameters
className:DotName

the super class of the desired subclasses

Returns:Collection<ClassInfo>

a non-null list of all known subclasses of className

getKnownDirectImplementorsback to summary
public default Collection<ClassInfo> getKnownDirectImplementors(String className)

Gets all known direct implementors of the specified interface name. 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 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.

Parameters
className:String

the super class of the desired subclasses

Returns:Collection<ClassInfo>

a non-null list of all known subclasses of className

getKnownDirectImplementorsback to summary
public default Collection<ClassInfo> getKnownDirectImplementors(Class<?> clazz)

Gets all known direct implementors of the specified interface name. 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 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.

Parameters
clazz:Class<?>

the super class of the desired subclasses

Returns:Collection<ClassInfo>

a non-null list of all known subclasses of className

getKnownDirectSubclassesback to summary
public Collection<ClassInfo> getKnownDirectSubclasses(DotName className)

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.

Parameters
className:DotName

the super class of the desired subclasses

Returns:Collection<ClassInfo>

a non-null list of all known subclasses of className

getKnownDirectSubclassesback to summary
public default Collection<ClassInfo> getKnownDirectSubclasses(String className)

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.

Parameters
className:String

the super class of the desired subclasses

Returns:Collection<ClassInfo>

a non-null list of all known subclasses of className

getKnownDirectSubclassesback to summary
public default Collection<ClassInfo> getKnownDirectSubclasses(Class<?> clazz)

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.

Parameters
clazz:Class<?>

the super class of the desired subclasses

Returns:Collection<ClassInfo>

a non-null list of all known subclasses of className

getKnownDirectSubinterfacesback to summary
public Collection<ClassInfo> getKnownDirectSubinterfaces(DotName interfaceName)

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.

Parameters
interfaceName:DotName

the super interface of the desired subinterfaces

Returns:Collection<ClassInfo>

a non-null list of all known subinterfaces of interfaceName

Since
3.0
getKnownDirectSubinterfacesback to summary
public default Collection<ClassInfo> getKnownDirectSubinterfaces(String interfaceName)

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.

Parameters
interfaceName:String

the super interface of the desired subinterfaces

Returns:Collection<ClassInfo>

a non-null list of all known subinterfaces of interfaceName

Since
3.0
getKnownDirectSubinterfacesback to summary
public default Collection<ClassInfo> getKnownDirectSubinterfaces(Class<?> iface)

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.

Parameters
iface:Class<?>

the super interface of the desired subinterfaces

Returns:Collection<ClassInfo>

a non-null list of all known subinterfaces of iface

Since
3.0
getKnownModulesback to summary
public Collection<ModuleInfo> getKnownModules()

Gets all known modules by this index (those which were scanned).

Returns:Collection<ModuleInfo>

a collection of known modules

getKnownUsersback to summary
public Collection<ClassInfo> getKnownUsers(DotName className)

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.

Parameters
className:DotName

the name of the class to look for

Returns:Collection<ClassInfo>

a non-null list of classes that use the specified class

getKnownUsersback to summary
public default Collection<ClassInfo> getKnownUsers(String className)

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.

Parameters
className:String

the name of the class to look for

Returns:Collection<ClassInfo>

a non-null list of classes that use the specified class

getKnownUsersback to summary
public default Collection<ClassInfo> getKnownUsers(Class<?> clazz)

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.

Parameters
clazz:Class<?>

the class to look for

Returns:Collection<ClassInfo>

a non-null list of classes that use the specified class

getModuleByNameback to summary
public ModuleInfo getModuleByName(DotName moduleName)

Gets the module that was scanned during the indexing phase.

Parameters
moduleName:DotName

the name of the module

Returns:ModuleInfo

information about the module or null if it is not known

getModuleByNameback to summary
public default ModuleInfo getModuleByName(String moduleName)

Gets the module that was scanned during the indexing phase.

Parameters
moduleName:String

the name of the module

Returns:ModuleInfo

information about the module or null if it is not known

getSubpackagesback to summary
public Set<DotName> getSubpackages(DotName packageName)

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 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).

Parameters
packageName:DotName

package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package

Returns:Set<DotName>

immutable set of subpackages of given package, never null

Since
3.0
getSubpackagesback to summary
public default Set<DotName> getSubpackages(String packageName)

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 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).

Parameters
packageName:String

package name in the common, dot-separated form (e.g. com.example.foobar); null means the unnamed package

Returns:Set<DotName>

immutable set of subpackages of given package, never null

Since
3.0