Annotations

Annotations is used to instruct the manager on how to handle properties when loading and exporting classes to and from strings.
See the complete list of annotations here:

Record

Record annotations is used on classes.
It marks that the class contains additional Field annotations on its getter methods and can be imported and exported to and from string representation using the FixedFormatManager

Record
Attribute Default Type Required Description
length -1 int no Defines a minimum length the string represenation of a class should have.
If the string initially is shorter thatn the given length the string is padded with the given paddingChar
paddingChar ' ' char no The paddingChar to use if padding is needed.

Field

Field annotations are used on getter methods. It contains basic mapping instructions and it is required for getter/setter pairs that is supposed to be mapped to and from string representation.

Field
Attribute Default Type Required Description
offset - int yes Defines the offset in a string where the data for this field starts.
length - int yes Defines the length for this field in string representation.
align Align. LEFT Align no Defines how to align the field value when it is represented as a string.
paddingChar ' ' char no The character to pad with if the given length is longer than the field value in string representation.
formatter ByTypeFormatter .class Class<FixedFormatter> no The formatter to use when reading and writing the field to and from string representation.

Fields

Fields annotations are used on getter methods in case a single field maps to more than just one position in a string.

Fields
Attribute Default Type Required Description
value - Field[] yes If a single field is mapped more than once in a string a Fields annotation can be used to describe this.
Not: when reading the field from a string only the first Field annotation in the array will be read.

FixedFormatBoolean

FixedFormatBoolean annotations are used on getter methods. It is optional and is used when the datatype to map is a Boolean object.

FixedFormatBoolean
Attribute Default Type Required Description
trueValue "T" String no Defines how a field should be represented when the field is a equal to java.lang.Boolean.TRUE
falseValue "F" String no Defines how a field should be represented when the field is a equal to java.lang.Boolean.FALSE

FixedFormatNumber

description on its way...

FixedFormatNumber
Attribute Default Type Required Description
sign Sign.NOSIGN Sign no Defines if and how a number field should be signed when represented as a string. Besides the default no signing, it is possible to append or prepend a sign.
positiveSign '+' char no Defines the character representing a positive sign.
negativeSign '-' char no Defines the character representing a negative sign.

FixedFormatDecimal

description on its way...

FixedFormatDecimal
Attribute Default Type Required Description
decimals 2 int no Defines the number of decimals the field contains.
useDecimalDelimiter false boolean no Defines if the field contains a decimal delimiter when represented as a string.
decimalDelimiter '.' char no Defines the decimal delimiter to use if the useDecimalDelimiter equals to true

FixedFormatPattern

description on its way...

FixedFormatPattern
Attribute Default Type Required Description
value - String yes Defines pattern to use when parsing and formatting the field intro string representation.
This is currently only used to format dates using the same patterns the SimpleDateFormatter uses