com.univocity.parsers.annotations
Annotation Type Nested


@Retention(value=RUNTIME)
@Inherited
@Target(value={FIELD,METHOD,ANNOTATION_TYPE})
public @interface Nested

Marks a field as a nested object to be constructed with the values of the current row. It is expected that the annotated attribute is of a type, or provides an explicit type via the type() option, that contains one or more Parsed annotations. The given type and its Parsed annotations will determine which fields from each row should be used to populate the Nested instance.

Author:
uniVocity Software Pty Ltd - parsers@univocity.com

Optional Element Summary
 String[] args
          An optional sequence of arguments for creating an instance of the given headerTransformer().
 Class<? extends HeaderTransformer> headerTransformer
          Provides a HeaderTransformer for reassigning header names/positions of the nested class.
 Class type
          Defines the concrete type of nested object to be instantiated, if it has to be a subclass of the declared attribute type.
 

type

public abstract Class type
Defines the concrete type of nested object to be instantiated, if it has to be a subclass of the declared attribute type.

Returns:
the type of nested object to be instantiated.
Default:
java.lang.Object.class

headerTransformer

public abstract Class<? extends HeaderTransformer> headerTransformer
Provides a HeaderTransformer for reassigning header names/positions of the nested class.

Returns:
a transformation to be applied over headers/positions of the nested class. Used for reassigning specific input columns so the correct values end up in the correct nested attributes.
Default:
com.univocity.parsers.annotations.HeaderTransformer.class

args

public abstract String[] args
An optional sequence of arguments for creating an instance of the given headerTransformer().

Returns:
the initialization arguments passed into the constructore of the HeaderTransformer
Default:
{}


Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.