Annotation Type AdaptationVariants


  • @Retention(RUNTIME)
    @Target({CONSTRUCTOR,METHOD})
    public @interface AdaptationVariants
    Indicates a particular protocol or schema variant to which a method applies. Used when two similar protocols share an adaptation class, but use different methods for a particular task, e.g. getInapEncodedForm() and getCapEncodedForm(). Example: 'public @AdaptationEncoder @AdaptationVariants("inap") getInapEncodedForm() {...}' Components which use an adaptation class declare a list of requested variants, to filter the methods used. When a method delcares variants, the method is only used if all its declared variants are in the given list of requested variants. E.g. if a method delcares adaptation variants "inap" and "hexEncoding", then the method will only be used when both the "inap" and "hexEncoding" variants are requested. This approach allows for orthogonal choices (e.g. "inap, hexEncoding" vs "cap, standardEncoding").
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String[] value
      The name of the variant, e.g.
    • Element Detail

      • value

        String[] value
        The name of the variant, e.g. "inap". Must be specified.