net.sf.twip.util
Class ServiceLoaderWrapper<T>

java.lang.Object
  extended by net.sf.twip.util.ServiceLoaderWrapper<T>
All Implemented Interfaces:
java.lang.Iterable<T>

public class ServiceLoaderWrapper<T>
extends java.lang.Object
implements java.lang.Iterable<T>

Loads all implementations if a service interface; uses either the Java 1.6 java.util.ServiceLoader or the Sun Java 1.5 sun.misc.Service. See those classes for details.


Method Summary
static boolean classExists(java.lang.String className)
           
 java.util.Iterator<T> iterator()
           
static
<T> java.lang.Iterable<T>
load(java.lang.Class<T> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

classExists

public static boolean classExists(java.lang.String className)

load

public static <T> java.lang.Iterable<T> load(java.lang.Class<T> type)

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>


Copyright © 2010. All Rights Reserved.