Coverage Report - org.apache.commons.classscan.spi.ClassPathFactory
 
Classes in this File Line Coverage Branch Coverage Complexity
ClassPathFactory
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.util.ServiceLoader;
 17  
 
 18  
 import org.apache.commons.classscan.spi.model.SpiClassPath;
 19  
 import org.apache.commons.classscan.spi.model.SpiMetaRegistry;
 20  
 
 21  
 /**
 22  
  * Provider to create SpiClassPath for a ClassLoader.  Provider instances should
 23  
  * be registered using the {@link ServiceLoader} facility.  Each provider class
 24  
  * should have a public default constructor.  A single instance of each provider
 25  
  * class will be instantiated.
 26  
  */
 27  
 public interface ClassPathFactory {
 28  
         /**
 29  
          * Create a ClassPath for a ClassLoader
 30  
          * 
 31  
          * @param metaRegistry The registry
 32  
          * @param classLoader The classLoader
 33  
          * @return null, if the ClassLoader type cannot be supported; otherwise a ClassPath for the ClassLoader
 34  
          */
 35  
     SpiClassPath getClassPath(SpiMetaRegistry metaRegistry, ClassLoader classLoader);
 36  
 }