lcsim-contrib/src/main/java/org/lcsim/contrib/onoprien/util/job
diff -u -r1.10 -r1.11
--- JobManager.java 16 Mar 2009 20:44:35 -0000 1.10
+++ JobManager.java 19 Mar 2009 06:08:06 -0000 1.11
@@ -37,7 +37,7 @@
* </ul>
*
* @author D. Onoprienko
- * @version $Id: JobManager.java,v 1.10 2009/03/16 20:44:35 onoprien Exp $
+ * @version $Id: JobManager.java,v 1.11 2009/03/19 06:08:06 onoprien Exp $
*/
public class JobManager extends org.lcsim.util.Driver implements ConditionsListener {
@@ -171,7 +171,7 @@
throw new IllegalArgumentException("Singleton of type " + singletonType +
" does not have default instance, must be registered explicitly",x);
}
- put(singleton, singletonType);
+ put(singletonType, singleton);
}
return singleton;
}
@@ -180,7 +180,7 @@
* Register a singleton of the specified type.
* If the given object is not an instance of the specified type, <tt>IllegalArgumentException</tt> is thrown.
*/
- public void put(Object singleton, Class singletonType) {
+ public void put( Class singletonType,Object singleton) {
if (! singletonType.isInstance(singleton)) throw new IllegalArgumentException();
Object previous = _singletons.put(singletonType, singleton);
if (previous != null) System.out.println("Replacing previously registered singleton of type "+ singletonType);