package net.sf.dobo; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * The method is for checking wether the clazz confirm with the Context contract * and verify wether the Context . Contract valid as following : * *
* 1. Every Context must be annotated with @Context. * 2. Every Context @Target has value of the Context Interface (CI) * 3. Context Member(CM) must be <i>class member</i> of the Context it self. * 4. CM is annotation which is targetted for FIELD, or METHOD and must be annotated with @ContextMemberType * 5. @ContextMemberType on CM is to match data type of a field, and return type of a METHOD. * - The CI field datatype must be assignable from implementation datatype * - The CI method parameter and return type must be assignable to Context Implementation Object (CIO) method. * 6. CM @Target for ElementType.METHOD must be annotated with @ContextMemberMethod * 7. @ContextMemberMethod will bind particular CI method, based on method name, and parameter type ** * @author arif * @version 1.0 */ @Target(ElementType.ANNOTATION_TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Context { /** * Value of the Context Interface * * @return Context Interface class */ Class> value(); }