aQute.bnd.testing
Class DSTestWiring
java.lang.Object
aQute.bnd.testing.DSTestWiring
public class DSTestWiring
- extends Object
Intended to wire a number components for testing using the DS (from bnd)
annotations.
TODO add the OSGi Annotations and support more options. needs cleanup
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DSTestWiring
public DSTestWiring()
setContext
public void setContext(org.osgi.framework.BundleContext context)
wire
public void wire()
throws Exception
- Throws:
Exception
add
public <T> DSTestWiring.Component<T> add(Class<T> type)
throws Exception
- Throws:
Exception
add
public DSTestWiring.Component<?> add(String cname)
throws ClassNotFoundException,
Exception
- Add the class by name. If the class cannot be found in the local class
loader, and a Bundle Context is specified, try each bundle for that
class.
- Parameters:
cname - the name of the class
- Returns:
- the class
- Throws:
ClassNotFoundException - if not found
Exception - if something goes wrong
add
public <T> DSTestWiring.Component<T> add(T instance)
throws Exception
- Throws:
Exception
get
public <T> T get(Class<T> c)
Copyright © 2014 aQute SARL. All rights reserved.