Coverage Report - org.simpleframework.xml.transform.Matcher
 
Classes in this File Line Coverage Branch Coverage Complexity
Matcher
N/A
N/A
1
 
 1  
 /*
 2  
  * Matcher.java May 2007
 3  
  *
 4  
  * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 15  
  * implied. See the License for the specific language governing 
 16  
  * permissions and limitations under the License.
 17  
  */
 18  
 
 19  
 package org.simpleframework.xml.transform;
 20  
 
 21  
 /**
 22  
  * The <code>Matcher</code> is used to match a type with a transform
 23  
  * such that a string value can be read or written as that type. If
 24  
  * there is no match this will typically return a null to indicate
 25  
  * that another matcher should be delegated to. If there is an error
 26  
  * in performing the match an exception is thrown.
 27  
  * 
 28  
  * @author Niall Gallagher
 29  
  * 
 30  
  * @see org.simpleframework.xml.transform.Transformer
 31  
  */
 32  
 public interface Matcher {
 33  
 
 34  
    /**
 35  
     * This is used to match a <code>Transform</code> using the type
 36  
     * specified. If no transform can be acquired then this returns
 37  
     * a null value indicating that no transform could be found.
 38  
     * 
 39  
     * @param type this is the type to acquire the transform for
 40  
     * 
 41  
     * @return returns a transform for processing the type given
 42  
     */ 
 43  
    Transform match(Class type) throws Exception;
 44  
 }