de.intarsys.tools.provider
Class Providers
java.lang.Object
de.intarsys.tools.provider.Providers
public class Providers
- extends Object
This is an alternative service- or provider loading tool.
The standard ServiceLoader architecture is quite unfriendly to
reflective access and is even more unfriendly to a lightweight generic
build&deployment procedure.
This implementation uses a single file "META-INF/provider/provider.list" to
enumerate service/implementation pairs. Each service is listed on a line of
its own. The service is followed by a ";", then followed by the
implementation class. Empty lines are ignored.
COMMENT
public static final char COMMENT
- See Also:
- Constant Field Values
SEPARATOR
public static final String SEPARATOR
- See Also:
- Constant Field Values
get
public static Providers get()
get
public static Providers get(ClassLoader classloader)
lookupProviders
public <S> Iterator<S> lookupProviders(Class<S> service)
register
public void register(InputStream is)
throws IOException
- Throws:
IOException
Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.