com.pietschy.command.annotation.impl
Class SwingWorkerCommandProcessor
java.lang.Object
com.pietschy.command.annotation.impl.AbstractAnnotationProcessor<SwingWorkerCommand_>
com.pietschy.command.annotation.impl.SwingWorkerCommandProcessor
- All Implemented Interfaces:
- AnnotationProcessor<SwingWorkerCommand_>
public class SwingWorkerCommandProcessor
- extends AbstractAnnotationProcessor<SwingWorkerCommand_>
Default processor for handling the @SwingWorkerCommand annotation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwingWorkerCommandProcessor
public SwingWorkerCommandProcessor()
getAnnotation
public java.lang.Class<SwingWorkerCommand_> getAnnotation()
- Returns the annotation class handled by this processor.
- Returns:
- the annotation class handled by this processor.
createCommand
public Command createCommand(java.lang.Object target,
java.lang.reflect.Method method)
- Creates a new
ReflectionSwingWorkerCommandto invoke the specified method on
the specified target.
- Parameters:
target - the target object.method - the method to invoke.
- Returns:
- a new AnnotationSwingWorkerCommand to invoke the specified method on the specified
target.
getId
protected java.lang.String getId(SwingWorkerCommand_ annotation,
java.lang.reflect.Method method)
- Gets the command id from the methods annotation. This is required as the id can be
specified as the annotation value() or id().
- Parameters:
annotation - the annotation.method - the method that has been annotated.
- Returns:
- the command id as defined by the annotation.
- Throws:
AnnotationIdMissingException - if neither the value() or id() parameters
aren't specified.
Copyright © 2006 - 2007 Andrew Pietsch