java.lang.Object
cl.netswitch.iso.vip8583.VipFields<M>
- Type Parameters:
M
- the type of the VIP message.
Definition of all data elements of a VIP message.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Adds a field to the collection of fields.final void
add
(VipField<M, ?> field, VipObfuscate obfuscate) Adds a field to the collection of fields with obfuscate option.get
(int index) Returns the field indexed by the specified ID.final void
writeClass
(String name, PrintStream writer) Generates a class that implements a message for defined fields.final void
writeClass
(String name, String dePrefix, PrintStream writer) Generates a class that implements a message for defined fields and prefix.
-
Constructor Details
-
VipFields
public VipFields(int maxFieldIndex) Constructs a newVipFields
instance.- Parameters:
maxFieldIndex
- the maximum field index of a message.- Throws:
IllegalArgumentException
- ifmaxFieldIndex
is negative.
-
-
Method Details
-
get
Returns the field indexed by the specified ID.- Parameters:
index
- the index of the required field.- Returns:
- the field or
null
if not defined. - Throws:
IndexOutOfBoundsException
- ifindex
is out-of-bounds.
-
add
Adds a field to the collection of fields.- Parameters:
field
- the field to be added to be collection.- Throws:
NullPointerException
- iffield
isnull
.IndexOutOfBoundsException
- if field index is out-of-bounds.IllegalArgumentException
- if field index is already defined.
-
add
Adds a field to the collection of fields with obfuscate option.- Parameters:
field
- the field to be added to be collection.obfuscate
- the obfuscate option of thefield
.- Throws:
NullPointerException
- if an argument isnull
.IndexOutOfBoundsException
- if field index is out-of-bounds.IllegalArgumentException
- if field index is already defined.
-
writeClass
Generates a class that implements a message for defined fields.- Parameters:
name
- the name of the class to be generated.writer
- the writer used to write the generated class.- Throws:
NullPointerException
- if an argument isnull
.
-
writeClass
Generates a class that implements a message for defined fields and prefix.- Parameters:
name
- the name of the class to be generated.dePrefix
- the data element (DE) prefix (can be null).writer
- the writer used to write the generated class.- Throws:
NullPointerException
- if an argument isnull
.
-