Class ArrayMatcher
- java.lang.Object
-
- org.simpleframework.xml.transform.ArrayMatcher
-
- All Implemented Interfaces:
Matcher
class ArrayMatcher extends java.lang.Object implements Matcher
TheArrayMatcherobject 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 beArrayTransformobject 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 theArrayTransformobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transformmatch(java.lang.Class type)This is used to match aTransformbased on the array component type of an object to be transformed.private TransformmatchArray(java.lang.Class entry)This is used to match aTransformbased 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 theArrayTransformobject. This is used to match array types to their respective transform using theArrayTransformobject. 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 aTransformbased 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 aTransformbased 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
-
-