Coverage Report - org.simpleframework.xml.filter.PlatformFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
PlatformFilter
100%
7/7
N/A
1
 
 1  
 /*
 2  
  * PlatformFilter.java May 2006
 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.filter;
 20  
 
 21  
 import java.util.Map;
 22  
 
 23  
 /**
 24  
  * The <code>PlatformFilter</code> object makes use of all filter
 25  
  * types this resolves user specified properties first, followed
 26  
  * by system properties, and finally environment variables. This
 27  
  * filter will be the default filter used by most applications as
 28  
  * it can make use of all values within the application platform.
 29  
  * 
 30  
  * @author Niall Gallagher 
 31  
  */
 32  
 public class PlatformFilter extends StackFilter {
 33  
 
 34  
    /**
 35  
     * Constructor for the <code>PlatformFilter</code> object. This
 36  
     * adds a filter which can be used to resolve environment 
 37  
     * variables followed by one that can be used to resolve system
 38  
     * properties and finally one to resolve user specified values.
 39  
     */
 40  
    public PlatformFilter() {
 41  74
       this(null);
 42  74
    }
 43  
    
 44  
    /**
 45  
     * Constructor for the <code>PlatformFilter</code> object. This
 46  
     * adds a filter which can be used to resolve environment 
 47  
     * variables followed by one that can be used to resolve system
 48  
     * properties and finally one to resolve user specified values.
 49  
     * 
 50  
     * @param map this is a map contain the user mappings
 51  
     */
 52  945
    public PlatformFilter(Map map) {
 53  945
       this.push(new EnvironmentFilter());
 54  945
       this.push(new SystemFilter());
 55  945
       this.push(new MapFilter(map));      
 56  945
    }        
 57  
 }