public final class Index extends Object
It contains the following information:
Modifier and Type | Method and Description |
---|---|
static Index |
create(Map<DotName,List<AnnotationInstance>> annotations,
Map<DotName,List<ClassInfo>> subclasses,
Map<DotName,List<ClassInfo>> implementors,
Map<DotName,ClassInfo> classes)
Constructs a "mock" Index using the passed values.
|
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).
|
List<ClassInfo> |
getKnownDirectImplementors(DotName className)
Gets all known direct implementors of the specified interface name.
|
List<ClassInfo> |
getKnownDirectSubclasses(DotName className)
Gets all known direct subclasses of the specified class name.
|
void |
printAnnotations()
Print all annotations known by this index to stdout.
|
void |
printSubclasses()
Print all classes that have known subclasses, and all their subclasses
|
public static Index create(Map<DotName,List<AnnotationInstance>> annotations, Map<DotName,List<ClassInfo>> subclasses, Map<DotName,List<ClassInfo>> implementors, Map<DotName,ClassInfo> classes)
annotations
- A map to lookup annotation instances by class namesubclasses
- A map to lookup subclasses by super class nameimplementors
- A map to lookup implementing classes by interface nameclasses
- A map to lookup classes by class namepublic List<AnnotationInstance> getAnnotations(DotName annotationName)
annotationName
- the name of the annotation to look forpublic List<ClassInfo> getKnownDirectSubclasses(DotName className)
className
- the super class of the desired subclassespublic List<ClassInfo> getKnownDirectImplementors(DotName className)
getKnownDirectImplementors(DotName)
for every implementing
interface found.className
- the super class of the desired subclassespublic ClassInfo getClassByName(DotName className)
className
- the name of the classpublic Collection<ClassInfo> getKnownClasses()
public void printAnnotations()
public void printSubclasses()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.