X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fcontainer%2FApplication.java;h=7df9585f10f8d5702117febc77d33a318ca8d66c;hb=8de36ff0206c996baf3ee4adc3e2293b12ff5f39;hp=9e4a56b4569ee54e49b464ce42c67f713bc1a339;hpb=89c06d4d52b46c154128c97d6e758fa1f4fc7a6e;p=utils diff --git a/system/general/src/test/java/org/wamblee/system/container/Application.java b/system/general/src/test/java/org/wamblee/system/container/Application.java index 9e4a56b4..7df9585f 100644 --- a/system/general/src/test/java/org/wamblee/system/container/Application.java +++ b/system/general/src/test/java/org/wamblee/system/container/Application.java @@ -23,32 +23,18 @@ import org.wamblee.system.core.Scope; import org.wamblee.test.EventTracker; - /** - * DOCUMENT ME! - * + * * @author $author$ * @version $Revision$ - */ + */ public class Application extends AbstractComponent { - /** - * DOCUMENT ME! - */ private EventTracker tracker; - /** - * DOCUMENT ME! - */ private String string; - /** - * DOCUMENT ME! - */ private Integer integer; - /** - * DOCUMENT ME! - */ private double random; /** @@ -60,8 +46,7 @@ public class Application extends AbstractComponent { /** * Creates a new Application object. - * - * @param aName DOCUMENT ME! + * */ public Application(String aName) { this(aName, ""); @@ -69,9 +54,7 @@ public class Application extends AbstractComponent { /** * Creates a new Application object. - * - * @param aName DOCUMENT ME! - * @param aPrefix DOCUMENT ME! + * */ public Application(String aName, String aPrefix) { super(aName, new ProvidedInterface[0], required(false, aPrefix)); @@ -80,8 +63,7 @@ public class Application extends AbstractComponent { /** * Creates a new Application object. - * - * @param aIsOptinal DOCUMENT ME! + * */ public Application(boolean aIsOptinal) { super("application", new ProvidedInterface[0], required(true, "")); @@ -89,98 +71,54 @@ public class Application extends AbstractComponent { /** * Creates a new Application object. - * - * @param aTracker DOCUMENT ME! + * */ public Application(EventTracker aTracker) { this(); tracker = aTracker; } - /** - * DOCUMENT ME! - * - * @param aOptional DOCUMENT ME! - * @param aPrefix DOCUMENT ME! - * - * @return DOCUMENT ME! - */ public static RequiredInterface[] required(boolean aOptional, String aPrefix) { return new RequiredInterface[] { new DefaultRequiredInterface(aPrefix + "string", String.class, aOptional), new DefaultRequiredInterface(aPrefix + "integer", Integer.class, - aOptional) - }; + aOptional) }; } - /** - * DOCUMENT ME! - * - * @param aOptional DOCUMENT ME! - * - * @return DOCUMENT ME! - */ public static RequiredInterface[] required(boolean aOptional) { return required(aOptional, ""); } - /** - * DOCUMENT ME! - * - * @param aScope DOCUMENT ME! - * - * @return DOCUMENT ME! - */ @Override public Object doStart(Scope aScope) { track("start." + getName()); - string = aScope.getInterfaceImplementation(getRequiredInterfaces() - .get(0).getProvider(), String.class); - integer = aScope.getInterfaceImplementation(getRequiredInterfaces() - .get(1).getProvider(), Integer.class); + string = aScope.getInterfaceImplementation(getRequiredInterfaces().get( + 0).getProvider(), String.class); + integer = aScope.getInterfaceImplementation(getRequiredInterfaces() + .get(1).getProvider(), Integer.class); return random; } - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ public String getString() { return string; } - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ public Integer getInteger() { return integer; } - /** - * DOCUMENT ME! - * - * @param aRuntime DOCUMENT ME! - */ @Override public void doStop(Object aRuntime) { track("stop." + getName()); if (random != (Double) aRuntime) { - throw new IllegalArgumentException("Wrong runtime: expected " - + random + " but got " + aRuntime); + throw new IllegalArgumentException("Wrong runtime: expected " + + random + " but got " + aRuntime); } } - /** - * DOCUMENT ME! - * - * @param aString DOCUMENT ME! - */ private void track(String aString) { if (tracker == null) { return;