You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/04/11 19:33:42 UTC

svn commit: r1091135 - in /tapestry/tapestry5/trunk/tapestry-ioc/src: main/java/org/apache/tapestry5/ioc/ main/java/org/apache/tapestry5/ioc/internal/ test/java/org/apache/tapestry5/ioc/ test/java/org/apache/tapestry5/ioc/internal/

Author: hlship
Date: Mon Apr 11 17:33:41 2011
New Revision: 1091135

URL: http://svn.apache.org/viewvc?rev=1091135&view=rev
Log:
TAP5-853: Change ReloadableObjectCreatiorSource to use PlasticProxyFactory

Modified:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ReloadableObjectCreatorSource.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/RegistryBuilderTest.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ModuleImplTest.java

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/RegistryBuilder.java Mon Apr 11 17:33:41 2011
@@ -127,7 +127,7 @@ public final class RegistryBuilder
 
             logger.info("Adding module definition for " + c);
 
-            ModuleDef def = new DefaultModuleDefImpl(c, logger, classFactory);
+            ModuleDef def = new DefaultModuleDefImpl(c, logger, classFactory, proxyFactory);
             add(def);
 
             SubModule annotation = ((AnnotatedElement) c).getAnnotation(SubModule.class);

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImpl.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImpl.java Mon Apr 11 17:33:41 2011
@@ -57,6 +57,7 @@ import org.apache.tapestry5.ioc.def.Serv
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.ClassFactory;
+import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.slf4j.Logger;
 
 /**
@@ -92,6 +93,8 @@ public class DefaultModuleDefImpl implem
 
     private final ClassFactory classFactory;
 
+    private final PlasticProxyFactory proxyFactory;
+
     /**
      * Keyed on service id.
      */
@@ -124,14 +127,17 @@ public class DefaultModuleDefImpl implem
      *            based on the class name of the module
      * @param classFactory
      *            factory used to create new classes at runtime or locate method line numbers for
-     *            error
-     *            reporting
+     *            error reporting
+     * @param proxyFactory
+     *            factory used to create proxy classes at runtime
      */
-    public DefaultModuleDefImpl(Class<?> moduleClass, Logger logger, ClassFactory classFactory)
+    public DefaultModuleDefImpl(Class<?> moduleClass, Logger logger, ClassFactory classFactory,
+            PlasticProxyFactory proxyFactory)
     {
         this.moduleClass = moduleClass;
         this.logger = logger;
         this.classFactory = classFactory;
+        this.proxyFactory = proxyFactory;
 
         Marker annotation = moduleClass.getAnnotation(Marker.class);
 
@@ -266,9 +272,9 @@ public class DefaultModuleDefImpl implem
     private void addStartupDef(Method method)
     {
         Set<Class> markers = Collections.emptySet();
-        
+
         ContributionDef2 def = new ContributionDefImpl("RegistryStartup", method, classFactory, Runnable.class, markers);
-        
+
         contributionDefs.add(def);
     }
 
@@ -312,12 +318,13 @@ public class DefaultModuleDefImpl implem
     private void addDecoratorDef(Method method)
     {
         Decorate annotation = method.getAnnotation(Decorate.class);
-       
+
         Class serviceInterface = annotation == null ? null : annotation.serviceInterface();
-       
+
         // TODO: methods just named "decorate"
 
-        String decoratorId = annotation == null? stripMethodPrefix(method, DECORATE_METHOD_NAME_PREFIX) : extractId(serviceInterface, annotation.id());
+        String decoratorId = annotation == null ? stripMethodPrefix(method, DECORATE_METHOD_NAME_PREFIX) : extractId(
+                serviceInterface, annotation.id());
 
         // TODO: Check for duplicates
 
@@ -325,7 +332,7 @@ public class DefaultModuleDefImpl implem
 
         if (returnType.isPrimitive() || returnType.isArray())
             throw new RuntimeException(IOCMessages.decoratorMethodWrongReturnType(method));
-       
+
         Set<Class> markers = extractMarkers(method, Decorate.class);
 
         DecoratorDef def = new DecoratorDefImpl(method, extractPatterns(annotation, decoratorId, method),
@@ -336,9 +343,10 @@ public class DefaultModuleDefImpl implem
 
     private <T extends Annotation> String[] extractPatterns(T annotation, String id, Method method)
     {
-        if(annotation != null)
-            return new String[]{};
-       
+        if (annotation != null)
+            return new String[]
+            {};
+
         Match match = method.getAnnotation(Match.class);
 
         if (match == null)
@@ -361,12 +369,13 @@ public class DefaultModuleDefImpl implem
     private void addAdvisorDef(Method method)
     {
         Advise annotation = method.getAnnotation(Advise.class);
-       
+
         Class serviceInterface = annotation == null ? null : annotation.serviceInterface();
-       
+
         // TODO: methods just named "decorate"
 
-        String advisorId = annotation == null ? stripMethodPrefix(method, ADVISE_METHOD_NAME_PREFIX) : extractId(serviceInterface, annotation.id());
+        String advisorId = annotation == null ? stripMethodPrefix(method, ADVISE_METHOD_NAME_PREFIX) : extractId(
+                serviceInterface, annotation.id());
 
         // TODO: Check for duplicates
 
@@ -390,19 +399,19 @@ public class DefaultModuleDefImpl implem
         if (!found)
             throw new RuntimeException(String.format("Advise method %s must take a parameter of type %s.",
                     toString(method), MethodAdviceReceiver.class.getName()));
-       
+
         Set<Class> markers = extractMarkers(method, Advise.class);
-       
-        AdvisorDef def = new AdvisorDefImpl(method, extractPatterns(annotation, advisorId, method), extractConstraints(method),
-                classFactory, advisorId, serviceInterface, markers);
+
+        AdvisorDef def = new AdvisorDefImpl(method, extractPatterns(annotation, advisorId, method),
+                extractConstraints(method), classFactory, advisorId, serviceInterface, markers);
 
         advisorDefs.put(advisorId, def);
 
     }
-    
+
     private String extractId(Class serviceInterface, String id)
     {
-    	return InternalUtils.isBlank(id) ? serviceInterface.getSimpleName() : id;
+        return InternalUtils.isBlank(id) ? serviceInterface.getSimpleName() : id;
     }
 
     private String toString(Method method)
@@ -422,7 +431,7 @@ public class DefaultModuleDefImpl implem
     {
         String serviceId = InternalUtils.getServiceId(method);
 
-        if(serviceId == null)
+        if (serviceId == null)
         {
             serviceId = stripMethodPrefix(method, BUILD_METHOD_NAME_PREFIX);
         }
@@ -556,8 +565,8 @@ public class DefaultModuleDefImpl implem
             if (!Modifier.isStatic(bindMethod.getModifiers()))
                 throw new RuntimeException(IOCMessages.bindMethodMustBeStatic(toString(bindMethod)));
 
-            ServiceBinderImpl binder = new ServiceBinderImpl(this, bindMethod, classFactory, defaultMarkers,
-                    modulePreventsServiceDecoration);
+            ServiceBinderImpl binder = new ServiceBinderImpl(this, bindMethod, classFactory, proxyFactory,
+                    defaultMarkers, modulePreventsServiceDecoration);
 
             bindMethod.invoke(null, binder);
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ReloadableObjectCreatorSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ReloadableObjectCreatorSource.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ReloadableObjectCreatorSource.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ReloadableObjectCreatorSource.java Mon Apr 11 17:33:41 2011
@@ -1,4 +1,4 @@
-// Copyright 2010 The Apache Software Foundation
+// Copyright 2010, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -19,15 +19,19 @@ import java.lang.reflect.Method;
 import org.apache.tapestry5.ioc.ObjectCreator;
 import org.apache.tapestry5.ioc.ServiceBuilderResources;
 import org.apache.tapestry5.ioc.services.ClassFactory;
+import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.services.UpdateListenerHub;
 
 /**
  * Responsible for creating a {@link ReloadableServiceImplementationObjectCreator} for a service implementation.
  */
+@SuppressWarnings("unchecked")
 public class ReloadableObjectCreatorSource implements ObjectCreatorSource
 {
     private final ClassFactory classFactory;
 
+    private final PlasticProxyFactory proxyFactory;
+
     private final Method bindMethod;
 
     private final Class serviceInterfaceClass;
@@ -36,10 +40,11 @@ public class ReloadableObjectCreatorSour
 
     private final boolean eagerLoad;
 
-    public ReloadableObjectCreatorSource(ClassFactory classFactory, Method bindMethod, Class serviceInterfaceClass,
-            Class serviceImplementationClass, boolean eagerLoad)
+    public ReloadableObjectCreatorSource(ClassFactory classFactory, PlasticProxyFactory proxyFactory,
+            Method bindMethod, Class serviceInterfaceClass, Class serviceImplementationClass, boolean eagerLoad)
     {
         this.classFactory = classFactory;
+        this.proxyFactory = proxyFactory;
         this.bindMethod = bindMethod;
         this.serviceInterfaceClass = serviceInterfaceClass;
         this.serviceImplementationClass = serviceImplementationClass;
@@ -59,20 +64,21 @@ public class ReloadableObjectCreatorSour
 
     public String getDescription()
     {
-        return String.format("Reloadable %s via %s", serviceImplementationClass.getName(), classFactory
-                .getMethodLocation(bindMethod));
+        return String.format("Reloadable %s via %s", serviceImplementationClass.getName(),
+                classFactory.getMethodLocation(bindMethod));
     }
 
     private Object createReloadableProxy(ServiceBuilderResources resources)
     {
         ReloadableServiceImplementationObjectCreator reloadableCreator = new ReloadableServiceImplementationObjectCreator(
-                resources, classFactory.getClassLoader(), serviceImplementationClass.getName());
+                resources, proxyFactory.getClassLoader(), serviceImplementationClass.getName());
 
         resources.getService(UpdateListenerHub.class).addUpdateListener(reloadableCreator);
 
         if (eagerLoad)
             reloadableCreator.createObject();
 
-        return classFactory.createProxy(serviceInterfaceClass, serviceImplementationClass, reloadableCreator, getDescription());
+        return proxyFactory.createProxy(serviceInterfaceClass, reloadableCreator, serviceImplementationClass,
+                getDescription());
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java Mon Apr 11 17:33:41 2011
@@ -36,6 +36,7 @@ import org.apache.tapestry5.ioc.internal
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.internal.util.OneShotLock;
 import org.apache.tapestry5.ioc.services.ClassFactory;
+import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 
 @SuppressWarnings("all")
 public class ServiceBinderImpl implements ServiceBinder, ServiceBindingOptions
@@ -48,16 +49,19 @@ public class ServiceBinderImpl implement
 
     private final ClassFactory classFactory;
 
+    private PlasticProxyFactory proxyFactory;
+
     private final Set<Class> defaultMarkers;
 
     private final boolean moduleDefaultPreventDecoration;
 
     public ServiceBinderImpl(ServiceDefAccumulator accumulator, Method bindMethod, ClassFactory classFactory,
-            Set<Class> defaultMarkers, boolean moduleDefaultPreventDecoration)
+            PlasticProxyFactory proxyFactory, Set<Class> defaultMarkers, boolean moduleDefaultPreventDecoration)
     {
         this.accumulator = accumulator;
         this.bindMethod = bindMethod;
         this.classFactory = classFactory;
+        this.proxyFactory = proxyFactory;
         this.defaultMarkers = defaultMarkers;
         this.moduleDefaultPreventDecoration = moduleDefaultPreventDecoration;
 
@@ -104,8 +108,8 @@ public class ServiceBinderImpl implement
         Set<Class> markers = CollectionFactory.newSet(defaultMarkers);
         markers.addAll(this.markers);
 
-        ServiceDef serviceDef = new ServiceDefImpl(serviceInterface, serviceImplementation, serviceId, markers, scope, eagerLoad,
-                preventDecoration, source);
+        ServiceDef serviceDef = new ServiceDefImpl(serviceInterface, serviceImplementation, serviceId, markers, scope,
+                eagerLoad, preventDecoration, source);
 
         accumulator.addServiceDef(serviceDef);
 
@@ -127,7 +131,8 @@ public class ServiceBinderImpl implement
 
     private ObjectCreatorSource createObjectCreatorSourceFromImplementationClass()
     {
-        if (InternalUtils.SERVICE_CLASS_RELOADING_ENABLED && !preventReloading && isProxiable() && reloadableScope() && InternalUtils.isLocalFile(serviceImplementation))
+        if (InternalUtils.SERVICE_CLASS_RELOADING_ENABLED && !preventReloading && isProxiable() && reloadableScope()
+                && InternalUtils.isLocalFile(serviceImplementation))
             return createReloadableConstructorBasedObjectCreatorSource();
 
         return createStandardConstructorBasedObjectCreatorSource();
@@ -159,16 +164,16 @@ public class ServiceBinderImpl implement
 
             public String getDescription()
             {
-                return String.format("%s via %s", classFactory.getConstructorLocation(constructor), classFactory
-                        .getMethodLocation(bindMethod));
+                return String.format("%s via %s", classFactory.getConstructorLocation(constructor),
+                        classFactory.getMethodLocation(bindMethod));
             }
         };
     }
 
     private ObjectCreatorSource createReloadableConstructorBasedObjectCreatorSource()
     {
-        return new ReloadableObjectCreatorSource(classFactory, bindMethod, serviceInterface, serviceImplementation,
-                eagerLoad);
+        return new ReloadableObjectCreatorSource(classFactory, proxyFactory, bindMethod, serviceInterface,
+                serviceImplementation, eagerLoad);
     }
 
     @SuppressWarnings("unchecked")
@@ -247,12 +252,12 @@ public class ServiceBinderImpl implement
         // Set defaults for the other properties.
 
         eagerLoad = serviceImplementation.getAnnotation(EagerLoad.class) != null;
-        
+
         serviceId = InternalUtils.getServiceId(serviceImplementation);
-        
-        if(serviceId == null)
+
+        if (serviceId == null)
         {
-        	serviceId = serviceInterface.getSimpleName();
+            serviceId = serviceInterface.getSimpleName();
         }
 
         Scope scope = serviceImplementation.getAnnotation(Scope.class);

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/RegistryBuilderTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/RegistryBuilderTest.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/RegistryBuilderTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/RegistryBuilderTest.java Mon Apr 11 17:33:41 2011
@@ -94,7 +94,7 @@ public class RegistryBuilderTest extends
         Logger logger = LoggerFactory.getLogger(getClass());
         ClassFactory classFactory = new ClassFactoryImpl();
 
-        ModuleDef module = new DefaultModuleDefImpl(ServiceBuilderModule.class, logger, classFactory);
+        ModuleDef module = new DefaultModuleDefImpl(ServiceBuilderModule.class, logger, classFactory, null);
         
         Registry r = RegistryBuilder.buildAndStartupRegistry(module, MasterModule.class);
         

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImplTest.java Mon Apr 11 17:33:41 2011
@@ -67,7 +67,7 @@ public class DefaultModuleDefImplTest ex
 
         // BigDecimal is arbitrary, any class would do.
 
-        ModuleDef md = new DefaultModuleDefImpl(SimpleModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(SimpleModule.class, logger, classFactory, null);
 
         assertEquals(md.toString(), "ModuleDef[" + className + " Barney, Fred, Wilma]");
 
@@ -113,7 +113,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef def = new DefaultModuleDefImpl(ServiceIdViaAnnotationModule.class, logger, null);
+        ModuleDef def = new DefaultModuleDefImpl(ServiceIdViaAnnotationModule.class, logger, null, null);
 
         assertEquals(def.getServiceIds().size(), 2);
 
@@ -131,7 +131,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef def = new DefaultModuleDefImpl(ServiceIdViaAnnotationModule.class, logger, null);
+        ModuleDef def = new DefaultModuleDefImpl(ServiceIdViaAnnotationModule.class, logger, null, null);
 
         assertEquals(def.getServiceIds().size(), 2);
 
@@ -149,7 +149,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef def = new DefaultModuleDefImpl(NamedServiceModule.class, logger, null);
+        ModuleDef def = new DefaultModuleDefImpl(NamedServiceModule.class, logger, null, null);
 
         assertEquals(def.getServiceIds().size(), 2);
 
@@ -167,7 +167,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef def = new DefaultModuleDefImpl(NamedServiceModule.class, logger, null);
+        ModuleDef def = new DefaultModuleDefImpl(NamedServiceModule.class, logger, null, null);
 
         assertEquals(def.getServiceIds().size(), 2);
 
@@ -185,7 +185,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef def = new DefaultModuleDefImpl(DefaultServiceIdModule.class, logger, null);
+        ModuleDef def = new DefaultModuleDefImpl(DefaultServiceIdModule.class, logger, null, null);
 
         assertEquals(def.getServiceIds().size(), 1);
 
@@ -216,7 +216,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(ServiceIdConflictMethodModule.class, logger, classFactory);
+            new DefaultModuleDefImpl(ServiceIdConflictMethodModule.class, logger, classFactory, null);
 
             unreachable();
         }
@@ -242,7 +242,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(VoidBuilderMethodModule.class, logger, null);
+            new DefaultModuleDefImpl(VoidBuilderMethodModule.class, logger, null, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -264,7 +264,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(BuilderMethodModule.class, logger, null);
+            new DefaultModuleDefImpl(BuilderMethodModule.class, logger, null, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -291,7 +291,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(moduleClass, logger, null);
+            new DefaultModuleDefImpl(moduleClass, logger, null, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -339,7 +339,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, classFactory, null);
 
         Set<ContributionDef> defs = md.getContributionDefs();
 
@@ -371,7 +371,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(moduleClass, logger, null);
+            new DefaultModuleDefImpl(moduleClass, logger, null, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -396,7 +396,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(moduleClass, logger, null);
+            new DefaultModuleDefImpl(moduleClass, logger, null, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -415,7 +415,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(AutobuildModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(AutobuildModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("StringHolder");
 
@@ -434,7 +434,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(ComplexAutobuildModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(ComplexAutobuildModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("SH");
 
@@ -455,7 +455,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(UninstantiableAutobuildServiceModule.class, logger, classFactory);
+            new DefaultModuleDefImpl(UninstantiableAutobuildServiceModule.class, logger, classFactory, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -476,7 +476,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(NonStaticBindMethodModule.class, logger, classFactory);
+            new DefaultModuleDefImpl(NonStaticBindMethodModule.class, logger, classFactory, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -513,7 +513,7 @@ public class DefaultModuleDefImplTest ex
         replay();
 
         ModuleDef def = new DefaultModuleDefImpl(MutlipleAutobuildServiceConstructorsModule.class, logger,
-                                                 classFactory);
+                                                 classFactory, null);
 
         ServiceDef sd = def.getServiceDef("StringHolder");
 
@@ -538,7 +538,7 @@ public class DefaultModuleDefImplTest ex
 
         try
         {
-            new DefaultModuleDefImpl(ExceptionInBindMethod.class, logger, classFactory);
+            new DefaultModuleDefImpl(ExceptionInBindMethod.class, logger, classFactory, null);
             unreachable();
         }
         catch (RuntimeException ex)
@@ -559,7 +559,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(EagerLoadViaAnnotationModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(EagerLoadViaAnnotationModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("Runnable");
 
@@ -575,7 +575,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("Greeter");
 
@@ -591,7 +591,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("RedGreeter");
 
@@ -607,7 +607,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("SecondRedGreeter");
 
@@ -624,7 +624,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, classFactory, null);
 
         ServiceDef sd = md.getServiceDef("SurprisinglyBlueGreeter");
 
@@ -651,7 +651,7 @@ public class DefaultModuleDefImplTest ex
 
         replay();
 
-        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, classFactory);
+        ModuleDef md = new DefaultModuleDefImpl(moduleClass, logger, classFactory, null);
 
         // reality check that a service was found
         

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ModuleImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ModuleImplTest.java?rev=1091135&r1=1091134&r2=1091135&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ModuleImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ModuleImplTest.java Mon Apr 11 17:33:41 2011
@@ -41,7 +41,7 @@ public class ModuleImplTest extends IOCI
         InternalRegistry registry = mockInternalRegistry();
         Logger logger = mockLogger();
 
-        ModuleDef moduleDef = new DefaultModuleDefImpl(ModuleImplTestModule.class, logger, null);
+        ModuleDef moduleDef = new DefaultModuleDefImpl(ModuleImplTestModule.class, logger, null, null);
 
         Module module = new ModuleImpl(registry, null, moduleDef, null, null, logger);