Package org.jboss.logging.annotations

# Annotation Type Field

@Retention(CLASS) @Target({PARAMETER,METHOD}) @Repeatable(Fields.class) @Documented public @interface Field
Indicate that a method parameter value should be applied to a field 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 filed on the resultant exception object.

Author:
  David M. Lloyd, James R. Perkins

## Optional Element Summary

Optional Elements
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.

## Element Details

### name

String name
The field name. If not specified, the parameter name is assumed to be the field name.

This becomes a required attrubyte if this annotation is present on a method.

Returns:
  the field name

Default:
  ""

### booleanValue

boolean booleanValue
The default `boolean` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  false

### byteValue

byte byteValue
The default boolean value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  (byte)0x00

### charValue

char charValue
The default `byte` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  '\u0000'

### classValue

Class<?> classValue
The default `Class` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  java.lang.Object.class

### doubleValue

double doubleValue
The default `double` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  0.0

### floatValue

float floatValue
The default `float` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  0.0f

### intValue

int intValue
The default `int` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  0

### longValue

long longValue
The default `long` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  0L

### shortValue

short shortValue
The default `short` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  0

### stringValue

String stringValue
The default `String` value if this annotation is used on a method.

Returns:
  the default value to use

Default:
  ""