Class ArrayMatcher

  • All Implemented Interfaces:
    Matcher

    class ArrayMatcher
    extends java.lang.Object
    implements Matcher
    The ArrayMatcher object performs matching of array types to array transforms. This uses the array component type to determine the transform to be used. All array transforms created by this will be ArrayTransform object instances. These will use a type transform for the array component to add values to the individual array indexes. Also such transforms are typically treated as a comma separated list of individual values.
    See Also:
    ArrayTransform
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Matcher primary
      This is the primary matcher that can resolve transforms.
    • Constructor Summary

      Constructors 
      Constructor Description
      ArrayMatcher​(Matcher primary)
      Constructor for the ArrayTransform object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Transform match​(java.lang.Class type)
      This is used to match a Transform based on the array component type of an object to be transformed.
      private Transform matchArray​(java.lang.Class entry)
      This is used to match a Transform based on the array component type of an object to be transformed.
      • Methods inherited from class java.lang.Object

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

      • primary

        private final Matcher primary
        This is the primary matcher that can resolve transforms.
    • Constructor Detail

      • ArrayMatcher

        public ArrayMatcher​(Matcher primary)
        Constructor for the ArrayTransform object. This is used to match array types to their respective transform using the ArrayTransform object. This will use a comma separated list of tokens to populate the array.
        Parameters:
        primary - this is the primary matcher to be used
    • Method Detail

      • match

        public Transform match​(java.lang.Class type)
                        throws java.lang.Exception
        This is used to match a Transform based on the array component type of an object to be transformed. This will attempt to match the transform using the fully qualified class name of the array component type. If a transform can not be found then this method will throw an exception.
        Specified by:
        match in interface Matcher
        Parameters:
        type - this is the array to find the transform for
        Returns:
        returns a transform for processing the type given
        Throws:
        java.lang.Exception - thrown if a transform can not be matched
      • matchArray

        private Transform matchArray​(java.lang.Class entry)
                              throws java.lang.Exception
        This is used to match a Transform based on the array component type of an object to be transformed. This will attempt to match the transform using the fully qualified class name of the array component type. If a transform can not be found then this method will throw an exception.
        Parameters:
        entry - this is the array component type to be matched
        Throws:
        java.lang.Exception - thrown if a transform can not be matched