Top Annotations Classes
[default module]

Package com.univocity.parsers.annotations


Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
BooleanString

Indicates that parsed values such as "y", "No" or "null" should be interpreted as boolean values.

public @interface
Convert

Assigns a custom implementation of Conversion to be executed (Conversion#execute(Object)) when writing to the field and reverted (Conversion#revert(Object)) when reading from the field.

public @interface
Copy

Allows copying values of meta-annotation properties into the properties of an annotation that composes it.

public @interface
EnumOptions

The EnumSelector annotation is meant to be used in conjunction with enumeration attributes.

public @interface
FixedWidth

The @FixedWidth annotation, along with the Parsed annotation, allows users to configure the length, alignment and padding of fields parsed/written using the FixedWidthParser and FixedWidthWriter

Commonly used for java beans processed using BeanProcessor and/or BeanWriterProcessor

public @interface
Format

Indicates that a parsed value is formatted and must be parsed before being assigned.

public @interface
Headers

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:

  • when reading, the given 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.
  • when writing, the given 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.
public @interface
LowerCase

Indicates the String value of a field must be converted to lower case using LowerCaseConversion.

public @interface
Nested

Marks a field as a nested object to be constructed with the values of the current row.

public @interface
NullString

Indicates that parsed values such as "", "?" or "null" should be interpreted as null.

public @interface
Parsed

Indicates the field is parsed.

public @interface
Replace

Indicates the String value of a field must have some of its contents replaced using RegexConversion.

public @interface
Trim

Indicates the String value of a field must be trimmed using TrimConversion.

public @interface
UpperCase

Indicates the String value of a field must be converted to uppercase using UpperCaseConversion.

public @interface
Validate

Performs basic validations against the String representation of the value found in the annotated field.

Class Summary

Modifier and TypeClass and Description
public abstract class
HeaderTransformer

A transformer of headers used in Nested attributes.