public class AnnotationProcessor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<? extends Annotation>,PluginHandler> |
handlers |
protected PluginManager |
pluginManager |
| Constructor and Description |
|---|
AnnotationProcessor(PluginManager pluginManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotationHandler(Class<? extends Annotation> annotation,
PluginHandler handler) |
void |
init(PluginManager pluginManager) |
boolean |
processAnnotations(Class processClass,
Class pluginClass)
Process annotations on the plugin class - only static methods, methods to hook plugin initialization.
|
boolean |
processAnnotations(Object plugin)
Process annotations on a plugin - non static fields and methods.
|
protected PluginManager pluginManager
protected Map<Class<? extends Annotation>,PluginHandler> handlers
public AnnotationProcessor(PluginManager pluginManager)
public void init(PluginManager pluginManager)
public void addAnnotationHandler(Class<? extends Annotation> annotation, PluginHandler handler)
public boolean processAnnotations(Class processClass, Class pluginClass)
processClass - class to process annotationpluginClass - main plugin class (annotated with @Plugin)public boolean processAnnotations(Object plugin)
plugin - plugin objectCopyright © 2018. All rights reserved.