dk.nversion.copybook.serializers.FullLastArrayShortMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of copybook4java Show documentation
Show all versions of copybook4java Show documentation
CopyBook serializer and deserializer for Java where CopyBook lines are used to annotate a normal Java class
The newest version!
/*
* Copyright (c) 2015. Troels Liebe Bentsen
* Licensed under the MIT license (LICENSE.txt)
*/
package dk.nversion.copybook.serializers;
public class FullLastArrayShortMapper extends FullMapper {
@Override
public void initialize(CopyBookSerializerConfig config) {
super.initialize(config);
CopyBookField lastField = this.fields.get(this.fields.size() - 1);
if (lastField.isArray()) {
lastField.setMinOccurs(0);
}
}
}