com.ibm.jzos.fields
Class AssemblerDatatypeFactory

java.lang.Object
  extended by com.ibm.jzos.fields.DatatypeFactory
      extended by com.ibm.jzos.fields.AssemblerDatatypeFactory

public class AssemblerDatatypeFactory
extends DatatypeFactory

Concrete implementation of DatatypeFactory with Assembler Field related factory methods. A running offset to the next field is maintained, along with a stack which can be used to push and pop the current Field offset. A DatatypeFactory is typically used to statically initialize static Field variables in a Java class which maps a record described by a byte array. For an example, see Format1DSCB.

See Also:
DatatypeFactory

Field Summary
 
Fields inherited from class com.ibm.jzos.fields.DatatypeFactory
maximumOffset, offset, stringEncoding, stringTrimDefault
 
Constructor Summary
AssemblerDatatypeFactory()
           
 
Method Summary
 BinaryAsIntField getBinaryAsIntField(int length, boolean signed)
          Construct and return a BinaryAsIntField, advancing the current offset by its byte length.
 BinaryAsLongField getBinaryAsLongField(int length, boolean signed)
          Construct and return a BinaryAsLongField, advancing the current offset by its byte length.
 Field getBinaryField(int length, boolean signed)
          Construct and return either a BinaryAsIntField or a BinaryAsLongField, depending on the length.
 IbmDoubleField getIbmDoubleField()
          Construct and return an IbmDoubleField.
 IbmFloatField getIbmFloatField()
          Construct and return an IbmFloatField.
 PackedDecimalAsBigDecimalField getPackedDecimalAsBigDecimalField(int length, int scale, boolean signed)
          Construct and return a PackedDecimalAsBigDecimalField, advancing the current offset by its byte length.
 PackedDecimalAsBigIntegerField getPackedDecimalAsBigIntegerField(int length, int scale, boolean signed)
          Construct and return a PackedDecimalAsBigIntegerField, advancing the current offset by its byte length.
 PackedDecimalAsIntField getPackedDecimalAsIntField(int length, boolean signed)
          Construct and return a PackedDecimalAsIntField, advancing the current offset by its byte length.
 PackedDecimalAsLongField getPackedDecimalAsLongField(int length, boolean signed)
          Construct and return a PackedDecimalAsLongField, advancing the current offset by its byte length.
 Field getPackedDecimalField(int length, int scale, boolean signed)
          Construct and return either a packed decimal Field, depending on the length and scale requested.
 Field getZonedDecimalField(int length, int scale, boolean signed)
          Construct and return either a zoned decimal Field, depending on the length and scale requested.
 
Methods inherited from class com.ibm.jzos.fields.DatatypeFactory
advanceOffset, getByteArrayField, getExternalDecimalAsBigDecimalField, getExternalDecimalAsBigDecimalField, getExternalDecimalAsBigIntegerField, getExternalDecimalAsBigIntegerField, getExternalDecimalAsIntField, getExternalDecimalAsIntField, getExternalDecimalAsLongField, getExternalDecimalAsLongField, getMaximumOffset, getOffset, getStringEncoding, getStringField, getStringField, getStringField, getStringField, getStringField, getStringTrimDefault, incrementOffset, popOffset, pushOffset, setOffset, setStringEncoding, setStringTrimDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssemblerDatatypeFactory

public AssemblerDatatypeFactory()
Method Detail

getBinaryAsLongField

public BinaryAsLongField getBinaryAsLongField(int length,
                                              boolean signed)
Construct and return a BinaryAsLongField, advancing the current offset by its byte length.

Parameters:
length - int the length of the field in bytes
signed - boolean true if the field is signed, false if unsigned.
Returns:
BinaryAsLongField
See Also:
BinaryAsLongField

getBinaryAsIntField

public BinaryAsIntField getBinaryAsIntField(int length,
                                            boolean signed)
Construct and return a BinaryAsIntField, advancing the current offset by its byte length.

Parameters:
length - int the length of the field in bytes
signed - boolean true if the field is signed, false if unsigned.
Returns:
BinaryAsIntField
See Also:
BinaryAsIntField

getBinaryField

public Field getBinaryField(int length,
                            boolean signed)
Construct and return either a BinaryAsIntField or a BinaryAsLongField, depending on the length. Advance the current offset by its byte length.

Parameters:
length - int the length of the field in bytes
signed - boolean true if the field is signed, false if unsigned.
Returns:
Field
See Also:
BinaryAsIntField, BinaryAsLongField

getPackedDecimalField

public Field getPackedDecimalField(int length,
                                   int scale,
                                   boolean signed)
Construct and return either a packed decimal Field, depending on the length and scale requested. Advance the current offset by its byte length.

Parameters:
length - int the length of the field in bytes
scale - int the number of digits to the right of the decimal point
signed - boolean true if the field is signed, false if unsigned.
Returns:
Field
See Also:
PackedDecimalAsIntField, PackedDecimalAsLongField, PackedDecimalAsBigIntegerField, PackedDecimalAsBigDecimalField

getPackedDecimalAsBigDecimalField

public PackedDecimalAsBigDecimalField getPackedDecimalAsBigDecimalField(int length,
                                                                        int scale,
                                                                        boolean signed)
Construct and return a PackedDecimalAsBigDecimalField, advancing the current offset by its byte length.

Parameters:
length - the size of the field in bytes
scale - the number of implied decimal digits to the right of the decimal point
signed - boolean true if the value is signed
Returns:
PackedDecimalAsBigDecimalField
See Also:
PackedDecimalAsBigDecimalField.PackedDecimalAsBigDecimalField(int, int, int, boolean)

getPackedDecimalAsBigIntegerField

public PackedDecimalAsBigIntegerField getPackedDecimalAsBigIntegerField(int length,
                                                                        int scale,
                                                                        boolean signed)
Construct and return a PackedDecimalAsBigIntegerField, advancing the current offset by its byte length.

Parameters:
length - the size of the field in bytes
scale - the number of implied decimal digits to the right of the decimal point
signed - boolean true if the value is signed
Returns:
PackedDecimalAsBigIntegerField
See Also:
PackedDecimalAsBigIntegerField.PackedDecimalAsBigIntegerField(int, int, int, boolean)

getPackedDecimalAsIntField

public PackedDecimalAsIntField getPackedDecimalAsIntField(int length,
                                                          boolean signed)
Construct and return a PackedDecimalAsIntField, advancing the current offset by its byte length.

Parameters:
length - the size of the field in bytes
signed - boolean true if the value is signed
Returns:
PackedDecimalAsIntField
See Also:
PackedDecimalAsIntField.PackedDecimalAsIntField(int, int, boolean)

getPackedDecimalAsLongField

public PackedDecimalAsLongField getPackedDecimalAsLongField(int length,
                                                            boolean signed)
Construct and return a PackedDecimalAsLongField, advancing the current offset by its byte length.

Parameters:
length - the size of the field in bytes
signed - boolean true if the value is signed
Returns:
PackedDecimalAsLongField
See Also:
PackedDecimalAsLongField.PackedDecimalAsLongField(int, int, boolean)

getZonedDecimalField

public Field getZonedDecimalField(int length,
                                  int scale,
                                  boolean signed)
Construct and return either a zoned decimal Field, depending on the length and scale requested. Advance the current offset by its byte length.

Parameters:
length - int the length of the field in bytes
scale - int the number of digits to the right of the decimal point
signed - boolean true if the field is signed, false if unsigned.
Returns:
Field
See Also:
ExternalDecimalAsIntField, ExternalDecimalAsLongField, ExternalDecimalAsBigIntegerField, ExternalDecimalAsBigDecimalField

getIbmFloatField

public IbmFloatField getIbmFloatField()
Construct and return an IbmFloatField. Advance the current offset by its byte length.

Returns:
IbmFloatField

getIbmDoubleField

public IbmDoubleField getIbmDoubleField()
Construct and return an IbmDoubleField. Advance the current offset by its byte length.

Returns:
IbmFloatField