Coverage Report - org.simpleframework.xml.stream.Mode
 
Classes in this File Line Coverage Branch Coverage Complexity
Mode
100%
4/4
N/A
0
 
 1  
 /*
 2  
  * Mode.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.stream;
 20  
 
 21  
 /**
 22  
  * The <code>Mode</code> enumeration is used to specify the output
 23  
  * mode for XML text. This is used by the <code>OutputNode</code> 
 24  
  * to describe if element text will be escaped or wrapped in a 
 25  
  * CDATA block. The mode is a three state object, the third of the
 26  
  * states indicates whether an explicit state has been set or not.
 27  
  * If a specific state has not been set then the node will inherit
 28  
  * its output mode from the last parent to have it set. 
 29  
  * 
 30  
  * @author Niall Gallagher
 31  
  * 
 32  
  * @see org.simpleframework.xml.stream.OutputNode
 33  
  */
 34  4
 public enum Mode {
 35  
    
 36  
    /**
 37  
     * Indicates that data written will be within a CDATA block.
 38  
     */
 39  1
    DATA,
 40  
    
 41  
    /**
 42  
     * Indicates that data written will be escaped if required.
 43  
     */
 44  1
    ESCAPE,
 45  
    
 46  
    /**
 47  
     * Indicates that the mode will be inherited from its parent.
 48  
     */
 49  1
    INHERIT;
 50  
 }