@Retention(CLASS) @Target({PARAMETER,METHOD}) @Repeatable(Fields.class) @Documented public @interface Field
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 filed on the resultant exception object.
Modifier and Type | Optional Element | Description |
---|---|---|
boolean |
booleanValue |
The default
boolean value if this annotation is used on a method. |
byte |
byteValue |
The default boolean value if this annotation is used on a method.
|
char |
charValue |
The default
byte value if this annotation is used on a method. |
Class<?> |
classValue |
The default
Class value if this annotation is used on a method. |
double |
doubleValue |
The default
double value if this annotation is used on a method. |
float |
floatValue |
The default
float value if this annotation is used on a method. |
int |
intValue |
The default
int value if this annotation is used on a method. |
long |
longValue |
The default
long value if this annotation is used on a method. |
String |
name |
The field name.
|
short |
shortValue |
The default
short value if this annotation is used on a method. |
String |
stringValue |
The default
String value if this annotation is used on a method. |
String name
This becomes a required attrubyte if this annotation is present on a method.
boolean booleanValue
boolean
value if this annotation is used on a method.byte byteValue
char charValue
byte
value if this annotation is used on a method.double doubleValue
double
value if this annotation is used on a method.float floatValue
float
value if this annotation is used on a method.int intValue
int
value if this annotation is used on a method.long longValue
long
value if this annotation is used on a method.Copyright © 2018. All rights reserved.