Class AlternateTypeRules


  • public class AlternateTypeRules
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AlternateTypeRule newMapRule​(java.lang.Class<?> key, java.lang.Class<?> value)
      Helper method to create a new alternate for Map<K,V> that results in an alternate of type List<Entry<K,V>>.
      static AlternateTypeRule newRule​(java.lang.reflect.Type original, java.lang.reflect.Type alternate)
      Helper method to create a new alternate rule.
      static AlternateTypeRule newRule​(java.lang.reflect.Type original, java.lang.reflect.Type alternate, int order)
      Helper method to create a new alternate rule.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DIRECT_SUBSTITUTION_RULE_ORDER

        public static final int DIRECT_SUBSTITUTION_RULE_ORDER
        See Also:
        Constant Field Values
      • GENERIC_SUBSTITUTION_RULE_ORDER

        public static final int GENERIC_SUBSTITUTION_RULE_ORDER
        See Also:
        Constant Field Values
    • Method Detail

      • newRule

        public static AlternateTypeRule newRule​(java.lang.reflect.Type original,
                                                java.lang.reflect.Type alternate)
        Helper method to create a new alternate rule.
        Parameters:
        original - the original
        alternate - the alternate
        Returns:
        the alternate type rule
      • newRule

        public static AlternateTypeRule newRule​(java.lang.reflect.Type original,
                                                java.lang.reflect.Type alternate,
                                                int order)
        Helper method to create a new alternate rule.
        Parameters:
        original - the original
        alternate - the alternate
        order - the order in which the rule is applied. Ordered
        Returns:
        the alternate type rule
      • newMapRule

        public static AlternateTypeRule newMapRule​(java.lang.Class<?> key,
                                                   java.lang.Class<?> value)
        Helper method to create a new alternate for Map<K,V> that results in an alternate of type List<Entry<K,V>>.
        Parameters:
        key - the class that represents a key
        value - the value
        Returns:
        the alternate type rule