Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.annotation.impl
Class AbstractAnnotationProcessor<T extends java.lang.annotation.Annotation>

    java.lang.Object
      com.pietschy.command.annotation.impl.AbstractAnnotationProcessor<T>

All Implemented Interfaces:
  AnnotationProcessor<T>

Direct Known Subclasses:
  ActionCommandProcessor, SwingWorkerCommandProcessor

    public abstract class AbstractAnnotationProcessor<T extends java.lang.annotation.Annotation>

extends java.lang.Object
implements AnnotationProcessor<T>

Base class for AnnotationProcessors. This class provides the `createArgumentProvider(Method, com.pietschy.command.ActionCommand)` method that scans the argument types of annotated methods to:

1. Ensure they are of one of the allowed types
2. Create an `ArgumentProvider` suitable for the command

The allowed method types are:

1. No-arg methods.
2. Methods with a single `Map` argument. The method will be passed the commands parameter map.
3. Methods with a single `ActionCommand` argument. The method will be passed the invoking command.
4. Methods with a single `Window` argument. The method will be passed the commands invoking window.

All other argument lists will throw an `UnsupportedArgumentException`.

Nested Class Summary
`protected static class` | `AbstractAnnotationProcessor.CommandProvider` An `ArgumentProvider` that returns the invoking command.
`protected static class` | `AbstractAnnotationProcessor.InvokerWindowProvider` An `ArgumentProvider` that returns the invoking command.
`protected static class` | `AbstractAnnotationProcessor.ParameterProvider` An `ArgumentProvider` that returns the parameters of the invoking command.

Constructor Summary
`AbstractAnnotationProcessor()`

Method Summary
`protected ArgumentProvider` | `createArgumentProvider(java.lang.reflect.Method method, ActionCommand command)` Creates an `ArgumentProvider` for the specified method and invoking command.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.pietschy.command.annotation.impl.AnnotationProcessor
`createCommand, getAnnotation`

Constructor Detail

### AbstractAnnotationProcessor

    public AbstractAnnotationProcessor()

Method Detail

### createArgumentProvider

    protected ArgumentProvider createArgumentProvider(java.lang.reflect.Method method,
                                                      ActionCommand command)

  Creates an `ArgumentProvider` for the specified method and invoking command.

  Parameters:
    `method` - the method to be invoked.
    `command` - the command invoking it.
  Returns:
    an `ArgumentProvider` for the specified method and invoking command.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch