com.univocity.parsers.annotations.helpers
Class TransformedHeader

java.lang.Object
  extended by com.univocity.parsers.annotations.helpers.TransformedHeader

public class TransformedHeader
extends Object

A pair associating a Field of an annotated class to an optional HeaderTransformer obtained from Nested.headerTransformer() when nested classes are used to process beans.

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

Constructor Summary
TransformedHeader(AnnotatedElement target, HeaderTransformer transformer)
           
 
Method Summary
 String describe()
           
 int getHeaderIndex()
          Returns the index that determines which column the current field represents, as specified by Parsed.index()
 String getHeaderName()
          Returns the name to be used as a header based on a given field and its Parsed annotation.
 AnnotatedElement getTarget()
          Returns the AnnotatedElement used to read/write values from/to.
 String getTargetName()
          Returns the original attribute name of the field in its containing class.
 boolean isReadOly()
          Returns true if this AnnotatedElement is a Method with no parameters and a return type which can only be used for reading values from the java bean.
 boolean isWriteOnly()
          Returns true if this AnnotatedElement is a Method with parameters and can only be used for writing values into the java bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformedHeader

public TransformedHeader(AnnotatedElement target,
                         HeaderTransformer transformer)
Method Detail

getHeaderName

public String getHeaderName()
Returns the name to be used as a header based on a given field and its Parsed annotation.

Returns:
the header name to be used for the given field.

getHeaderIndex

public int getHeaderIndex()
Returns the index that determines which column the current field represents, as specified by Parsed.index()

Returns:
the current header index.

getTargetName

public String getTargetName()
Returns the original attribute name of the field in its containing class.

Returns:
the original attribute name of the field

getTarget

public AnnotatedElement getTarget()
Returns the AnnotatedElement used to read/write values from/to.

Returns:
the field or method being manipulated by the parser/writer when processing java beans

isWriteOnly

public boolean isWriteOnly()
Returns true if this AnnotatedElement is a Method with parameters and can only be used for writing values into the java bean.

Returns:
a flag indicating whether this is a method that allows writing values only.

isReadOly

public boolean isReadOly()
Returns true if this AnnotatedElement is a Method with no parameters and a return type which can only be used for reading values from the java bean.

Returns:
a flag indicating whether this is a method that allows reading values only.

describe

public String describe()


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