Package org.jdesktop.application

# Class ResourceMap.InjectFieldException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jdesktop.application.ResourceMap.InjectFieldException

All Implemented Interfaces:
  `Serializable`

Enclosing class:
  `ResourceMap`

public static class ResourceMap.InjectFieldException extends RuntimeException
Unchecked exception thrown by `ResourceMap.injectFields(java.lang.Object)` when an error occurs while attempting to set a field (a field that had been marked with `@Resource`).

See Also:
  - `ResourceMap.injectFields(java.lang.Object)`
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`InjectFieldException(String msg, Field field, Object target, String key)`
Constructs an instance of this class with some useful information about the failure.

## Method Summary

Modifier and Type
Method
Description
`Field`
`getField()`
Return the Field whose value couldn't be set.
`String`
`getKey()`
Returns the type of the name of resource for which lookup failed.
`Object`
`getTarget()`
Return the Object whose Field we were attempting to set

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### InjectFieldException

public InjectFieldException(String msg, Field field, Object target, String key)
Constructs an instance of this class with some useful information about the failure.

Parameters:
  `msg` - the detail message
  `field` - the Field we were attempting to set
  `target` - the object whose field we were attempting to set
  `key` - the name of the resource

## Method Details

### getField

public Field getField()
Return the Field whose value couldn't be set.

Returns:
  the field whose value couldn't be set

### getTarget

public Object getTarget()
Return the Object whose Field we were attempting to set

Returns:
  the Object whose Field we were attempting to set

### getKey

public String getKey()
Returns the type of the name of resource for which lookup failed.

Returns:
  the resource name