public class EJBInjectionEnricher extends Object implements TestEnricher
| Constructor and Description |
|---|
EJBInjectionEnricher() |
| Modifier and Type | Method and Description |
|---|---|
protected Context |
createContext() |
void |
enrich(Object testCase) |
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) |
protected String[] |
resolveJNDINames(Class<?> fieldType,
String mappedName,
String beanName)
Resolves the JNDI name of the given field.
|
public void enrich(Object testCase)
enrich in interface TestEnricherpublic Object[] resolve(Method method)
resolve in interface TestEnricherprotected 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.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.