org.hyphenType.util
Class DefaultAnnotation

java.lang.Object
  extended by org.hyphenType.util.DefaultAnnotation
All Implemented Interfaces:
InvocationHandler

public final class DefaultAnnotation
extends Object
implements InvocationHandler

Author:
Aurelio Akira M. Matsui

Field Summary
static String ANNOTATION_SEPARATOR
           
static String FIELD_SEPARATOR
           
static String METHOD_SEPARATOR
           
 
Method Summary
 Class<? extends Annotation> annotationType()
           
 boolean equals(Object obj)
           
static void fillWithResourceBundle(Annotation annotation, ResourceBundle resourceBundle)
           
static
<T extends Annotation>
T
getAnnotation(Class clazz, Class<T> annotationClass)
           
static
<T extends Annotation>
T
getAnnotation(Enum<?> enumConstant, Class<T> annotationClass)
           
static
<T extends Annotation>
T
getAnnotation(Field field, Class<T> annotationClass)
           
static
<T extends Annotation>
T
getAnnotation(Method method, Class<T> annotationClass)
           
static Annotation[] getAnnotations(Class clazz)
           
static Annotation[] getAnnotations(Enum<?> enumConstant)
           
static Annotation[] getAnnotations(Field field)
           
static Annotation[] getAnnotations(Method method)
           
static
<T extends Annotation>
T
getAnnotationWithDefaults(Class<? extends Annotation> annotationClass)
           
 String getBasePrefix()
           
 int hashCode()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
static boolean isDefaultAnnotation(Annotation annotation)
           
static void set(Annotation annotation, Method method, Object value)
           
static void set(Annotation annotation, String methodName, Object value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

METHOD_SEPARATOR

public static final String METHOD_SEPARATOR
See Also:
Constant Field Values

FIELD_SEPARATOR

public static final String FIELD_SEPARATOR
See Also:
Constant Field Values

ANNOTATION_SEPARATOR

public static final String ANNOTATION_SEPARATOR
See Also:
Constant Field Values
Method Detail

getAnnotations

public static Annotation[] getAnnotations(Class clazz)
Parameters:
clazz - TODO
Returns:
TODO

getAnnotation

public static <T extends Annotation> T getAnnotation(Class clazz,
                                                     Class<T> annotationClass)
Type Parameters:
T - TODO
Parameters:
clazz - TODO
annotationClass - TODO
Returns:
TODO

getAnnotations

public static Annotation[] getAnnotations(Method method)
Parameters:
clazz - TODO
Returns:
TODO

getAnnotation

public static <T extends Annotation> T getAnnotation(Method method,
                                                     Class<T> annotationClass)
Type Parameters:
T - TODO
Parameters:
clazz - TODO
annotationClass - TODO
Returns:
TODO

getAnnotations

public static Annotation[] getAnnotations(Field field)
Parameters:
clazz - TODO
Returns:
TODO

getAnnotation

public static <T extends Annotation> T getAnnotation(Field field,
                                                     Class<T> annotationClass)
Type Parameters:
T - TODO
Parameters:
clazz - TODO
annotationClass - TODO
Returns:
TODO

getAnnotations

public static Annotation[] getAnnotations(Enum<?> enumConstant)
Parameters:
enumConstant - An enumeration constant.
Returns:
TODO

getAnnotation

public static <T extends Annotation> T getAnnotation(Enum<?> enumConstant,
                                                     Class<T> annotationClass)
Type Parameters:
T - TODO
Parameters:
enumConstant - An enumeration constant.
annotationClass - TODO
Returns:
TODO

getAnnotationWithDefaults

public static <T extends Annotation> T getAnnotationWithDefaults(Class<? extends Annotation> annotationClass)
Type Parameters:
T - TODO
Parameters:
annotationClass - TODO
Returns:
TODO

set

public static void set(Annotation annotation,
                       Method method,
                       Object value)
Parameters:
annotation - TODO
method - TODO
value - TODO

set

public static void set(Annotation annotation,
                       String methodName,
                       Object value)
Parameters:
annotation - TODO
methodName - TODO
value - TODO

fillWithResourceBundle

public static void fillWithResourceBundle(Annotation annotation,
                                          ResourceBundle resourceBundle)
Parameters:
annotation - TODO
resourceBundle - TODO

isDefaultAnnotation

public static boolean isDefaultAnnotation(Annotation annotation)
Parameters:
annotation - TODO
Returns:
TODO

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

annotationType

public Class<? extends Annotation> annotationType()
Returns:
TODO
See Also:
Annotation.annotationType()

getBasePrefix

public String getBasePrefix()

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2013. All Rights Reserved.