|
Java Annotation Indexer 1.0.0.Final-redhat-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.jandex.Index
public final class Index
An index useful for quickly processing annotations. The index is read-only and supports concurrent access. Also the index is optimized for memory efficiency by using componentized DotName values.
It contains the following information:
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 name
public List<AnnotationInstance> getAnnotations(DotName annotationName)
annotationName
- the name of the annotation to look for
public List<ClassInfo> getKnownDirectSubclasses(DotName className)
className
- the super class of the desired subclasses
public List<ClassInfo> getKnownDirectImplementors(DotName className)
getKnownDirectImplementors(DotName)
for every implementing
interface found.
className
- the super class of the desired subclasses
public ClassInfo getClassByName(DotName className)
className
- the name of the class
public Collection<ClassInfo> getKnownClasses()
public void printAnnotations()
public void printSubclasses()
|
Java Annotation Indexer 1.0.0.Final-redhat-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |