public class CompositeIndex extends Object implements IndexView
Index
instances.
An example application is a Java EE deployment, which can contain multiple nested jars, each with
their own index.Modifier and Type | Method and Description |
---|---|
static CompositeIndex |
create(Collection<IndexView> indexes) |
static CompositeIndex |
create(IndexView... indexes) |
static CompositeIndex |
createMerged(CompositeIndex... indexes) |
Set<ClassInfo> |
getAllKnownImplementors(DotName interfaceName)
Returns all known classes that implement the given interface, directly and indirectly.
|
Set<ClassInfo> |
getAllKnownSubclasses(DotName className)
Returns all known (including non-direct) sub classes of the given class.
|
List<AnnotationInstance> |
getAnnotations(DotName annotationName)
Obtains a list of instances for the specified annotation.
|
ClassInfo |
getClassByName(DotName className)
Gets the class (or interface, or annotation) that was scanned during the
indexing phase.
|
Collection<ClassInfo> |
getKnownClasses()
Gets all known classes by this index (those which were scanned).
|
Collection<ClassInfo> |
getKnownDirectImplementors(DotName className)
Gets all known direct implementors of the specified interface name.
|
Set<ClassInfo> |
getKnownDirectSubclasses(DotName className)
Gets all known direct subclasses of the specified class name.
|
public static CompositeIndex create(Collection<IndexView> indexes)
public static CompositeIndex create(IndexView... indexes)
public static CompositeIndex createMerged(CompositeIndex... indexes)
public List<AnnotationInstance> getAnnotations(DotName annotationName)
getAnnotations
in interface IndexView
annotationName
- the name of the annotation to look forpublic Set<ClassInfo> getKnownDirectSubclasses(DotName className)
getKnownDirectSubclasses
in interface IndexView
className
- the super class of the desired subclassespublic Set<ClassInfo> getAllKnownSubclasses(DotName className)
getAllKnownSubclasses
in interface IndexView
className
- The classpublic Collection<ClassInfo> getKnownDirectImplementors(DotName className)
IndexView.getKnownDirectImplementors(DotName)
for every implementing
interface found.getKnownDirectImplementors
in interface IndexView
className
- the super class of the desired subclassespublic Set<ClassInfo> getAllKnownImplementors(DotName interfaceName)
getAllKnownImplementors
in interface IndexView
interfaceName
- The interfacepublic ClassInfo getClassByName(DotName className)
getClassByName
in interface IndexView
className
- the name of the classpublic Collection<ClassInfo> getKnownClasses()
getKnownClasses
in interface IndexView
Copyright © 2014 JBoss by Red Hat. All rights reserved.