Top Description Methods
com.univocity.parsers.annotations

public @Interface Headers

extends Annotation
Annotations
@Retention:RUNTIME
@Inherited
@Target:TYPE, ANNOTATION_TYPE
Imports
com.univocity.parsers.common.*, com.univocity.parsers.common.processor.*, java.lang.annotation.*

The 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:

This annotation has no effect if CommonSettings#isAutoConfigurationEnabled() evaluates to false.

Author
Univocity Software Pty Ltd - [email protected]
See Also
BeanWriterProcessor, BeanProcessor

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

a flag indicating whether to extract the headers from the first valid row when reading. If
extract
()

Indicates whether the first row of on the input should be extracted as a header row.

public String[]

Returns:

the sequence of header names in the input/output
sequence
()

Returns the sequence of header names in the input/output

public boolean

Returns:

a flag indicating whether to write the headers to the output when writing instances of a java bean.
write
()

Indicates whether a row with headers should be written to the output.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

extractback to summary
public boolean extract()

Indicates whether the first row of on the input should be extracted as a header row.

Returns:boolean

a flag indicating whether to extract the headers from the first valid row when reading. If

sequenceback to summary
public String[] sequence()

Returns the sequence of header names in the input/output

Returns:String[]

the sequence of header names in the input/output

writeback to summary
public boolean write()

Indicates whether a row with headers should be written to the output.

Returns:boolean

a flag indicating whether to write the headers to the output when writing instances of a java bean.