added default container to support classes directly.
[utils] / trunk / system / general / src / test / java / org / wamblee / system / core / Application.java
index 07857aee2b7510fa05e87a056676b805b360ace8..c162bb04400523af6b1b4f5c88efb8ad3542d948 100644 (file)
@@ -42,6 +42,11 @@ public class Application extends AbstractComponent {
                _random = Math.random();
        }
        
+       public Application(String aName) {
+        super(aName, new ProvidedInterface[0], required(false));
+        _random = Math.random();
+    }
+       
        public Application(boolean aIsOptinal) { 
                super("application", new ProvidedInterface[0], required(true)); 
        }
@@ -54,8 +59,8 @@ public class Application extends AbstractComponent {
        @Override
        protected Object doStart(Scope aScope) {
                track("start." + getName());
-               _string = aScope.retrieveInterfaceImplementation(getRequiredInterfaces()[0].getProvider(), String.class);
-           _integer = aScope.retrieveInterfaceImplementation(getRequiredInterfaces()[1].getProvider(), Integer.class);
+               _string = aScope.getInterfaceImplementation(getRequiredInterfaces()[0].getProvider(), String.class);
+           _integer = aScope.getInterfaceImplementation(getRequiredInterfaces()[1].getProvider(), Integer.class);
            return _random; 
        }