public class AnnotationDB extends AbstractScanner implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Set<String>> |
annotationIndex |
protected Map<String,Set<String>> |
classIndex |
protected Map<String,Set<String>> |
classInterfaces |
protected Map<String,Set<String>> |
implementsIndex |
protected Map<String,Set<String>> |
interfacesIndex |
protected boolean |
scanFieldAnnotations |
protected boolean |
scanMethodAnnotations |
protected Set<URL> |
scannedURLs |
protected boolean |
scanParameterAnnotations |
protected Map<String,String> |
superClasses |
| Constructor and Description |
|---|
AnnotationDB() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Set<String>> |
getAnnotationIndex()
returns a map keyed by the fully qualified string name of a annotation
class.
|
Map<String,Set<String>> |
getClassIndex()
returns a map keyed by the list of classes scanned.
|
protected Set<String> |
getInterfacesFromSuperClass(String className,
Set<String> processedClasses) |
Map<String,Set<String>> |
getInterfacesIndex() |
Scanners.ScannerCallback |
getScannerCallback() |
Filter |
getScannerFilter() |
void |
outputAnnotationIndex(PrintWriter writer)
Prints out annotationIndex
|
protected void |
populate(javassist.bytecode.annotation.Annotation[] annotations,
String className) |
protected void |
populateInterfaces(javassist.bytecode.ClassFile cf) |
protected void |
populateInterfaces(String[] interfaces,
String className) |
protected void |
populateInterfacesFromSuperClass() |
void |
resetScanner() |
void |
scanArchives()
Scan a url that represents an "archive" this is a classpath directory or
jar file
|
protected void |
scanClass(javassist.bytecode.ClassFile cf) |
void |
scanClass(InputStream bits)
Parse a .class file for annotations
|
protected void |
scanFields(javassist.bytecode.ClassFile cf) |
protected void |
scanMethods(javassist.bytecode.ClassFile cf)
Scanns both the method and its parameters for annotations.
|
void |
setScanFieldAnnotations(boolean scanFieldAnnotations)
Whether or not you want AnnotationDB to scan for parameter level
annotations
|
void |
setScanMethodAnnotations(boolean scanMethodAnnotations)
Wheter or not you want AnnotationDB to scan for method level annotations
|
void |
setScanParameterAnnotations(boolean scanParameterAnnotations)
Whether or not you want AnnotationDB to scan for parameter level
annotations
|
runScannerprotected transient boolean scanMethodAnnotations
protected transient boolean scanParameterAnnotations
protected transient boolean scanFieldAnnotations
public Map<String,Set<String>> getAnnotationIndex()
public Map<String,Set<String>> getClassIndex()
public void setScanMethodAnnotations(boolean scanMethodAnnotations)
scanMethodAnnotations - public void setScanParameterAnnotations(boolean scanParameterAnnotations)
scanParameterAnnotations - public void setScanFieldAnnotations(boolean scanFieldAnnotations)
scanFieldAnnotations - public Filter getScannerFilter()
getScannerFilter in class AbstractScannerpublic Scanners.ScannerCallback getScannerCallback()
getScannerCallback in class AbstractScannerpublic void scanArchives()
urls - variable list of URLs to scan as archivespublic void resetScanner()
resetScanner in class AbstractScannerpublic void scanClass(InputStream bits) throws IOException
bits - input stream pointing to .class file bitsIOExceptionprotected void populateInterfaces(javassist.bytecode.ClassFile cf)
protected void populateInterfacesFromSuperClass()
protected Set<String> getInterfacesFromSuperClass(String className, Set<String> processedClasses)
protected void scanClass(javassist.bytecode.ClassFile cf)
protected void scanMethods(javassist.bytecode.ClassFile cf)
cf - protected void scanFields(javassist.bytecode.ClassFile cf)
protected void populate(javassist.bytecode.annotation.Annotation[] annotations,
String className)
public void outputAnnotationIndex(PrintWriter writer)
writer - Copyright © 2016. All rights reserved.