Interface FieldManager


public interface FieldManager
Provides field management functionality, including field name/number mapping.

Each managed field is represented by a FieldInfo instance, and is available using the getter methods by name and field number.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The maximum number of fields that can be used.
    static final int
    The maximum field number for any field.
    static final int
    The minimum field number for any field.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addField(String name, int number)
    Adds a new field to this FieldManager.
    Gets the FieldInfo for a field, given a field name.
    Gets the FieldInfo for a field, given a field number.
    int
    The number of configured fields, both those configured via XML and those added manually using the addField method.
    An iterator of all the existing fields.
  • Field Details

    • DS_FIELDS_MAX

      static final int DS_FIELDS_MAX
      The maximum number of fields that can be used.
      See Also:
    • DS_FIELDS_NUM_MIN

      static final int DS_FIELDS_NUM_MIN
      The minimum field number for any field.
      See Also:
    • DS_FIELDS_NUM_MAX

      static final int DS_FIELDS_NUM_MAX
      The maximum field number for any field.
      See Also:
  • Method Details

    • addField

      void addField(String name, int number)

      Adds a new field to this FieldManager.

      Parameters:
      name - the name of this field.
      number - the field number.
      Throws:
      FieldLimitReachedException - if DS_FIELDS_MAX fields have already been added to the FieldManager.
      IllegalArgumentException - if the name or number is already defined, if the name argument is null, or if the specified number is less than DS_FIELDS_NUM_MIN greater than DS_FIELDS_NUM_MAX.
    • getFieldByName

      FieldInfo getFieldByName(String name)
      Gets the FieldInfo for a field, given a field name.
      Parameters:
      name - the name of the field.
      Returns:
      the FieldInfo for that field name, or null if there is not one.
    • getFieldByNumber

      FieldInfo getFieldByNumber(int num)
      Gets the FieldInfo for a field, given a field number.
      Parameters:
      num - the field number.
      Returns:
      the FieldInfo for that field number, or null if there is not one.
    • getFieldCount

      int getFieldCount()
      The number of configured fields, both those configured via XML and those added manually using the addField method.
      Returns:
      the total number of configured fields.
    • iterator

      Iterator iterator()
      An iterator of all the existing fields.
      Returns:
      an iterator of FieldInfo instances containing all the existing fields.