Annotation Type MapCodecType


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Documented
    public @interface MapCodecType

    Annotation that can be used on a map-type CMP field getter or setter method to indicate to Rhino codecs that should be used to serialise and serialise map keys and values. The CMP field must be declared with type Map or an array of this type.

    For a given map with key type X and value type Y:

    • the specified key DatatypeCodec implementation class must have a type parameter T that is equal to X, or if T is itself a type variable then it must have an upper bound equal to X.

    • the specified value DatatypeCodec implementation class must have a type parameter T that is equal to Y, or if T is itself a type variable then it must have an upper bound equal to Y.

    Since:
    Rhino 2.4.0