Class PrimitiveMatcher

java.lang.Object
org.simpleframework.xml.transform.PrimitiveMatcher
All Implemented Interfaces:
Matcher

class PrimitiveMatcher extends Object implements Matcher
The PrimitiveMatcher object is used to resolve the primitive types to a stock transform. This will basically use a transform that is used with the primitives language object. This will always return a suitable transform for a primitive.
See Also:
  • Constructor Details

    • PrimitiveMatcher

      public PrimitiveMatcher()
      Constructor for the PrimitiveMatcher object. The primitive matcher is used to resolve a transform instance to convert primitive types to an from strings. If a match is not found with this matcher then an exception is thrown.
  • Method Details

    • match

      public Transform match(Class type) throws Exception
      This method is used to match the specified type to primitive transform implementations. If this is given a primitive then it will always return a suitable Transform. If however it is given an object type an exception is thrown.
      Specified by:
      match in interface Matcher
      Parameters:
      type - this is the primitive type to be transformed
      Returns:
      this returns a stock transform for the primitive
      Throws:
      Exception