Coverage Report - org.apache.commons.classscan.ClassPathElement
 
Classes in this File Line Coverage Branch Coverage Complexity
ClassPathElement
N/A
N/A
1
 
 1  
 /*
 2  
  * Licensed under the Apache License, Version 2.0 (the "License");
 3  
  * you may not use this file except in compliance with the License.
 4  
  * You may obtain a copy of the License at
 5  
  *
 6  
  *      http://www.apache.org/licenses/LICENSE-2.0
 7  
  *
 8  
  * Unless required by applicable law or agreed to in writing, software
 9  
  * distributed under the License is distributed on an "AS IS" BASIS,
 10  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 11  
  * See the License for the specific language governing permissions and
 12  
  * limitations under the License.
 13  
  */
 14  
 package org.apache.commons.classscan;
 15  
 
 16  
 import java.net.URL;
 17  
 import java.util.Iterator;
 18  
 
 19  
 /**
 20  
  * A single location in a ClassPath.  The location might be a jar or a directory.
 21  
  * In enterprise application environments, the location might be an exploded ear or a war.
 22  
  */
 23  
 public interface ClassPathElement extends Iterable<ClassFile> {
 24  
         /**
 25  
          * Get a Iterator over the files specified by this instance 
 26  
          */
 27  
         @Override
 28  
         Iterator<ClassFile> iterator();
 29  
         
 30  
         /**
 31  
          * Get the location of the class bytes.
 32  
          * This value is intended to be used as an argument to the {@link URL#URL(String) URL constructor}.
 33  
          */
 34  
         String getLocation();
 35  
 
 36  
         /**
 37  
          * Get a file with a particular name
 38  
          * 
 39  
          * @param fileName The name of the desired file (this may be a path such as META-INF/resources/com.example.group.interface)
 40  
          * @return null, if not found; otherwise the ResourceFile
 41  
          */
 42  
         ResourceFile getResource(String fileName);
 43  
 }