hudson.util
Class Service

java.lang.Object
  extended by hudson.util.Service

public class Service
extends Object

Load classes by looking up META-INF/services.

Author:
Kohsuke Kawaguchi

Constructor Summary
Service()
           
 
Method Summary
static
<T> void
load(Class<T> spi, ClassLoader cl, Collection<Class<? extends T>> result)
          Look up META-INF/service/SPICLASSNAME from the classloader and all the discovered classes into the given collection.
static
<T> List<T>
loadInstances(ClassLoader classLoader, Class<T> type)
          Poorman's clone of JDK6 ServiceLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Service

public Service()
Method Detail

loadInstances

public static <T> List<T> loadInstances(ClassLoader classLoader,
                                        Class<T> type)
                             throws IOException
Poorman's clone of JDK6 ServiceLoader.

Throws:
IOException

load

public static <T> void load(Class<T> spi,
                            ClassLoader cl,
                            Collection<Class<? extends T>> result)
Look up META-INF/service/SPICLASSNAME from the classloader and all the discovered classes into the given collection.



Copyright © 2004-2013. All Rights Reserved.