Propagate annotations from the type arguments of one type to another. Which type is the
source and destination of the annotations depends on the direction parameter. Only @KeyFor annotations
are propagated and only if the type to which it would be propagated contains an @UnknownKeyFor or
contains no key for annotations of any kind. If any of the type arguments are wildcards than
they are ignored.
Note the primary annotations of subtype/supertype are not used.
Simple Example:
typeOf(subtype) = ArrayList<@KeyFor("a") String>
typeOf(supertype) = List<@UnknownKeyFor String>
direction = TO_SUPERTYPE
The type of supertype after propagate would be:
List<@KeyFor("a") String>
A more complex example would be:
typeOf(subtype) = HashMap<@UnknownKeyFor String, @KeyFor("b") List<@KeyFor("c") String>>
typeOf(supertype) = Map<@KeyFor("a") String, @KeyFor("b") List<@KeyFor("c") String>>
direction = TO_SUBTYPE
The type of subtype after propagate would be:
HashMap<@KeyFor("a") String, @KeyFor("b") List<@KeyFor("c") String>>