public static class ResourceMap.InjectFieldException
extends java.lang.RuntimeException
ResourceMap.injectFields(java.lang.Object)
when
an error occurs while attempting to set a field (a field that
had been marked with @Resource).Constructor and Description |
---|
InjectFieldException(java.lang.String msg,
java.lang.reflect.Field field,
java.lang.Object target,
java.lang.String key)
Constructs an instance of this class with some useful information
about the failure.
|
Modifier and Type | Method and Description |
---|---|
java.lang.reflect.Field |
getField()
Return the Field whose value couldn't be set.
|
java.lang.String |
getKey()
Returns the type of the name of resource for which lookup failed.
|
java.lang.Object |
getTarget()
Return the Object whose Field we were attempting to set
|
public InjectFieldException(java.lang.String msg, java.lang.reflect.Field field, java.lang.Object target, java.lang.String key)
msg
- the detail messagefield
- the Field we were attempting to settarget
- the object whose field we were attempting to setkey
- the name of the resourcepublic java.lang.reflect.Field getField()
public java.lang.Object getTarget()
public java.lang.String getKey()