|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Inherited @Documented @Retention(value=RUNTIME) @Target(value={CONSTRUCTOR,METHOD}) public @interface Executor
A method or constructor annotated with the executor
annotation indicates that it will be executed reflectively
by a given context
.
Implementation notes:
The executor annotation can annotate any constructor or method.
The context using the annotated members must supply the logic
to support the parameter types.
The annotation is inherited! This means that if defined in a super-class, a sub-class overriding the annotated member can be used as an observer if an instance of the sub-class is used. Inheritance is only on from super-class to sub-class, not for implemented interfaces.
ExecutorProcessor
Optional Element Summary | |
---|---|
Class<?> |
value
Returns the context to which the annotated member is associated. |
public abstract Class<?> value
The context is used to discriminate between the contexts using the annotated members, for example different context annotating members in the same class for different purposes.
Object
(any).
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |