Annotation Type Child


@Retention(RUNTIME)
@Target(FIELD)
public @interface Child
Field annotation for fields within resource and datatype definitions, indicating a child of that type.
  • Required Element Summary

    Required Elements
    Modifier and Type Required Element Description
    String name
    The name of this field, as it will appear in serialized versions of the message
  • Optional Element Summary

    Optional Elements
    Modifier and Type Optional Element Description
    int max
    The maximum number of repetitions allowed for this child.
    int min
    The minimum number of repetitions allowed for this child
    boolean modifier
    Is this element a modifier?
    int order
    The order in which this field comes within its parent.
    boolean summary
    Should this element be included in the summary view
    Class<? extends IElement>[] type
    Lists the allowable types for this field, if the field supports multiple types (otherwise does not need to be populated).
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int MAX_UNLIMITED
    Constant value to supply for max() to indicate '*' (no maximum)
    static int ORDER_UNKNOWN
    Constant value to supply for order() when the order is defined elsewhere
    static int REPLACE_PARENT
    Constant value to supply for order() to indicate that this child should replace the entry in the superclass with the same name (and take its order value in the process).
  • Field Details

    • ORDER_UNKNOWN

      static final int ORDER_UNKNOWN
      Constant value to supply for order() when the order is defined elsewhere
      See Also:
      Constant Field Values
    • MAX_UNLIMITED

      static final int MAX_UNLIMITED
      Constant value to supply for max() to indicate '*' (no maximum)
      See Also:
      Constant Field Values
    • REPLACE_PARENT

      static final int REPLACE_PARENT
      Constant value to supply for order() to indicate that this child should replace the entry in the superclass with the same name (and take its order value in the process). This is useful if you wish to redefine an existing field in a resource/type definition in order to constrain/extend it.
      See Also:
      Constant Field Values
  • Element Details

    • name

      The name of this field, as it will appear in serialized versions of the message
    • order

      int order
      The order in which this field comes within its parent. The first field should have a value of 0, the second a value of 1, etc.
      Default:
      -1
    • min

      int min
      The minimum number of repetitions allowed for this child
      Default:
      0
    • max

      int max
      The maximum number of repetitions allowed for this child. Should be set to MAX_UNLIMITED if there is no limit to the number of repetitions.
      Default:
      1
    • type

      Class<? extends IElement>[] type
      Lists the allowable types for this field, if the field supports multiple types (otherwise does not need to be populated).

      For example, if this field supports either DateTimeDt or BooleanDt types, those two classes should be supplied here.

      Default:
      {}
    • modifier

      boolean modifier
      Is this element a modifier?
      Default:
      false
    • summary

      boolean summary
      Should this element be included in the summary view
      Default:
      false