public class EJBInjectionEnricher extends Object implements TestEnricher
Constructor and Description |
---|
EJBInjectionEnricher() |
Modifier and Type | Method and Description |
---|---|
protected String |
attemptToGet31LookupField(javax.ejb.EJB annotation) |
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 String[] |
getJndiNamesForAnonymousEJB(Class<?> fieldType) |
protected void |
injectClass(Object testCase) |
protected Object |
lookupEJB(String[] jndiNames) |
Object[] |
resolve(Method method) |
protected String[] |
resolveJNDINames(Class<?> fieldType,
String mappedName,
String beanName,
String lookup)
Resolves the JNDI name of the given field.
|
public void enrich(Object testCase)
enrich
in interface TestEnricher
public Object[] resolve(Method method)
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 attemptToGet31LookupField(javax.ejb.EJB annotation) throws IllegalAccessException, InvocationTargetException
protected String[] resolveJNDINames(Class<?> fieldType, String mappedName, String beanName, String lookup)
EJB
annotation attributes is specified at the same time, an 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.lookup
- Value of EJB
's lookup attribute.Copyright © 2016 JBoss by Red Hat. All rights reserved.