Package org.apache.struts2.util
Annotation Interface Key
Sets the Key for type conversion.
Annotation usage:
The Key annotation must be applied at field or method level.
Annotation parameters:
| Parameter | Required | Default | Description | 
|---|---|---|---|
| value | no | java.lang.Object.class | The key property value. | 
Example code:
 
 // The key property for User objects within the users collection is the userName attribute.
 @Key( value = java.lang.Long.class )
 private Map<Long, User> userMap;
 
 - Author:
- Rainer Hermanns
- 
Optional Element SummaryOptional Elements
- 
Element Details- 
valueClass value- Returns:
- The Key value. Defaults to java.lang.Object.class.
 - Default:
- java.lang.Object.class
 
 
-