org.jbehave.core.configuration
Class AnnotationFinder

java.lang.Object
  extended by org.jbehave.core.configuration.AnnotationFinder

public class AnnotationFinder
extends Object

Helper class to find and retrieve annotated values

Author:
Cristiano Gavião, Brian Repko, Mauro Talevi

Constructor Summary
AnnotationFinder(Class<?> annotatedClass)
           
 
Method Summary
protected  String createInheritMemberName(String memberName)
          Creates the inherit member name by prefixing "inherit" to the capitalized member name.
<T,A extends Annotation>
List<Class<T>>
getAnnotatedClasses(Class<A> annotationClass, Class<T> type, String memberName)
           
<T,A extends Annotation>
T
getAnnotatedValue(Class<A> annotationClass, Class<T> memberType, String memberName)
           
<T,A extends Annotation>
List<T>
getAnnotatedValues(Class<A> annotationClass, Class<T> type, String memberName)
           
protected
<A extends Annotation>
Annotation
getAnnotation(Class<A> annotationClass)
           
protected  Object getAnnotationValue(Annotation annotation, String attributeName)
           
<A extends Annotation>
boolean
isAnnotationPresent(Class<A> annotationClass)
           
<A extends Annotation>
boolean
isAnnotationValuePresent(Class<A> annotationClass, String memberName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationFinder

public AnnotationFinder(Class<?> annotatedClass)
Method Detail

isAnnotationPresent

public <A extends Annotation> boolean isAnnotationPresent(Class<A> annotationClass)

isAnnotationValuePresent

public <A extends Annotation> boolean isAnnotationValuePresent(Class<A> annotationClass,
                                                               String memberName)

getAnnotatedValue

public <T,A extends Annotation> T getAnnotatedValue(Class<A> annotationClass,
                                                    Class<T> memberType,
                                                    String memberName)

getAnnotatedValues

public <T,A extends Annotation> List<T> getAnnotatedValues(Class<A> annotationClass,
                                                           Class<T> type,
                                                           String memberName)

createInheritMemberName

protected String createInheritMemberName(String memberName)
Creates the inherit member name by prefixing "inherit" to the capitalized member name.

Parameters:
memberName -
Returns:
The inherit member name

getAnnotatedClasses

public <T,A extends Annotation> List<Class<T>> getAnnotatedClasses(Class<A> annotationClass,
                                                                   Class<T> type,
                                                                   String memberName)

getAnnotation

protected <A extends Annotation> Annotation getAnnotation(Class<A> annotationClass)

getAnnotationValue

protected Object getAnnotationValue(Annotation annotation,
                                    String attributeName)


Copyright © 2003-2012. All Rights Reserved.