com.ibm.jzos.fields

Class 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.

    Since:
    2.1.0
    See Also:
    DatatypeFactory
    • 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 a PackedDecimalAs<*>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 in the fractional part of the field
        signed - boolean true if the field is signed, false if unsigned.
        Returns:
        Field
        See Also:
        PackedDecimalAsIntField, PackedDecimalAsLongField, PackedDecimalAsBigIntegerField, PackedDecimalAsBigDecimalField
      • 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
© Copyright IBM Corporation 2005, 2014.