|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.annotation.impl.DefaultAnnotationSupport
public class DefaultAnnotationSupport
Default implementation of AnnotationSupport.
This class uses instances of AnnotationProcessor to process annotated methods.
Two processors are installed by default, the ActionCommandProcessor and
SwingWorkerCommandProcessor.
New annotation processors can be installed using installProcessor(AnnotationProcessor).
| Nested Class Summary | |
|---|---|
protected static interface |
DefaultAnnotationSupport.BindStrategy
Simple interface for handling the various type of bind operation. |
protected class |
DefaultAnnotationSupport.ComponentBindStrategy
BindAction implementation that binds to a component. |
protected class |
DefaultAnnotationSupport.ContainerBindStrategy
BindAction implementation that binds to a CommandContainer. |
| Constructor Summary | |
|---|---|
DefaultAnnotationSupport()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
bindAnnotatedCommands(CommandContainer container,
java.lang.Object target)
Binds the annotated methods of the specified target to the specified CommandContainer. |
void |
bindAnnotatedCommands(java.awt.Component component,
java.lang.Object target)
Binds the annotated methods of the specified target to the specified component. |
protected void |
installDefaultProcessors()
Installs the default processors defined by the library. |
void |
installProcessor(AnnotationProcessor processor)
Installs a new processor. |
protected void |
processAnnotatedMethods(java.lang.Object target,
DefaultAnnotationSupport.BindStrategy bindStrategy)
Scans all the annotated methods of the specified target. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAnnotationSupport()
| Method Detail |
|---|
protected void installDefaultProcessors()
public void installProcessor(AnnotationProcessor processor)
processor - the new processor to install.
public void bindAnnotatedCommands(CommandContainer container,
java.lang.Object target)
CommandContainer.
bindAnnotatedCommands in interface AnnotationSupportcontainer - the container to bind to.target - the object with the annotated methods.
public void bindAnnotatedCommands(java.awt.Component component,
java.lang.Object target)
bindAnnotatedCommands in interface AnnotationSupportcomponent - the component to bind to.target - the object with the annotated methods.
protected void processAnnotatedMethods(java.lang.Object target,
DefaultAnnotationSupport.BindStrategy bindStrategy)
DefaultAnnotationSupport.BindStrategy.
target - the object to scan.bindStrategy - the bind action to take.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||