Class DSTestWiring


  • public class DSTestWiring
    extends java.lang.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

    • Constructor Detail

      • DSTestWiring

        public DSTestWiring()
    • Method Detail

      • setContext

        public void setContext​(org.osgi.framework.BundleContext context)
      • wire

        public void wire()
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • add

        public <T> DSTestWiring.Component<T> add​(java.lang.Class<T> type)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • add

        public DSTestWiring.Component<?> add​(java.lang.String cname)
                                      throws java.lang.ClassNotFoundException,
                                             java.lang.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:
        java.lang.ClassNotFoundException - if not found
        java.lang.Exception - if something goes wrong
      • add

        public <T> DSTestWiring.Component<T> add​(T instance)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • get

        public <T> T get​(java.lang.Class<T> c)