Coverage Report - org.apache.maven.shared.io.scan.SimpleResourceInclusionScanner
 
Classes in this File Line Coverage Branch Coverage Complexity
SimpleResourceInclusionScanner
0%
0/8
0%
0/1
2
 
 1  
 package org.apache.maven.shared.io.scan;
 2  
 
 3  
 /*
 4  
  * Copyright 2001-2005 The Apache Software Foundation.
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 7  
  * in compliance with the License. You may obtain a copy of the License at
 8  
  *
 9  
  * http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software distributed under the License
 12  
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 13  
  * or implied. See the License for the specific language governing permissions and limitations under
 14  
  * the License.
 15  
  */
 16  
 
 17  
 import java.io.File;
 18  
 import java.util.Collections;
 19  
 import java.util.List;
 20  
 import java.util.Set;
 21  
 
 22  
 /**
 23  
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
 24  
  * @version $Id: org.apache.maven.shared.io.scan.SimpleResourceInclusionScanner.html 2271 2006-08-22 15:19:41Z joakime $
 25  
  */
 26  
 public class SimpleResourceInclusionScanner
 27  
     extends AbstractResourceInclusionScanner
 28  
 {
 29  
     private Set sourceIncludes;
 30  
 
 31  
     private Set sourceExcludes;
 32  
 
 33  0
     public SimpleResourceInclusionScanner( Set sourceIncludes, Set sourceExcludes )
 34  
     {
 35  0
         this.sourceIncludes = sourceIncludes;
 36  
 
 37  0
         this.sourceExcludes = sourceExcludes;
 38  0
     }
 39  
 
 40  
     public Set getIncludedSources( File sourceDir, File targetDir )
 41  
         throws InclusionScanException
 42  
     {
 43  0
         List srcMappings = getSourceMappings();
 44  
 
 45  0
         if ( srcMappings.isEmpty() )
 46  
         {
 47  0
             return Collections.EMPTY_SET;
 48  
         }
 49  
 
 50  0
         return Collections.singleton( scanForSources( sourceDir, sourceIncludes, sourceExcludes ) );
 51  
     }
 52  
 }