X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fspring%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fspring%2FSubSpringComponent2.java;h=9fdccf168739123457d216fd90a8fe7f93586beb;hb=96c8961955a306314dfe0cf9ca192252de39fc1c;hp=7b67cc4219ddcc29d44ab33f290d068a56bfb26c;hpb=a503959a4290a415cfe6f668a301e44b4dcde445;p=utils diff --git a/system/spring/src/test/java/org/wamblee/system/spring/SubSpringComponent2.java b/system/spring/src/test/java/org/wamblee/system/spring/SubSpringComponent2.java index 7b67cc42..9fdccf16 100644 --- a/system/spring/src/test/java/org/wamblee/system/spring/SubSpringComponent2.java +++ b/system/spring/src/test/java/org/wamblee/system/spring/SubSpringComponent2.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 the original author or authors. + * Copyright 2005-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,31 +15,41 @@ */ package org.wamblee.system.spring; -import java.util.Map; - import org.wamblee.system.core.DefaultRequiredInterface; import org.wamblee.system.core.ProvidedInterface; import org.wamblee.system.core.RequiredInterface; import org.wamblee.system.core.Scope; +import java.util.Map; + +/** + * + * @author $author$ + * @version $Revision$ + */ public class SubSpringComponent2 extends SpringComponent { - - private static RequiredInterface REQUIRED = new DefaultRequiredInterface("required", Float.class); + private static RequiredInterface REQUIRED = new DefaultRequiredInterface( + "required", Float.class); + /** + * Creates a new SubSpringComponent2 object. + * + */ public SubSpringComponent2(String aName, String[] aConfigFiles, - Map aProvided, - Map aRequired) { + Map aProvided, + Map aRequired) { super(aName, aConfigFiles, aProvided, aRequired); addRequiredInterface(REQUIRED); } - + @Override protected Scope doStart(Scope aExternalScope) { - Scope scope = super.doStart(aExternalScope); - - float value = aExternalScope.getInterfaceImplementation(REQUIRED.getProvider(), Float.class); + + float value = aExternalScope.getInterfaceImplementation(REQUIRED + .getProvider(), Float.class); scope.put("floatValue", value); + return scope; } }