Class DefaultMatcher
java.lang.Object
org.simpleframework.xml.transform.DefaultMatcher
- All Implemented Interfaces:
Matcher
The
DefaultMatcher
is a delegation object that uses
several matcher implementations to correctly resolve both the
stock Transform
implementations and implementations
that have been overridden by the user with a custom matcher. This
will perform the resolution of the transform using the specified
matcher, if this results in no transform then this will look for
a transform within the collection of implementations.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Matcher
Matcher used to resolve transforms for array type objects.private Matcher
Matcher used to resolve user specified transform overrides.private Matcher
Matcher used to resolve stock transforms for primitive types.private Matcher
Matcher used to resolve all the core Java object transforms. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
primitive
Matcher used to resolve stock transforms for primitive types. -
matcher
Matcher used to resolve user specified transform overrides. -
stock
Matcher used to resolve all the core Java object transforms. -
array
Matcher used to resolve transforms for array type objects.
-
-
Constructor Details
-
DefaultMatcher
Constructor for theDefaultMatcher
object. This performs resolution ofTransform
implementations using the specified matcher. If that matcher fails to resolve a suitable transform then the stock implementations are used.- Parameters:
matcher
- this is the user specified matcher object
-
-
Method Details
-
match
This is used to match aTransform
for the given type. If a transform cannot be resolved this this will throw an exception to indicate that resolution of a transform failed. A transform is resolved by first searching for a transform within the user specified matcher then searching the stock transforms. -
matchType
This is used to match aTransform
for the given type. If a transform cannot be resolved this this will throw an exception to indicate that resolution of a transform failed. A transform is resolved by first searching for a transform within the user specified matcher then searching the stock transforms.- Parameters:
type
- this is the type to resolve a transform object for- Returns:
- this returns a transform used to transform the type
- Throws:
Exception
-