|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.plus.annotation.Injection
public class Injection
Injection Represents the injection of a resource into a target (method or field). The injection is performed by doing an ENC lookup using the jndi name provided, and setting the object obtained on the target.
Constructor Summary | |
---|---|
Injection()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Injection()
Method Detail |
---|
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 setTarget(Class<?> clazz, Field field, Class<?> resourceType)
public void setTarget(Class<?> clazz, Method method, Class<?> arg, Class<?> resourceType)
public void setTarget(Class<?> clazz, String target, Class<?> resourceType)
public void inject(Object injectable)
injectable
- public Object lookupInjectedValue() throws NamingException
NamingException
protected void injectField(Field field, Object injectable)
field
- injectable
- protected void injectMethod(Method method, Object injectable)
method
- injectable
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |