Coverage Report - org.apache.commons.classscan.spi.ClassPathElementFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
ClassPathElementFactory
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.spi;
 15  
 
 16  
 import java.io.IOException;
 17  
 import java.net.URL;
 18  
 import java.util.ServiceLoader;
 19  
 
 20  
 import org.apache.commons.classscan.MetaRegistry;
 21  
 import org.apache.commons.classscan.spi.model.SpiClassPathElement;
 22  
 
 23  
 /**
 24  
  * Provider to create a ClassPathElement for a URL.  Provider instances should
 25  
  * be registered using the {@link ServiceLoader} facility.  Each provider class
 26  
  * should have a public default constructor.  A single instance of each provider
 27  
  * class will be instantiated.
 28  
  */
 29  
 public interface ClassPathElementFactory {
 30  
         /**
 31  
          * Create a ClassPathElement for a URL
 32  
          * 
 33  
          * @param metaRegistry The registry 
 34  
          * @param url The url that is the base location of class files
 35  
          * @return null, if the URL scheme cannot be supported; otherwise a ClassPathElement for the URL
 36  
          */
 37  
         SpiClassPathElement getClassPathElement(MetaRegistry metaRegistry, URL url) throws IOException;
 38  
 }