Package org.beanio.annotation
Annotation Type Field
-
@Retention(RUNTIME) @Target({FIELD,METHOD,PARAMETER}) public @interface Field
Field annotation applied to class attributes, methods or constructor parameters.- Since:
- 2.1.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Align
align
The alignment of a padded field.int
at
Sets the absolute position of the field.java.lang.Class<?>
collection
The collection type for repeating fields, if it cannot be detected from the field or method declaration.java.lang.String
defaultValue
The default value for this field.java.lang.String
format
The format passed to theTypeHandler
.java.lang.String
getter
The getter method.java.lang.Class<?>
handlerClass
TheTypeHandler
implementation class for this field.java.lang.String
handlerName
The name of a registeredTypeHandler
.boolean
keepPadding
Whether to keep the field padding during unmarshalling.boolean
lazy
Whether an empty string should be converted to null, or null returned for an empty collection.int
length
The padded length of the field.boolean
lenientPadding
Whether to enforce the padding length during unmarshalling.java.lang.String
literal
The literal text for validating or matching field text.int
maxLength
The maximum length of the field text (after trimming if enabled).int
maxOccurs
The maximum occurrences of the field if it repeats.int
minLength
The minimum length of the field text (after trimming if enabled).int
minOccurs
The minimum occurrences of the field.java.lang.String
name
The field name.boolean
nillable
Whether the element is nillable.java.lang.String
occursRef
The name of a preceding field that governs the number of occurrences of this field.int
ordinal
The relative position of the field.int
padding
The character used to pad the field.java.lang.String
regex
The regular expression for validating and/or matching field text.boolean
required
Whether field text is required.boolean
rid
Whether the field is used to identify the record.java.lang.String
setter
The setter method.boolean
trim
Whether to trim the field text before validation and type handling.java.lang.Class<?>
type
The field type, if it can not be detected from the method or field declaration.int
until
Sets the maximum position of a field that repeats for an indeterminate number of times.java.lang.String
xmlName
The XML attribute or element name.java.lang.String
xmlNamespace
The XML namespace URI of this field.java.lang.String
xmlPrefix
The XML namespace prefix of this field.XmlType
xmlType
The XML type of this field.
-
-
-
-
handlerClass
java.lang.Class<?> handlerClass
TheTypeHandler
implementation class for this field.- Returns:
- the type handler class
- Default:
- java.lang.Void.class
-
-
-
handlerName
java.lang.String handlerName
The name of a registeredTypeHandler
.- Returns:
- the type handler name
- Default:
- ""
-
-
-
format
java.lang.String format
The format passed to theTypeHandler
.- Returns:
- the format pattern
- Default:
- ""
-
-