net.vidageek.mirror.reflect
Class DefaultMethodAnnotationHandler<T extends java.lang.annotation.Annotation>

java.lang.Object
  extended by net.vidageek.mirror.reflect.DefaultMethodAnnotationHandler<T>
All Implemented Interfaces:
MethodAnnotationHandler<T>

public final class DefaultMethodAnnotationHandler<T extends java.lang.annotation.Annotation>
extends java.lang.Object
implements MethodAnnotationHandler<T>

This class is responsible for reflecting annotations on a method.

Author:
dnfeitosa

Constructor Summary
DefaultMethodAnnotationHandler(ReflectionProvider provider, java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<T> annotation)
           
 
Method Summary
 T withArgs(java.lang.Class<?>... classes)
          Use this method to reflect a single annotation at the method that matches classes as its arguments.
 T withoutArgs()
          This is a convenience method for MethodAnnotationHandler.withArgs(Class...)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMethodAnnotationHandler

public DefaultMethodAnnotationHandler(ReflectionProvider provider,
                                      java.lang.Class<?> clazz,
                                      java.lang.String methodName,
                                      java.lang.Class<T> annotation)
Method Detail

withArgs

public T withArgs(java.lang.Class<?>... classes)
Description copied from interface: MethodAnnotationHandler
Use this method to reflect a single annotation at the method that matches classes as its arguments.

Specified by:
withArgs in interface MethodAnnotationHandler<T extends java.lang.annotation.Annotation>
Parameters:
classes - arguments of the method from where to search for annotations.
Returns:
The annotation or null if it was not found.
See Also:
AnnotatedElementReflectionProvider#getAnnotation(Class)

withoutArgs

public T withoutArgs()
Description copied from interface: MethodAnnotationHandler
This is a convenience method for MethodAnnotationHandler.withArgs(Class...)

Specified by:
withoutArgs in interface MethodAnnotationHandler<T extends java.lang.annotation.Annotation>
See Also:
MethodAnnotationHandler.withArgs(Class...)


Copyright © 2009 VidaGeek.net. All Rights Reserved.