public class Injection extends Object
Constructor and Description |
---|
Injection() |
Modifier and Type | Method and Description |
---|---|
String |
getJndiName() |
String |
getMappingName() |
Class<?> |
getParamClass() |
Class<?> |
getResourceClass() |
Member |
getTarget() |
Class<?> |
getTargetClass() |
void |
inject(Object injectable)
Inject a value for a Resource from JNDI into an object
|
protected void |
injectField(Field field,
Object injectable)
Inject value from jndi into a field of an instance
|
protected void |
injectMethod(Method method,
Object injectable)
Inject value from jndi into a setter method of an instance
|
boolean |
isField() |
boolean |
isMethod() |
Object |
lookupInjectedValue()
The Resource must already exist in the ENC of this webapp.
|
void |
setJndiName(String jndiName) |
void |
setMappingName(String mappingName) |
void |
setTarget(Class<?> clazz,
Field field,
Class<?> resourceType) |
void |
setTarget(Class<?> clazz,
Method method,
Class<?> arg,
Class<?> resourceType) |
void |
setTarget(Class<?> clazz,
String target,
Class<?> resourceType) |
public Class<?> getTargetClass()
public Class<?> getParamClass()
public Class<?> getResourceClass()
public boolean isField()
public boolean isMethod()
public String getJndiName()
public void setJndiName(String jndiName)
jndiName
- the jndiName to setpublic String getMappingName()
public void setMappingName(String mappingName)
mappingName
- the mappingName to setpublic Member getTarget()
public void inject(Object injectable)
injectable
- public Object lookupInjectedValue() throws NamingException
NamingException
protected void injectField(Field field, Object injectable)
field
- injectable
- Copyright © 1995-2015 Webtide. All Rights Reserved.