-
@Retention(CLASS) @Target({PARAMETER,METHOD}) @Repeatable(Properties.class) @Documented public @interface Property
Indicate that a method parameter value should be applied to a property (with a setter method) on the resultant exception object.If this annotation is placed on a method the name attribute becomes a required parameter and one default attribute needs to be set. The value of the default attribute is used to set the property on the resultant exception object.
- Author:
- David M. Lloyd, James R. Perkins
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanbooleanValueThe defaultbooleanvalue if this annotation is used on a method.bytebyteValueThe default boolean value if this annotation is used on a method.charcharValueThe defaultbytevalue if this annotation is used on a method.Class<?>classValueThe defaultClassvalue if this annotation is used on a method.doubledoubleValueThe defaultdoublevalue if this annotation is used on a method.floatfloatValueThe defaultfloatvalue if this annotation is used on a method.intintValueThe defaultintvalue if this annotation is used on a method.longlongValueThe defaultlongvalue if this annotation is used on a method.StringnameThe property name.shortshortValueThe defaultshortvalue if this annotation is used on a method.StringstringValueThe defaultStringvalue if this annotation is used on a method.
-
-
-
Element Detail
-
name
String name
The property name. If not specified, the parameter name is assumed to be the property name.This becomes a required attribute if this annotation is present on a method.
- Returns:
- the property name
- Default:
- ""
-
-