public class AutomagicMadvocConfigurator extends java.lang.Object implements MadvocComponentLifecycle.Init, MadvocComponentLifecycle.Start
WebApp.
It searches the class path for all classes which names ends with 'Action' and 'Result'
suffixes. Each such class will be loaded and introspected to determine
if it represents valid Madvoc entity and then registered into the web application.
Action class is scanned for the MadvocAction. All public methods with Action
are registered as Madvoc actions.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
actionClassSuffix |
protected ActionsManager |
actionsManager |
protected long |
elapsed |
protected byte[] |
madvocComponentAnnotation |
protected java.util.List<java.lang.Runnable> |
madvocComponents |
protected MadvocConfig |
madvocConfig |
protected MadvocContainer |
madvocContainer |
protected java.util.List<java.lang.Runnable> |
webappConfigurations |
| Constructor and Description |
|---|
AutomagicMadvocConfigurator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkClass(java.lang.Class clazz)
Determines if class should be examined for Madvoc annotations.
|
void |
init() |
protected void |
onActionClass(java.lang.String className)
Builds action runtime configuration on founded action class.
|
protected void |
onMadvocComponentClass(java.lang.String className)
Registers new Madvoc component.
|
void |
start() |
AutomagicMadvocConfigurator |
withScanner(java.util.function.Consumer<ClassScanner> scannerConsumer) |
@PetiteInject protected MadvocConfig madvocConfig
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected MadvocContainer madvocContainer
protected java.lang.String actionClassSuffix
protected long elapsed
protected final byte[] madvocComponentAnnotation
protected java.util.List<java.lang.Runnable> webappConfigurations
protected java.util.List<java.lang.Runnable> madvocComponents
public AutomagicMadvocConfigurator withScanner(java.util.function.Consumer<ClassScanner> scannerConsumer)
public void init()
init in interface MadvocComponentLifecycle.Initpublic void start()
start in interface MadvocComponentLifecycle.Startpublic boolean checkClass(java.lang.Class clazz)
NoClassDefFoundError;
we should continue searching anyway.protected void onActionClass(java.lang.String className)
throws java.lang.ClassNotFoundException
MadvocAction annotation.java.lang.ClassNotFoundExceptionprotected void onMadvocComponentClass(java.lang.String className)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionCopyright © 2003-present Jodd Team