Class ArrayMatcher
- java.lang.Object
-
- org.simpleframework.xml.transform.ArrayMatcher
-
- All Implemented Interfaces:
Matcher
class ArrayMatcher extends java.lang.Object implements Matcher
TheArrayMatcher
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 beArrayTransform
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
-
-
Constructor Summary
Constructors Constructor Description ArrayMatcher(Matcher primary)
Constructor for theArrayTransform
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 aTransform
based on the array component type of an object to be transformed.private Transform
matchArray(java.lang.Class entry)
This is used to match aTransform
based on the array component type of an object to be transformed.
-
-
-
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 theArrayTransform
object. This is used to match array types to their respective transform using theArrayTransform
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 aTransform
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.
-
matchArray
private Transform matchArray(java.lang.Class entry) throws java.lang.Exception
This is used to match aTransform
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
-
-