Arquillian Persistence Extension Implementation 1.0.0.Alpha4

org.jboss.arquillian.persistence.metadata
Class AnnotationInspector<T extends Annotation>

java.lang.Object
  extended by org.jboss.arquillian.persistence.metadata.AnnotationInspector<T>

public class AnnotationInspector<T extends Annotation>
extends Object

Author:
Bartosz Majsak

Constructor Summary
AnnotationInspector(org.jboss.arquillian.test.spi.TestClass testClass, Class<T> annotationClass)
           
 
Method Summary
 T fetchFrom(Method method)
           
 T fetchUsingFirst(Method testMethod)
          Fetches annotation for a given test class.
 T getAnnotationOnClassLevel()
           
 boolean isDefinedOn(Method method)
           
 boolean isDefinedOnAnyMethod()
           
 boolean isDefinedOnClassLevel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationInspector

public AnnotationInspector(org.jboss.arquillian.test.spi.TestClass testClass,
                           Class<T> annotationClass)
Method Detail

isDefinedOn

public boolean isDefinedOn(Method method)

isDefinedOnAnyMethod

public boolean isDefinedOnAnyMethod()

fetchFrom

public T fetchFrom(Method method)

isDefinedOnClassLevel

public boolean isDefinedOnClassLevel()

getAnnotationOnClassLevel

public T getAnnotationOnClassLevel()

fetchUsingFirst

public T fetchUsingFirst(Method testMethod)
Fetches annotation for a given test class. If annotation is defined on method level it's returned as a result. Otherwise class level annotation is returned if present.

Returns:
T annotation or null if not found.

Arquillian Persistence Extension Implementation 1.0.0.Alpha4

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.