Annotation Type AdaptationOrder


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface AdaptationOrder
    AdaptationOrder annotations are added to AdaptationGetter methods to determine the order of fields in the generated schema types. When populating an adaptation object at runtime, the setters are called in the same order as the adaptation fields. Used where the fields have an intuitive order, or for types in which setters must be called in a particular order. Examples: '@AdaptationGetter("year") @AdaptationOrder(1) String getYear()' '@AdaptationGetter("month") @AdaptationOrder(2) String getMonth()' '@AdaptationGetter("day") @AdaptationOrder(3) String getDay()' '@AdaptationGetter("addressEncodingScheme") @AdaptationOrder(4) EncodingScheme getScheme()' '@AdaptationGetter("addressDigits") @AdaptationOrder(5) String getAddressDigits()' The annotation is optional, and the sort order values are not required to be unique. Getters are first sorted by the sort order (with lower values preceding higher values, and getters with no explicit sort order appearing last), then alphabetically by method name.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int value
      The sort order value, with lower values coming first.
    • Element Detail

      • value

        int value
        The sort order value, with lower values coming first. Must be specified.