net.vidageek.mirror.provider.java
Class PureJavaAnnotatedElementReflectionProvider

java.lang.Object
  extended by net.vidageek.mirror.provider.java.PureJavaAnnotatedElementReflectionProvider
All Implemented Interfaces:
AnnotatedElementReflectionProvider

public final class PureJavaAnnotatedElementReflectionProvider
extends Object
implements AnnotatedElementReflectionProvider

Author:
jonasabreu

Constructor Summary
PureJavaAnnotatedElementReflectionProvider(AnnotatedElement element)
           
 
Method Summary
<T extends Annotation>
T
getAnnotation(Class<T> annotation)
          This method is used to reflect a single annotation from the AnnotatedElement wrapped.
 List<Annotation> getAnnotations()
          This method is used to reflect all annotations from the AnnotatedElement wrapped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PureJavaAnnotatedElementReflectionProvider

public PureJavaAnnotatedElementReflectionProvider(AnnotatedElement element)
Method Detail

getAnnotations

public List<Annotation> getAnnotations()
Description copied from interface: AnnotatedElementReflectionProvider
This method is used to reflect all annotations from the AnnotatedElement wrapped.

Specified by:
getAnnotations in interface AnnotatedElementReflectionProvider
Returns:
A list containing all annotations if any existed. An empty list if none is found.

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotation)
Description copied from interface: AnnotatedElementReflectionProvider
This method is used to reflect a single annotation from the AnnotatedElement wrapped.

Specified by:
getAnnotation in interface AnnotatedElementReflectionProvider
Parameters:
annotation - Annotation to be reflected.
Returns:
The annotation if found, null if not.


Copyright © 2011 VidaGeek.net. All Rights Reserved.