
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 TestEnricherpublic Object[] resolve(Method method)
resolve in interface TestEnricherprotected List<Field> getFieldsWithAnnotation(Class<?> clazz, Class<? extends Annotation> annotation) throws IllegalArgumentException
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)
If mappedName, lookup or beanName are specified, they're used to resolve JNDI name. Otherwise, default policy applies.
If more than one of the mappedName, lookup and beanName 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 © 2020 JBoss by Red Hat. All rights reserved.