net.vidageek.mirror.reflect.dsl
Interface AnnotationHandler<T extends Annotation>

All Known Implementing Classes:
DefaultAnnotationHandler

public interface AnnotationHandler<T extends Annotation>


Method Summary
 T atClass()
          Use this method to reflect a single annotation at class
 T atField(String fieldName)
          Use this method to reflect a single annotation at field named fieldName
 MethodAnnotationHandler<T> atMethod(String methodName)
          Use this method to reflect a single annotation at method named methodName
 

Method Detail

atField

T atField(String fieldName)
Use this method to reflect a single annotation at field named fieldName

Parameters:
fieldName - name of the field from where to search for annotations.
Returns:
The annotation or null if it was not found.
Throws:
IllegalArgumentException - if fieldName is null or empty
See Also:
AnnotatedElementReflectionProvider.getAnnotation(Class)

atMethod

MethodAnnotationHandler<T> atMethod(String methodName)
Use this method to reflect a single annotation at method named methodName

Parameters:
methodName - name of the method from where to search for annotations.
Returns:
An object responsible for reflecting annotations on a method.
Throws:
IllegalArgumentException - if fieldName is null or empty
See Also:
AnnotatedElementReflectionProvider.getAnnotation(Class)

atClass

T atClass()
Use this method to reflect a single annotation at class

Returns:
The annotation or null if it was not found.
See Also:
AnnotatedElementReflectionProvider.getAnnotation(Class)


Copyright © 2011 VidaGeek.net. All Rights Reserved.