@Retention(value=RUNTIME) @Inherited @Target(value={TYPE,ANNOTATION_TYPE}) public @interface Headers
Headers
annotation allows java beans to configure how to handle field names in a given input/output
With this annotation, you can configure the sequence of headers to use when reading/writing:
sequence()
of header names will be used to refer to each column, irrespective of whether or not the input contains a header row.
If empty, and no headers have been defined in CommonSettings.getHeaders()
, the parser will automatically use the first row in the input as the header row,
unless the fields in the bean have been annotated using Parsed.index()
only.
sequence()
of names will be used to refer to each column and will be used for writing the header row if write()
is enabled.
If empty, and no headers have been defined in CommonSettings.getHeaders()
, the names given by attributes annotated with Parsed.field()
will be used.
This annotation has no effect if CommonSettings.isAutoConfigurationEnabled()
evaluates to false
.
BeanWriterProcessor
,
BeanProcessor
Modifier and Type | Optional Element and Description |
---|---|
boolean |
extract
Indicates whether the first row of on the input should be extracted as a header row.
|
String[] |
sequence
Returns the sequence of header names in the input/output
|
boolean |
write
Indicates whether a row with headers should be written to the output.
|
public abstract String[] sequence
Copyright © 2023 Univocity Software Pty Ltd. All rights reserved.