1 package net.sf.dobo;
2
3 import java.lang.annotation.ElementType;
4 import java.lang.annotation.Retention;
5 import java.lang.annotation.RetentionPolicy;
6 import java.lang.annotation.Target;
7
8 /***
9 * The method is for checking wether the clazz confirm with the Context contract
10 * and verify wether the Context . Contract valid as following :
11 *
12 * <pre>
13 * 1. Every Context must be annotated with @Context.
14 * 2. Every Context @Target has value of the Context Interface (CI)
15 * 3. Context Member(CM) must be <i>class member</i> of the Context it self.
16 * 4. CM is annotation which is targetted for FIELD, or METHOD and must be annotated with @ContextMemberType
17 * 5. @ContextMemberType on CM is to match data type of a field, and return type of a METHOD.
18 * - The CI field datatype must be assignable from implementation datatype
19 * - The CI method parameter and return type must be assignable to Context Implementation Object (CIO) method.
20 * 6. CM @Target for ElementType.METHOD must be annotated with @ContextMemberMethod
21 * 7. @ContextMemberMethod will bind particular CI method, based on method name, and parameter type
22 * </pre>
23 *
24 * @author arif
25 * @version 1.0
26 */
27 @Target(ElementType.ANNOTATION_TYPE)
28 @Retention(RetentionPolicy.RUNTIME)
29 public @interface Context {
30 /***
31 * Value of the Context Interface
32 *
33 * @return Context Interface class
34 */
35 Class<?> value();
36 }