public class Injection extends Object
Constructor and Description |
---|
Injection() |
Modifier and Type | Method and Description |
---|---|
String |
getJndiName() |
String |
getMappingName() |
Member |
getTarget() |
Class |
getTargetClass() |
void |
inject(Object injectable)
Inject a value for a Resource from JNDI into an object
|
void |
injectField(Field field,
Object injectable)
Inject value from jndi into a field of an instance
|
void |
injectMethod(Method method,
Object injectable)
Inject value from jndi into a setter method of an instance
|
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,
String targetName,
Class targetType) |
void |
setTarget(Member target) |
void |
setTargetClass(Class clazz) |
public Class getTargetClass()
public void setTargetClass(Class clazz)
name
- the _className to setpublic 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 setTarget(Member target)
target
- the target to setpublic void inject(Object injectable)
injectable
- Exception
public Object lookupInjectedValue() throws NamingException
Exception
NamingException
public void injectField(Field field, Object injectable)
field
- injectable
- Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.