Coverage Report - org.simpleframework.xml.core.Repeater
 
Classes in this File Line Coverage Branch Coverage Complexity
Repeater
N/A
N/A
1
 
 1  
 /*
 2  
  * Repeater.java July 2007
 3  
  *
 4  
  * Copyright (C) 2006, 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.core;
 20  
 
 21  
 import org.simpleframework.xml.stream.InputNode;
 22  
 
 23  
 /**
 24  
  * The <code>Repeater</code> interface is used to for converters that
 25  
  * can repeat a read on a given element. This is typically used for
 26  
  * inline lists and maps so that the elements can be mixed within the
 27  
  * containing element. This ensures a more liberal means of writing
 28  
  * the XML such that elements not grouped in a containing XML element
 29  
  * can be declared throughout the document.
 30  
  * 
 31  
  * @author Niall Gallagher
 32  
  * 
 33  
  * @see org.simpleframework.xml.core.CompositeInlineMap
 34  
  */
 35  
 interface Repeater extends Converter {
 36  
    
 37  
    /**
 38  
     * The <code>read</code> method reads an object to a specific type
 39  
     * from the provided node. If the node provided is an attribute
 40  
     * then the object must be a primitive such as a string, integer,
 41  
     * boolean, or any of the other Java primitive types.  
 42  
     * 
 43  
     * @param node contains the details used to deserialize the object
 44  
     * @param value this is the value to read the objects in to
 45  
     * 
 46  
     * @return a fully deserialized object will all its fields 
 47  
     * 
 48  
     * @throws Exception if a deserialized type cannot be instantiated
 49  
     */
 50  
    Object read(InputNode node, Object value) throws Exception;
 51  
 
 52  
 }