com.pietschy.command.annotation.impl
Class SwingWorkerCommandProcessor

java.lang.Object
  extended by com.pietschy.command.annotation.impl.AbstractAnnotationProcessor<SwingWorkerCommand_>
      extended by com.pietschy.command.annotation.impl.SwingWorkerCommandProcessor
All Implemented Interfaces:
AnnotationProcessor<SwingWorkerCommand_>

public class SwingWorkerCommandProcessor
extends AbstractAnnotationProcessor<SwingWorkerCommand_>

Default processor for handling the @SwingWorkerCommand annotation.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.pietschy.command.annotation.impl.AbstractAnnotationProcessor
AbstractAnnotationProcessor.CommandProvider, AbstractAnnotationProcessor.InvokerWindowProvider, AbstractAnnotationProcessor.ParameterProvider
 
Constructor Summary
SwingWorkerCommandProcessor()
           
 
Method Summary
 Command createCommand(java.lang.Object target, java.lang.reflect.Method method)
          Creates a new ReflectionSwingWorkerCommandto invoke the specified method on the specified target.
 java.lang.Class<SwingWorkerCommand_> getAnnotation()
          Returns the annotation class handled by this processor.
protected  java.lang.String getId(SwingWorkerCommand_ annotation, java.lang.reflect.Method method)
          Gets the command id from the methods annotation.
 
Methods inherited from class com.pietschy.command.annotation.impl.AbstractAnnotationProcessor
createArgumentProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingWorkerCommandProcessor

public SwingWorkerCommandProcessor()
Method Detail

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