net.sf.dobo
Class Dobo

java.lang.Object
  extended by net.sf.dobo.Dobo

public class Dobo
extends java.lang.Object

Dobo utilities of dobo.

Author:
arif

Method Summary
static void check(java.lang.Class<?> contextImplementationObject)
          To check wether the ContextImplementationObject (CIO) conform the Context contract.
static java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> findAllContextInContextImplementationObject(java.lang.Class<?> contextImplementationObject)
          Find all context in ContextImplementationObject.
static java.lang.Class<? extends java.lang.annotation.Annotation> getContextMemberMatchWith(java.lang.Class<? extends java.lang.annotation.Annotation> context, java.lang.reflect.Method contextInterfaceMethod)
          To Find ContextMember match with Context Interface Method.Return null if no ContextMember found.
static java.lang.reflect.Field getFieldAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> contextMember, java.lang.Class<?> contextImplementationObject)
          To Find a Field in Context Implementation Object which annotated with Context Member.
static java.lang.reflect.Method getInterfaceMethodMatchWith(java.lang.String name, java.lang.Class<?>[] parameterType, java.lang.Class<?> contextInterface)
          To find a method in Context Interface which match with the ContextMemberMethod.
static java.lang.reflect.Method getMethodAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> contextMember, java.lang.Class<?> contextImplementationObject)
          To find method which is annotated with a Context Member.
static java.lang.Object instantiate(java.lang.Object contextImplementationObject, java.lang.Class<? extends java.lang.annotation.Annotation> context)
          Instantiate Context Implementation Object Proxy according to Context Implementation Object.
static void main(java.lang.String[] args)
          Creating context template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

check

public static void check(java.lang.Class<?> contextImplementationObject)
To check wether the ContextImplementationObject (CIO) conform the Context contract. Throw RuntimeException if check failed to verified contextImplementationObject

Parameters:
contextImplementationObject - clazz of Context Implementation Object.

findAllContextInContextImplementationObject

public static java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> findAllContextInContextImplementationObject(java.lang.Class<?> contextImplementationObject)
Find all context in ContextImplementationObject. By checking methods that annotated with context member.

Parameters:
contextImplementationObject -
Returns:
set of context

getMethodAnnotatedWith

public static java.lang.reflect.Method getMethodAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> contextMember,
                                                              java.lang.Class<?> contextImplementationObject)
To find method which is annotated with a Context Member. Return null if no Method match with the ContextMember

Parameters:
contextMember -
contextImplementationObject -
Returns:
method matched Context Implementation Object

getFieldAnnotatedWith

public static java.lang.reflect.Field getFieldAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> contextMember,
                                                            java.lang.Class<?> contextImplementationObject)
To Find a Field in Context Implementation Object which annotated with Context Member. Return null if no Field found.

Parameters:
contextMember -
contextImplementationObject -
Returns:
Field yang dianotasikan oleh context member

instantiate

public static java.lang.Object instantiate(java.lang.Object contextImplementationObject,
                                           java.lang.Class<? extends java.lang.annotation.Annotation> context)
Instantiate Context Implementation Object Proxy according to Context Implementation Object.

Parameters:
contextImplementationObject -
context -
Returns:
Proxy object dari context implementation

getInterfaceMethodMatchWith

public static java.lang.reflect.Method getInterfaceMethodMatchWith(java.lang.String name,
                                                                   java.lang.Class<?>[] parameterType,
                                                                   java.lang.Class<?> contextInterface)
To find a method in Context Interface which match with the ContextMemberMethod. Return null if no Method match.

Parameters:
contextMemberMethod -
contextInterface -
Returns:
method yang match dengan context member method.

getContextMemberMatchWith

public static java.lang.Class<? extends java.lang.annotation.Annotation> getContextMemberMatchWith(java.lang.Class<? extends java.lang.annotation.Annotation> context,
                                                                                                   java.lang.reflect.Method contextInterfaceMethod)
To Find ContextMember match with Context Interface Method.Return null if no ContextMember found.

Parameters:
context -
contextInterfaceMethod -
Returns:
Context Member.

main

public static void main(java.lang.String[] args)
Creating context template

Parameters:
args -


Copyright © 2008 Dobo Sourceforge. All Rights Reserved.