com.opensymphony.xwork2.util
Annotation Type Key


@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @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 userMap;
 
 

Version:
$Id: Key.java 894090 2009-12-27 18:18:29Z martinc $
Author:
Rainer Hermanns

Optional Element Summary
 java.lang.Class value
          The Key value.
 

value

public abstract java.lang.Class value
The Key value. Defaults to java.lang.Object.class.

Default:
java.lang.Object.class


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.