|
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 |
@Documented @Inherited @Retention(value=RUNTIME) @Target(value={TYPE,METHOD,PARAMETER,FIELD,LOCAL_VARIABLE}) public @interface ParticipantUsage
Identifies a participant as described in [Gamma95, p.7] that is already represented by an implemented type, typically imported into the pattern package to represent participant functionality defined externally.
This annotation does not declare a participant type, but identifies an existing type as a participant used by the annotated element. The identified participant may represent an interface even for concrete participant types. If so, any implementation is considered a valid representative of the participant.
Participant
Required Element Summary | |
---|---|
Class<?>[] |
type
The classes implementing a given participant role. |
String[] |
value
The roles this participant fulfil in the pattern. |
Element Detail |
---|
public abstract Class<?>[] type
An index in this array corresponds to the given participant
role
identified at the same index. However,
if all roles uses the same class, it is sufficient to declare
just that class. Vice versa, if several types are related to
the same role, a single role suffice.
public abstract String[] value
An index in this array corresponds to the given participant
type
identified at the same index. However,
if all roles uses the same class, it is sufficient to declare
just that class. Vice versa, if several types are related to
the same role, a single role suffice.
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |