|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher
public class EJBInjectionEnricher
Enricher that provide EJB class and setter method injection.
Constructor Summary | |
---|---|
EJBInjectionEnricher()
|
Method Summary | |
---|---|
protected Context |
createContext()
|
void |
enrich(Object testCase)
Extension point to add features to the a Test class instance. IE. |
protected List<Field> |
getFieldsWithAnnotation(Class<?> clazz,
Class<? extends Annotation> annotation)
Obtains all field in the specified class which contain the specified annotation |
protected void |
injectClass(Object testCase)
|
protected Object |
lookupEJB(String[] jndiNames)
|
Object[] |
resolve(Method method)
Extension point to add features to the test method arguments. IE. |
protected String[] |
resolveJNDINames(Class<?> fieldType,
String mappedName,
String beanName)
Resolves the JNDI name of the given field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EJBInjectionEnricher()
Method Detail |
---|
public void enrich(Object testCase)
TestEnricher
enrich
in interface TestEnricher
testCase
- The test case instancepublic Object[] resolve(Method method)
TestEnricher
TestEnricher
.
resolve
in interface TestEnricher
protected List<Field> getFieldsWithAnnotation(Class<?> clazz, Class<? extends Annotation> annotation) throws IllegalArgumentException
clazz
- annotation
-
IllegalArgumentException
- If either argument is not specifiedprotected void injectClass(Object testCase)
protected String[] resolveJNDINames(Class<?> fieldType, String mappedName, String beanName)
IllegalStateException
will be thrown.
fieldType
- annotated field which JNDI name should be resolved.mappedName
- Value of EJB
's mappedName attribute.beanName
- Value of EJB
's beanName attribute.
protected Object lookupEJB(String[] jndiNames) throws Exception
Exception
protected Context createContext() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |