tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1196357 [1/2] - in /tapestry/tapestry5/trunk: tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ tapestry-core/src/main/java/org/apache/tapestry5/interna...
Date Tue, 01 Nov 2011 23:08:55 GMT
Author: hlship
Date: Tue Nov  1 23:08:53 2011
New Revision: 1196357

URL: http://svn.apache.org/viewvc?rev=1196357&view=rev
Log:
TAP5-1739: Initial pass at removing ClassFactory, ClassFab, ClassTransformation, and related

Removed:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AbstractInstantiator.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AbstractMethodAccess.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TransformationException.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/BridgeClassTransformation.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/CCTWToCCTW2Coercion.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/InjectionProviderToInjectionProvider2.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/MethodInvocationBuilder.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/ParameterBuilder.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/util/StringParameterBuilder.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ClassTransformation.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ComponentClassTransformWorker.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ComponentInstanceOperation.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ComponentMethodAdvice.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ComponentMethodInvocation.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ComponentValueProvider.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/InjectionProvider.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/MethodAccess.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformField.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformMethod.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformMethodSignature.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/transform/ApplicationStateWorkerTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/util/MethodInvocationBuilderTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/services/TransformMethodSignatureTest.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/Invocation.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/MethodAdvice.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AbstractFab.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AnnotationMemberValueVisitor.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFabImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryClassPool.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/CtClassSource.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/CtClassSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/ClassFabImplTest.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryImplTest.java
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSource.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ServicesMessages.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TranslatorSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformConstants.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/transform/ComponentClassTransformWorker2.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/services/ServicesStrings.properties
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ReverseStringsWorker.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java
    tapestry/tapestry5/trunk/tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/HibernateTransactionAdvisorImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/MethodAdviceReceiver.java
    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/IOCMessages.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalRegistry.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectDecoratorImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/LazyAdvisorImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThunkCreatorImpl.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/AspectDecorator.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFabUtils.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/CoercionTuple.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/services/ServiceStrings.properties
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/AdviceDemoModule.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/AdviseByMarkerModule.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AdviseByMarkerModule2.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/DecorateByMarkerModule2.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
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImplTest.java
    tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry5/internal/spring/SpringModuleDef.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSource.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSource.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSource.java Tue Nov  1 23:08:53 2011
@@ -15,7 +15,6 @@
 package org.apache.tapestry5.internal.services;
 
 import org.apache.tapestry5.ioc.annotations.UsesMappedConfiguration;
-import org.apache.tapestry5.ioc.services.ClassFactory;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.services.transform.ControlledPackageType;
 
@@ -57,14 +56,6 @@ public interface ComponentInstantiatorSo
     boolean exists(String className);
 
     /**
-     * Returns a class factory that can be used to generate additional classes around enhanced classes, or create
-     * subclasses of enhanced classes.
-     *
-     * @deprecated Deprecated in 5.3, to be removed in 5.4
-     */
-    ClassFactory getClassFactory();
-
-    /**
      * Returns a proxy factory that can be used to generate additional classes around enhanced classes, or create
      * subclasses of enhanced classes.
      *

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java Tue Nov  1 23:08:53 2011
@@ -27,14 +27,12 @@ import org.apache.tapestry5.ioc.Resource
 import org.apache.tapestry5.ioc.annotations.PostInjection;
 import org.apache.tapestry5.ioc.annotations.Primary;
 import org.apache.tapestry5.ioc.annotations.Symbol;
-import org.apache.tapestry5.ioc.internal.services.ClassFactoryImpl;
 import org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl;
 import org.apache.tapestry5.ioc.internal.util.ClasspathResource;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.internal.util.URLChangeTracker;
 import org.apache.tapestry5.ioc.services.Builtin;
-import org.apache.tapestry5.ioc.services.ClassFactory;
 import org.apache.tapestry5.ioc.services.ClasspathURLConverter;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.model.ComponentModel;
@@ -80,10 +78,6 @@ public final class ComponentInstantiator
 
     private final ComponentClassResolver resolver;
 
-    // These change whenever the invalidation event hub sends an invalidation notification
-
-    private volatile ClassFactory classFactory;
-
     private volatile PlasticProxyFactory proxyFactory;
 
     private volatile PlasticManager manager;
@@ -199,8 +193,6 @@ public final class ComponentInstantiator
 
         manager.addPlasticClassListener(this);
 
-        classFactory = new ClassFactoryImpl(manager.getClassLoader(), logger);
-
         proxyFactory = new PlasticProxyFactoryImpl(manager, logger);
 
         classToInstantiator.clear();
@@ -263,11 +255,6 @@ public final class ComponentInstantiator
         return parent.getResource(PlasticInternalUtils.toClassPath(className)) != null;
     }
 
-    public ClassFactory getClassFactory()
-    {
-        return classFactory;
-    }
-
     public PlasticProxyFactory getProxyFactory()
     {
         return proxyFactory;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java Tue Nov  1 23:08:53 2011
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2010 The Apache Software Foundation
+// Copyright 2007, 2008, 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.
@@ -14,17 +14,17 @@
 
 package org.apache.tapestry5.internal.services;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-
 import org.apache.tapestry5.func.F;
 import org.apache.tapestry5.func.Mapper;
-import org.apache.tapestry5.ioc.services.ClassFabUtils;
 import org.apache.tapestry5.ioc.util.AvailableValues;
 import org.apache.tapestry5.ioc.util.UnknownValueException;
+import org.apache.tapestry5.plastic.PlasticUtils;
 import org.apache.tapestry5.services.ComponentEventResultProcessor;
 
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+
 /**
  * A catch-all for type Object that reports the return value as an error.
  */
@@ -44,13 +44,13 @@ public class ObjectComponentEventResultP
         {
             public String map(Class input)
             {
-                return ClassFabUtils.toJavaClassName(input);
+                return PlasticUtils.toTypeName(input);
             }
         }).toList();
 
         String message = String.format(
                 "A component event handler method returned the value %s. Return type %s can not be handled.", value,
-                ClassFabUtils.toJavaClassName(value.getClass()));
+                PlasticUtils.toTypeName(value.getClass()));
 
         throw new UnknownValueException(message, new AvailableValues("Configured return types", names));
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ServicesMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ServicesMessages.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ServicesMessages.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ServicesMessages.java Tue Nov  1 23:08:53 2011
@@ -22,6 +22,7 @@ import org.apache.tapestry5.ioc.Resource
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.internal.util.MessagesImpl;
 import org.apache.tapestry5.ioc.services.ClassFabUtils;
+import org.apache.tapestry5.plastic.PlasticUtils;
 import org.apache.tapestry5.runtime.Component;
 import org.apache.tapestry5.runtime.RenderCommand;
 
@@ -188,12 +189,6 @@ public class ServicesMessages
         return MESSAGES.format(messageKey, idValue);
     }
 
-    public static String noTranslatorForType(Class valueType, Collection<String> typeNames)
-    {
-        return MESSAGES.format("no-translator-for-type", ClassFabUtils.toJavaClassName(valueType), InternalUtils
-                .joinSorted(typeNames));
-    }
-
     public static String eventNotHandled(ComponentPageElement element, String eventName)
     {
         return MESSAGES.format("event-not-handled", eventName, element.getCompleteId());

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TranslatorSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TranslatorSourceImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TranslatorSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/TranslatorSourceImpl.java Tue Nov  1 23:08:53 2011
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2010 The Apache Software Foundation
+// Copyright 2007, 2008, 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.
@@ -14,18 +14,20 @@
 
 package org.apache.tapestry5.internal.services;
 
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tapestry5.Translator;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.util.AvailableValues;
 import org.apache.tapestry5.ioc.util.StrategyRegistry;
 import org.apache.tapestry5.ioc.util.UnknownValueException;
+import org.apache.tapestry5.plastic.PlasticUtils;
 import org.apache.tapestry5.services.InvalidationListener;
 import org.apache.tapestry5.services.TranslatorSource;
 
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
 @SuppressWarnings("unchecked")
 public class TranslatorSourceImpl implements TranslatorSource, InvalidationListener
 {
@@ -105,7 +107,8 @@ public class TranslatorSourceImpl implem
                 names.add(type.getName());
             }
 
-            throw new IllegalArgumentException(ServicesMessages.noTranslatorForType(valueType, names));
+            throw new IllegalArgumentException(String.format("No translator is defined for type %s.  Registered types: %s.", PlasticUtils.toTypeName(valueType), InternalUtils
+                    .joinSorted(names)));
         }
 
         return result;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java Tue Nov  1 23:08:53 2011
@@ -965,7 +965,7 @@ public final class TapestryModule
      * <li>null to {@link GridDataSource}
      * <li>List to {@link SelectModel}
      * <li>{@link ComponentResourcesAware} (typically, a component) to {@link ComponentResources}
-     * <li> {@link ComponentResources} to {@link PropertyOverrides}
+     * <li>{@link ComponentResources} to {@link PropertyOverrides}
      * <li>String to {@link Renderable}
      * <li>{@link Renderable} to {@link Block}
      * <li>String to {@link DateFormat}
@@ -973,8 +973,6 @@ public final class TapestryModule
      * <li>{@link Renderable} to {@link RenderCommand}</li>
      * <li>String to {@link Pattern}</li>
      * <li>String to {@link DateFormat}</li>
-     * <li>{@link ComponentClassTransformWorker} to {@link ComponentClassTransformWorker2}</li>
-     * <li>{@link InjectionProvider} to {@link InjectionProvider2}</li>
      * <li>{@link Resource} to {@link DynamicTemplate}</li>
      * <li>{@link Asset} to {@link Resource}</li>
      * <li>{@link ValueEncoder} to {@link ValueEncoderFactory}</li>
@@ -992,9 +990,6 @@ public final class TapestryModule
                                              final AssetSource assetSource,
 
                                              @Core
-                                             final ComponentClassCache classCache,
-
-                                             @Core
                                              final DynamicTemplateParser dynamicTemplateParser)
     {
         configuration.add(CoercionTuple.create(ComponentResources.class, PropertyOverrides.class,
@@ -1152,8 +1147,6 @@ public final class TapestryModule
 
         configuration.add(CoercionTuple.create(String.class, ClientValidation.class, stringToClientValidationCoercion));
 
-        configuration.add(CCTWToCCTW2Coercion.TUPLE);
-
         configuration.add(CoercionTuple.create(ValueEncoder.class, ValueEncoderFactory.class, new Coercion<ValueEncoder, ValueEncoderFactory>()
         {
             public ValueEncoderFactory coerce(ValueEncoder input)
@@ -1161,9 +1154,6 @@ public final class TapestryModule
                 return new GenericValueEncoderFactory(input);
             }
         }));
-
-        configuration.add(CoercionTuple.create(InjectionProvider.class, InjectionProvider2.class,
-                new InjectionProviderToInjectionProvider2(classCache)));
     }
 
     /**
@@ -1813,8 +1803,6 @@ public final class TapestryModule
             }
         };
 
-        configuration.add(ClassTransformation.class, preformatted);
-
         configuration.addInstance(List.class, ListRenderer.class);
         configuration.addInstance(Object[].class, ObjectArrayRenderer.class);
         configuration.addInstance(ComponentResources.class, ComponentResourcesRenderer.class);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformConstants.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformConstants.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TransformConstants.java Tue Nov  1 23:08:53 2011
@@ -27,12 +27,11 @@ import org.apache.tapestry5.services.tra
 import java.lang.reflect.Modifier;
 
 /**
- * Constants used by implementations of {@link org.apache.tapestry5.services.ComponentClassTransformWorker} and
- * {@link ComponentClassTransformWorker2}.
+ * Constants used by implementations {@link ComponentClassTransformWorker2}.
  * <p/>
- * Note: methods on transformed components will not be invoked <em>unless</em>
+ * Note: render phase methods on transformed components will not be invoked <em>unless</em>
  * {@linkplain org.apache.tapestry5.model.MutableComponentModel#addRenderPhase(Class) the component model is updated to
- * identify the use of the corresponding render phase}.
+ * identify the use of the corresponding render phase}. This represents an optimization introduced in Tapestry 5.1.
  */
 public final class TransformConstants
 {
@@ -41,17 +40,6 @@ public final class TransformConstants
     private static final String[] RENDER_PHASE_METHOD_PARAMETERS =
             {MarkupWriter.class.getName(), Event.class.getName()};
 
-    /**
-     * Signature for
-     * {@link org.apache.tapestry5.runtime.Component#dispatchComponentEvent(org.apache.tapestry5.runtime.ComponentEvent)}
-     * .
-     *
-     * @see org.apache.tapestry5.annotations.OnEvent
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #DISPATCH_COMPONENT_EVENT_DESCRIPTION}.
-     */
-    public static final TransformMethodSignature DISPATCH_COMPONENT_EVENT = new TransformMethodSignature(
-            Modifier.PUBLIC, "boolean", "dispatchComponentEvent", new String[]
-            {ComponentEvent.class.getName()}, null);
 
     /**
      * Description for
@@ -64,13 +52,6 @@ public final class TransformConstants
     public static final MethodDescription DISPATCH_COMPONENT_EVENT_DESCRIPTION = PlasticUtils.getMethodDescription(
             Component.class, "dispatchComponentEvent", ComponentEvent.class);
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidLoad()}.
-     *
-     * @deprecated Deprecated in 5.3, use {@link #CONTAINING_PAGE_DID_LOAD_DESCRIPTION}.
-     */
-    public static final TransformMethodSignature CONTAINING_PAGE_DID_LOAD_SIGNATURE = new TransformMethodSignature(
-            "containingPageDidLoad");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidLoad()}.
@@ -90,12 +71,6 @@ public final class TransformConstants
      */
     public static final MethodDescription CONTAINING_PAGE_DID_RESET_DESCRIPTION = PlasticUtils.getMethodDescription(PageResetListener.class, "containingPageDidReset");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#postRenderCleanup()}.
-     */
-    public static final TransformMethodSignature POST_RENDER_CLEANUP_SIGNATURE = new TransformMethodSignature(
-            "postRenderCleanup");
-
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#postRenderCleanup()}.
@@ -104,13 +79,6 @@ public final class TransformConstants
      */
     public static final MethodDescription POST_RENDER_CLEANUP_DESCRIPTION = PlasticUtils.getMethodDescription(Component.class, "postRenderCleanup");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidDetach()}.
-     *
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #CONTAINING_PAGE_DID_DETACH_DESCRIPTION}
-     */
-    public static final TransformMethodSignature CONTAINING_PAGE_DID_DETACH_SIGNATURE = new TransformMethodSignature(
-            "containingPageDidDetach");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidDetach()}.
@@ -120,13 +88,6 @@ public final class TransformConstants
      */
     public static final MethodDescription CONTAINING_PAGE_DID_DETACH_DESCRIPTION = PlasticUtils.getMethodDescription(PageLifecycleListener.class, "containingPageDidDetach");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidAttach()}.
-     *
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #CONTAINING_PAGE_DID_ATTACH_DESCRIPTION}
-     */
-    public static final TransformMethodSignature CONTAINING_PAGE_DID_ATTACH_SIGNATURE = new TransformMethodSignature(
-            "containingPageDidAttach");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.PageLifecycleListener#containingPageDidAttach()}.
@@ -136,22 +97,6 @@ public final class TransformConstants
      */
     public static final MethodDescription CONTAINING_PAGE_DID_ATTACH_DESCRIPTION = PlasticUtils.getMethodDescription(PageLifecycleListener.class, "containingPageDidAttach");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.PageLifecycleListener#restoreStateBeforePageAttach()}
-     *
-     * @since 5.1.0.1
-     * @deprecated Deprecated in 5.3, with no replacement.
-     */
-    public static final TransformMethodSignature RESTORE_STATE_BEFORE_PAGE_ATTACH_SIGNATURE = new TransformMethodSignature(
-            "restoreStateBeforePageAttach");
-
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#setupRender(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.SetupRender
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #SETUP_RENDER_DESCRIPTION}
-     */
-    public static final TransformMethodSignature SETUP_RENDER_SIGNATURE = renderPhaseSignature("setupRender");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#setupRender(MarkupWriter, Event)}.
@@ -161,13 +106,6 @@ public final class TransformConstants
      */
     public static final MethodDescription SETUP_RENDER_DESCRIPTION = renderPhaseDescription("setupRender");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#beginRender(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.BeginRender
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #BEGIN_RENDER_DESCRIPTION}
-     */
-    public static final TransformMethodSignature BEGIN_RENDER_SIGNATURE = renderPhaseSignature("beginRender");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#beginRender(MarkupWriter, Event)}.
@@ -177,13 +115,6 @@ public final class TransformConstants
      */
     public static final MethodDescription BEGIN_RENDER_DESCRIPTION = renderPhaseDescription("beginRender");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#beforeRenderTemplate(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.BeforeRenderTemplate
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #BEFORE_RENDER_TEMPLATE_DESCRIPTION}
-     */
-    public static final TransformMethodSignature BEFORE_RENDER_TEMPLATE_SIGNATURE = renderPhaseSignature("beforeRenderTemplate");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#beforeRenderTemplate(MarkupWriter, Event)}.
@@ -193,13 +124,6 @@ public final class TransformConstants
      */
     public static final MethodDescription BEFORE_RENDER_TEMPLATE_DESCRIPTION = renderPhaseDescription("beforeRenderTemplate");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#afterRenderTemplate(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.BeforeRenderTemplate
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #AFTER_RENDER_TEMPLATE_DESCRIPTION}
-     */
-    public static final TransformMethodSignature AFTER_RENDER_TEMPLATE_SIGNATURE = renderPhaseSignature("afterRenderTemplate");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#afterRenderTemplate(MarkupWriter, Event)}.
@@ -209,13 +133,6 @@ public final class TransformConstants
      */
     public static final MethodDescription AFTER_RENDER_TEMPLATE_DESCRIPTION = renderPhaseDescription("afterRenderTemplate");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#beforeRenderBody(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.BeforeRenderBody
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #BEFORE_RENDER_BODY_DESCRIPTION}
-     */
-    public static final TransformMethodSignature BEFORE_RENDER_BODY_SIGNATURE = renderPhaseSignature("beforeRenderBody");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#beforeRenderBody(MarkupWriter, Event)}.
@@ -225,14 +142,6 @@ public final class TransformConstants
      */
     public static final MethodDescription BEFORE_RENDER_BODY_DESCRIPTION = renderPhaseDescription("beforeRenderBody");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#afterRenderBody(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.AfterRenderBody
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #AFTER_RENDER_BODY_DESCRIPTION}
-     */
-    public static final TransformMethodSignature AFTER_RENDER_BODY_SIGNATURE = renderPhaseSignature("afterRenderBody");
-
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#afterRenderBody(MarkupWriter, Event)}.
@@ -242,13 +151,6 @@ public final class TransformConstants
      */
     public static final MethodDescription AFTER_RENDER_BODY_DESCRIPTION = renderPhaseDescription("afterRenderBody");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#afterRender(MarkupWriter, Event)}
-     *
-     * @see org.apache.tapestry5.annotations.AfterRender
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #AFTER_RENDER_DESCRIPTION}
-     */
-    public static final TransformMethodSignature AFTER_RENDER_SIGNATURE = renderPhaseSignature("afterRender");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#afterRender(MarkupWriter, Event)}
@@ -258,13 +160,6 @@ public final class TransformConstants
      */
     public static final MethodDescription AFTER_RENDER_DESCRIPTION = renderPhaseDescription("afterRender");
 
-    /**
-     * Signature for {@link org.apache.tapestry5.runtime.Component#cleanupRender(MarkupWriter, Event)}.
-     *
-     * @see org.apache.tapestry5.annotations.CleanupRender
-     * @deprecated Deprecated in Tapestry 5.3, use {@link #CLEANUP_RENDER_DESCRIPTION}
-     */
-    public static final TransformMethodSignature CLEANUP_RENDER_SIGNATURE = renderPhaseSignature("cleanupRender");
 
     /**
      * Description for {@link org.apache.tapestry5.runtime.Component#cleanupRender(MarkupWriter, Event)}.
@@ -274,10 +169,6 @@ public final class TransformConstants
      */
     public static final MethodDescription CLEANUP_RENDER_DESCRIPTION = renderPhaseDescription("cleanupRender");
 
-    private static TransformMethodSignature renderPhaseSignature(String name)
-    {
-        return new TransformMethodSignature(Modifier.PUBLIC, "void", name, RENDER_PHASE_METHOD_PARAMETERS, null);
-    }
 
     private static MethodDescription renderPhaseDescription(String name)
     {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/transform/ComponentClassTransformWorker2.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/transform/ComponentClassTransformWorker2.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/transform/ComponentClassTransformWorker2.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/transform/ComponentClassTransformWorker2.java Tue Nov  1 23:08:53 2011
@@ -18,31 +18,26 @@ import org.apache.tapestry5.ioc.annotati
 import org.apache.tapestry5.ioc.services.ChainBuilder;
 import org.apache.tapestry5.model.MutableComponentModel;
 import org.apache.tapestry5.plastic.PlasticClass;
-import org.apache.tapestry5.services.ComponentClassTransformWorker;
 
 /**
  * Interface for a set of objects that can perform transformation of component classes. Implementations should
  * be thread safe and ideally stateless (all necessary state can be stored inside the {@link PlasticClass}).
- * <p>
+ * <p/>
  * The ComponentClassTransformWorker service uses an ordered configuration of these works as a {@linkplain ChainBuilder
- * chain of command}. For compatibility with the code compiled for Tapestry 5.2, contributions of type
- * {@link ComponentClassTransformWorker} are type coerced into this type automatically.
- * 
- * @since 5.3
+ * chain of command}.
+ *
  * @see PlasticClass
+ * @since 5.3
  */
 @UsesOrderedConfiguration(ComponentClassTransformWorker2.class)
 public interface ComponentClassTransformWorker2
 {
     /**
      * Invoked to perform part of the transformation of the {@link PlasticClass}.
-     * 
-     * @param plasticClass
-     *            component class being transformed
-     * @param support
-     *            additional utilities needed during the transformation
-     * @param model
-     *            the model for the component being transformed
+     *
+     * @param plasticClass component class being transformed
+     * @param support      additional utilities needed during the transformation
+     * @param model        the model for the component being transformed
      */
     void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model);
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java Tue Nov  1 23:08:53 2011
@@ -14,56 +14,15 @@
 
 package org.apache.tapestry5.test;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.tapestry5.Asset;
-import org.apache.tapestry5.Asset2;
-import org.apache.tapestry5.Binding;
-import org.apache.tapestry5.Block;
-import org.apache.tapestry5.ClientElement;
-import org.apache.tapestry5.ComponentEventCallback;
-import org.apache.tapestry5.ComponentResources;
-import org.apache.tapestry5.ComponentResourcesCommon;
-import org.apache.tapestry5.Field;
-import org.apache.tapestry5.FieldTranslator;
-import org.apache.tapestry5.FieldValidationSupport;
-import org.apache.tapestry5.FieldValidator;
-import org.apache.tapestry5.Link;
-import org.apache.tapestry5.MarkupWriter;
-import org.apache.tapestry5.NullFieldStrategy;
-import org.apache.tapestry5.PropertyConduit;
-import org.apache.tapestry5.PropertyOverrides;
-import org.apache.tapestry5.Translator;
-import org.apache.tapestry5.ValidationDecorator;
-import org.apache.tapestry5.ValidationTracker;
-import org.apache.tapestry5.Validator;
-import org.apache.tapestry5.ValueEncoder;
+import org.apache.tapestry5.*;
 import org.apache.tapestry5.annotations.Id;
 import org.apache.tapestry5.annotations.Parameter;
 import org.apache.tapestry5.annotations.Path;
 import org.apache.tapestry5.beaneditor.BeanModel;
 import org.apache.tapestry5.beaneditor.PropertyModel;
-import org.apache.tapestry5.func.Predicate;
 import org.apache.tapestry5.internal.services.MapMessages;
 import org.apache.tapestry5.internal.services.MarkupWriterImpl;
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.Locatable;
-import org.apache.tapestry5.ioc.Location;
-import org.apache.tapestry5.ioc.Messages;
-import org.apache.tapestry5.ioc.ObjectLocator;
-import org.apache.tapestry5.ioc.Resource;
+import org.apache.tapestry5.ioc.*;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
@@ -73,47 +32,22 @@ import org.apache.tapestry5.model.Embedd
 import org.apache.tapestry5.model.MutableComponentModel;
 import org.apache.tapestry5.model.ParameterModel;
 import org.apache.tapestry5.runtime.Component;
-import org.apache.tapestry5.services.ApplicationStateCreator;
-import org.apache.tapestry5.services.ApplicationStateManager;
-import org.apache.tapestry5.services.ApplicationStatePersistenceStrategy;
-import org.apache.tapestry5.services.ApplicationStatePersistenceStrategySource;
-import org.apache.tapestry5.services.AssetFactory;
-import org.apache.tapestry5.services.AssetSource;
-import org.apache.tapestry5.services.BaseURLSource;
-import org.apache.tapestry5.services.BeanModelSource;
-import org.apache.tapestry5.services.BindingFactory;
-import org.apache.tapestry5.services.BindingSource;
-import org.apache.tapestry5.services.ClassTransformation;
-import org.apache.tapestry5.services.ClasspathAssetAliasManager;
-import org.apache.tapestry5.services.ComponentClassResolver;
-import org.apache.tapestry5.services.ComponentEventRequestHandler;
-import org.apache.tapestry5.services.ComponentEventResultProcessor;
-import org.apache.tapestry5.services.ComponentRequestHandler;
-import org.apache.tapestry5.services.Context;
-import org.apache.tapestry5.services.Environment;
-import org.apache.tapestry5.services.FieldTranslatorSource;
-import org.apache.tapestry5.services.FieldValidatorSource;
-import org.apache.tapestry5.services.FormSupport;
-import org.apache.tapestry5.services.Heartbeat;
-import org.apache.tapestry5.services.HttpServletRequestHandler;
-import org.apache.tapestry5.services.InjectionProvider;
-import org.apache.tapestry5.services.MetaDataLocator;
-import org.apache.tapestry5.services.PageRenderLinkSource;
-import org.apache.tapestry5.services.Request;
-import org.apache.tapestry5.services.RequestGlobals;
-import org.apache.tapestry5.services.RequestHandler;
-import org.apache.tapestry5.services.ResourceDigestGenerator;
-import org.apache.tapestry5.services.Response;
-import org.apache.tapestry5.services.Session;
-import org.apache.tapestry5.services.TransformField;
-import org.apache.tapestry5.services.TransformMethodSignature;
-import org.apache.tapestry5.services.TranslatorSource;
-import org.apache.tapestry5.services.ValidationConstraintGenerator;
-import org.apache.tapestry5.services.ValueEncoderSource;
+import org.apache.tapestry5.services.*;
 import org.apache.tapestry5.services.javascript.JavaScriptSupport;
-import org.easymock.EasyMock;
 import org.easymock.IAnswer;
 
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+
 /**
  * Base test case that adds a number of convenience factory and training methods for the public
  * interfaces of
@@ -190,11 +124,6 @@ public abstract class TapestryTestCase e
         return newMock(ClasspathAssetAliasManager.class);
     }
 
-    protected final ClassTransformation mockClassTransformation()
-    {
-        return newMock(ClassTransformation.class);
-    }
-
     protected final Component mockComponent()
     {
         return newMock(Component.class);
@@ -360,7 +289,7 @@ public abstract class TapestryTestCase e
     }
 
     protected final void train_buildConstraints(ValidationConstraintGenerator generator, Class propertyType,
-            AnnotationProvider provider, String... constraints)
+                                                AnnotationProvider provider, String... constraints)
     {
         expect(generator.buildConstraints(propertyType, provider)).andReturn(Arrays.asList(constraints));
     }
@@ -376,7 +305,7 @@ public abstract class TapestryTestCase e
     }
 
     protected final void train_createValidator(FieldValidatorSource source, Field field, String validatorType,
-            String constraintValue, String overrideId, Messages overrideMessages, Locale locale, FieldValidator result)
+                                               String constraintValue, String overrideId, Messages overrideMessages, Locale locale, FieldValidator result)
     {
         expect(source.createValidator(field, validatorType, constraintValue, overrideId, overrideMessages, locale))
                 .andReturn(result);
@@ -393,7 +322,7 @@ public abstract class TapestryTestCase e
     }
 
     protected final <T> void train_exists(ApplicationStatePersistenceStrategy strategy, Class<T> asoClass,
-            boolean exists)
+                                          boolean exists)
     {
         expect(strategy.exists(asoClass)).andReturn(exists);
     }
@@ -403,35 +332,19 @@ public abstract class TapestryTestCase e
         expect(source.getAsset(root, path, locale)).andReturn(asset);
     }
 
-    protected final void train_matchFields(ClassTransformation transformation, TransformField field)
-    {
-        expect(transformation.matchFields(EasyMock.isA(Predicate.class))).andReturn(Arrays.asList(field));
-    }
-
-    protected final void train_getName(TransformField field, String name)
-    {
-        expect(field.getName()).andReturn(name);
-    }
-
-    protected final <T extends Annotation> void train_getAnnotation(TransformField field, Class<T> annotationClass,
-            T anotation)
-    {
-        expect(field.getAnnotation(annotationClass)).andReturn(anotation);
-    }
-
     protected final void train_generateChecksum(ResourceDigestGenerator generator, URL url, String digest)
     {
         expect(generator.generateDigest(url)).andReturn(digest);
     }
 
     protected final <T> void train_get(ApplicationStatePersistenceStrategy strategy, Class<T> asoClass,
-            ApplicationStateCreator<T> creator, T aso)
+                                       ApplicationStateCreator<T> creator, T aso)
     {
         expect(strategy.get(asoClass, creator)).andReturn(aso);
     }
 
     protected final void train_get(ApplicationStatePersistenceStrategySource source, String strategyName,
-            ApplicationStatePersistenceStrategy strategy)
+                                   ApplicationStatePersistenceStrategy strategy)
     {
         expect(source.get(strategyName)).andReturn(strategy).atLeastOnce();
     }
@@ -461,11 +374,6 @@ public abstract class TapestryTestCase e
         expect(model.getBaseResource()).andReturn(resource).atLeastOnce();
     }
 
-    protected final void train_getClassName(ClassTransformation transformation, String className)
-    {
-        expect(transformation.getClassName()).andReturn(className).atLeastOnce();
-    }
-
     protected final void train_getClasspathAsset(AssetSource source, String path, Asset asset)
     {
         expect(source.getClasspathAsset(path)).andReturn(asset);
@@ -571,8 +479,7 @@ public abstract class TapestryTestCase e
         try
         {
             expect(response.getOutputStream()).andReturn(stream);
-        }
-        catch (IOException e)
+        } catch (IOException e)
         {
             fail(e.getMessage(), e);
         }
@@ -584,7 +491,7 @@ public abstract class TapestryTestCase e
     }
 
     protected final void train_getParameterModel(ComponentModel model, String parameterName,
-            ParameterModel parameterModel)
+                                                 ParameterModel parameterModel)
     {
         expect(model.getParameterModel(parameterName)).andReturn(parameterModel).atLeastOnce();
     }
@@ -671,29 +578,18 @@ public abstract class TapestryTestCase e
     }
 
     protected final void train_newBinding(BindingFactory factory, String description, ComponentResources container,
-            ComponentResources component, String expression, Location l, Binding binding)
+                                          ComponentResources component, String expression, Location l, Binding binding)
     {
         expect(factory.newBinding(description, container, component, expression, l)).andReturn(binding);
     }
 
     protected void train_newBinding(BindingSource bindingSource, String description,
-            ComponentResources componentResources, String defaultBindingPrefix, String expression, Binding binding)
+                                    ComponentResources componentResources, String defaultBindingPrefix, String expression, Binding binding)
     {
         expect(bindingSource.newBinding(description, componentResources, defaultBindingPrefix, expression)).andReturn(
                 binding);
     }
 
-    protected final void train_newMemberName(ClassTransformation transformation, String suggested, String name)
-    {
-        expect(transformation.newMemberName(suggested)).andReturn(name);
-    }
-
-    protected final void train_newMemberName(ClassTransformation transformation, String prefix, String baseName,
-            String name)
-    {
-        expect(transformation.newMemberName(prefix, baseName)).andReturn(name);
-    }
-
     protected final <T> void train_peek(Environment env, Class<T> type, T value)
     {
         expect(env.peek(type)).andReturn(value);
@@ -704,15 +600,9 @@ public abstract class TapestryTestCase e
         expect(env.peekRequired(type)).andReturn(value);
     }
 
-    protected final void train_provideInjection(InjectionProvider provider, String fieldName, Class fieldType,
-            ObjectLocator locator, ClassTransformation transformation, MutableComponentModel model, boolean result)
-    {
-        expect(provider.provideInjection(fieldName, fieldType, locator, transformation, model)).andReturn(result);
-    }
-
     @SuppressWarnings("unchecked")
     protected final void train_renderInformalParameters(ComponentResources resources, final MarkupWriter writer,
-            final Object... informals)
+                                                        final Object... informals)
     {
         resources.renderInformalParameters(writer);
         IAnswer answer = new IAnswer()
@@ -754,11 +644,6 @@ public abstract class TapestryTestCase e
         response.setDateHeader(headerName, date);
     }
 
-    protected final void train_toClass(ClassTransformation transformation, String type, Class classForType)
-    {
-        expect(transformation.toClass(type)).andReturn(classForType);
-    }
-
     protected final void train_toClientURL(Asset asset, String URL)
     {
         expect(asset.toClientURL()).andReturn(URL).atLeastOnce();
@@ -834,9 +719,8 @@ public abstract class TapestryTestCase e
      * file for the class
      * (NOT any localization of it). Only the messages directly in the .properties file is
      * available.
-     * 
-     * @param componentClass
-     *            component class whose messages are needed *
+     *
+     * @param componentClass component class whose messages are needed *
      * @return the Messages instance
      */
     protected final Messages messagesFor(Class componentClass) throws IOException
@@ -856,8 +740,7 @@ public abstract class TapestryTestCase e
                         componentClass.getName()));
 
             properties.load(is);
-        }
-        finally
+        } finally
         {
             InternalUtils.close(is);
         }
@@ -911,7 +794,7 @@ public abstract class TapestryTestCase e
     }
 
     protected final void train_service(HttpServletRequestHandler handler, HttpServletRequest request,
-            HttpServletResponse response, boolean result) throws IOException
+                                       HttpServletResponse response, boolean result) throws IOException
     {
         expect(handler.service(request, response)).andReturn(result);
     }
@@ -957,7 +840,7 @@ public abstract class TapestryTestCase e
     }
 
     protected <T> void train_findMeta(MetaDataLocator locator, String key, ComponentResources resources,
-            Class<T> expectedType, T value)
+                                      Class<T> expectedType, T value)
     {
         expect(locator.findMeta(key, resources, expectedType)).andReturn(value).atLeastOnce();
     }
@@ -1052,13 +935,8 @@ public abstract class TapestryTestCase e
         expect(translator.getType()).andReturn(type).atLeastOnce();
     }
 
-    protected final void train_getType(TransformField field, String type)
-    {
-        expect(field.getType()).andReturn(type).atLeastOnce();
-    }
-
     protected final void train_createDefaultTranslator(FieldTranslatorSource source, ComponentResources resources,
-            String parameterName, FieldTranslator translator)
+                                                       String parameterName, FieldTranslator translator)
     {
         expect(source.createDefaultTranslator(resources, parameterName)).andReturn(translator);
     }
@@ -1089,7 +967,7 @@ public abstract class TapestryTestCase e
     }
 
     protected final void train_createEditModel(BeanModelSource source, Class beanClass, Messages messages,
-            BeanModel model)
+                                               BeanModel model)
     {
         expect(source.createEditModel(beanClass, messages)).andReturn(model);
     }
@@ -1134,7 +1012,9 @@ public abstract class TapestryTestCase e
         return newMock(Asset2.class);
     }
 
-    /** @since 5.2.0 */
+    /**
+     * @since 5.2.0
+     */
     protected final RequestGlobals mockRequestGlobals()
     {
         return newMock(RequestGlobals.class);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/services/ServicesStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/services/ServicesStrings.properties?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/services/ServicesStrings.properties (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/services/ServicesStrings.properties Tue Nov  1 23:08:53 2011
@@ -50,7 +50,6 @@ no-markup-from-page-render=Page %s did n
 base-class-in-wrong-package=Base class %s (super class of %s) is not in a controlled package and is therefore not valid. You should try moving the class to package %s.
 invalid-component-id=Component id '%s' is not valid; component ids must be valid Java identifiers: start with a letter, and consist of letters, numbers and underscores.
 invalid-block-id=Block id '%s' is not valid; block ids must be valid Java identifiers: start with a letter, and consist of letters, numbers and underscores. 
-no-translator-for-type=No translator is defined for type %s.  Registered types: %s.
 event-not-handled=Request event '%s' (on component %s) was not handled; you must provide a matching event handler method in the component or in one of its containers.
 document-missing-html-root=The root element of the rendered document was <%s>, not <html>. A root element of <html> is needed when linking JavaScript and stylesheet resources.
 parameter-element-does-not-allow-attributes=A block parameter element does not allow any additional attributes. The element name defines the parameter name.

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java Tue Nov  1 23:08:53 2011
@@ -19,28 +19,16 @@ import org.apache.tapestry5.ValueEncoder
 import org.apache.tapestry5.integration.app1.data.ToDoItem;
 import org.apache.tapestry5.integration.app1.data.Track;
 import org.apache.tapestry5.internal.services.GenericValueEncoderFactory;
-import org.apache.tapestry5.ioc.Configuration;
-import org.apache.tapestry5.ioc.MappedConfiguration;
-import org.apache.tapestry5.ioc.OrderedConfiguration;
-import org.apache.tapestry5.ioc.Resource;
-import org.apache.tapestry5.ioc.ServiceBinder;
+import org.apache.tapestry5.ioc.*;
 import org.apache.tapestry5.ioc.annotations.Contribute;
 import org.apache.tapestry5.ioc.annotations.Marker;
 import org.apache.tapestry5.ioc.annotations.Value;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.services.ServiceOverride;
-import org.apache.tapestry5.services.BaseURLSource;
-import org.apache.tapestry5.services.ComponentClassResolver;
-import org.apache.tapestry5.services.ComponentClassTransformWorker;
-import org.apache.tapestry5.services.LibraryMapping;
-import org.apache.tapestry5.services.Request;
-import org.apache.tapestry5.services.RequestFilter;
-import org.apache.tapestry5.services.RequestHandler;
-import org.apache.tapestry5.services.ResourceDigestGenerator;
-import org.apache.tapestry5.services.Response;
-import org.apache.tapestry5.services.ValueEncoderFactory;
+import org.apache.tapestry5.services.*;
 import org.apache.tapestry5.services.security.ClientWhitelist;
 import org.apache.tapestry5.services.security.WhitelistAnalyzer;
+import org.apache.tapestry5.services.transform.ComponentClassTransformWorker2;
 import org.slf4j.Logger;
 
 import java.io.IOException;
@@ -280,7 +268,7 @@ public class AppModule
     }
 
     public static void contributeComponentClassTransformWorker(
-            OrderedConfiguration<ComponentClassTransformWorker> configuration)
+            OrderedConfiguration<ComponentClassTransformWorker2> configuration)
     {
         configuration.add("ReverseStringsWorker", new ReverseStringsWorker());
     }
@@ -306,14 +294,14 @@ public class AppModule
     @Contribute(ClientWhitelist.class)
     public static void provideWhitelistAnalyzer(OrderedConfiguration<WhitelistAnalyzer> configuration)
     {
-       configuration.add("TestAnalyzer", new WhitelistAnalyzer()
-       {
+        configuration.add("TestAnalyzer", new WhitelistAnalyzer()
+        {
 
-           public boolean isRequestOnWhitelist(Request request)
-           {
-               return true;
-           }
-       }, "before:*");
+            public boolean isRequestOnWhitelist(Request request)
+            {
+                return true;
+            }
+        }, "before:*");
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ReverseStringsWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ReverseStringsWorker.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ReverseStringsWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ReverseStringsWorker.java Tue Nov  1 23:08:53 2011
@@ -15,41 +15,48 @@
 package org.apache.tapestry5.integration.app1.services;
 
 import org.apache.tapestry5.model.MutableComponentModel;
-import org.apache.tapestry5.services.*;
+import org.apache.tapestry5.plastic.MethodAdvice;
+import org.apache.tapestry5.plastic.MethodInvocation;
+import org.apache.tapestry5.plastic.PlasticClass;
+import org.apache.tapestry5.plastic.PlasticMethod;
+import org.apache.tapestry5.services.transform.ComponentClassTransformWorker2;
+import org.apache.tapestry5.services.transform.TransformationSupport;
 
-public class ReverseStringsWorker implements ComponentClassTransformWorker
+public class ReverseStringsWorker implements ComponentClassTransformWorker2
 {
-    private final ComponentMethodAdvice advice = new ComponentMethodAdvice()
+    private final MethodAdvice advice = new MethodAdvice()
     {
-        public void advise(ComponentMethodInvocation invocation)
+        public void advise(MethodInvocation invocation)
         {
-            for (int i = 0; i < invocation.getParameterCount(); i++)
+            Class<?>[] parameterTypes = invocation.getMethod().getParameterTypes();
+
+            for (int i = 0; i < parameterTypes.length; i++)
             {
-                if (invocation.getParameterType(i).equals(String.class))
+                if (parameterTypes[i].equals(String.class))
                 {
                     String value = (String) invocation.getParameter(i);
 
-                    invocation.override(i, reverse(value));
+                    invocation.setParameter(i, reverse(value));
                 }
             }
 
             invocation.proceed();
 
-            if (invocation.getResultType().equals(String.class))
+            if (invocation.getMethod().getReturnType().equals(String.class))
             {
-                if (invocation.isFail())
+                if (invocation.didThrowCheckedException())
                 {
-                    Exception thrown = invocation.getThrown(Exception.class);
+                    Exception thrown = invocation.getCheckedException(Exception.class);
 
-                    invocation.overrideResult(String.format("Invocation of method %s() failed with %s.",
-                            invocation.getMethodName(), thrown.getClass().getName()));
+                    invocation.setReturnValue(String.format("Invocation of method %s() failed with %s.",
+                            invocation.getMethod().getName(), thrown.getClass().getName()));
 
                     return;
                 }
 
-                String value = (String) invocation.getResult();
+                String value = (String) invocation.getReturnValue();
 
-                invocation.overrideResult(reverse(value));
+                invocation.setReturnValue(reverse(value));
             }
         }
 
@@ -67,9 +74,9 @@ public class ReverseStringsWorker implem
         }
     };
 
-    public void transform(ClassTransformation transformation, MutableComponentModel model)
+    public void transform(PlasticClass plasticClass, TransformationSupport support, MutableComponentModel model)
     {
-        for (TransformMethod method : transformation.matchMethodsWithAnnotation(ReverseStrings.class))
+        for (PlasticMethod method : plasticClass.getMethodsWithAnnotation(ReverseStrings.class))
         {
             method.addAdvice(advice);
         }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java Tue Nov  1 23:08:53 2011
@@ -24,15 +24,11 @@ import org.apache.tapestry5.internal.bin
 import org.apache.tapestry5.internal.test.InternalBaseTestCase;
 import org.apache.tapestry5.internal.util.Holder;
 import org.apache.tapestry5.internal.util.IntegerRange;
-import org.apache.tapestry5.ioc.internal.services.ClassFactoryImpl;
-import org.apache.tapestry5.ioc.services.ClassFab;
-import org.apache.tapestry5.ioc.services.ClassFactory;
 import org.apache.tapestry5.services.PropertyConduitSource;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import java.io.Serializable;
 import java.util.List;
 import java.util.Map;
 
@@ -190,6 +186,9 @@ public class PropertyConduitSourceImplTe
     @Test
     public void handle_beans_from_unexpected_classloader() throws Exception
     {
+        throw new Exception("test not yet re-implemented");
+
+        /*
         // First, create something that looks like a Hibernate proxy.
 
         ClassFactory factory = new ClassFactoryImpl();
@@ -211,6 +210,7 @@ public class PropertyConduitSourceImplTe
         PropertyConduit conduit = source.create(proxyClass, "firstName");
 
         assertEquals(conduit.get(simple), "Howard");
+        */
     }
 
     @Test

Modified: tapestry/tapestry5/trunk/tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/HibernateTransactionAdvisorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/HibernateTransactionAdvisorImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/HibernateTransactionAdvisorImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/HibernateTransactionAdvisorImpl.java Tue Nov  1 23:08:53 2011
@@ -1,4 +1,4 @@
-// Copyright 2009 The Apache Software Foundation
+// Copyright 2009, 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.
@@ -17,9 +17,9 @@ package org.apache.tapestry5.internal.hi
 import org.apache.tapestry5.hibernate.HibernateSessionManager;
 import org.apache.tapestry5.hibernate.HibernateTransactionAdvisor;
 import org.apache.tapestry5.hibernate.annotations.CommitAfter;
-import org.apache.tapestry5.ioc.Invocation;
-import org.apache.tapestry5.ioc.MethodAdvice;
 import org.apache.tapestry5.ioc.MethodAdviceReceiver;
+import org.apache.tapestry5.plastic.MethodAdvice;
+import org.apache.tapestry5.plastic.MethodInvocation;
 
 import java.lang.reflect.Method;
 
@@ -33,7 +33,7 @@ public class HibernateTransactionAdvisor
      */
     private final MethodAdvice advice = new MethodAdvice()
     {
-        public void advise(Invocation invocation)
+        public void advise(MethodInvocation invocation)
         {
             try
             {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/MethodAdviceReceiver.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/MethodAdviceReceiver.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/MethodAdviceReceiver.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/MethodAdviceReceiver.java Tue Nov  1 23:08:53 2011
@@ -14,6 +14,8 @@
 
 package org.apache.tapestry5.ioc;
 
+import org.apache.tapestry5.plastic.MethodAdvice;
+
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 
@@ -22,63 +24,37 @@ import java.lang.reflect.Method;
  */
 public interface MethodAdviceReceiver extends AnnotationAccess
 {
-    /**
-     * Adds advice for a specific method of the aspect interceptor being constructed.
-     * 
-     * @param method
-     *            method (of the interface for which an interceptor is being constructed) to be advised. Multiple
-     *            advice is allowed for a single method; the advice will be executed in the order it is added.
-     * @param advice
-     *            the advice for this particular method. Advice must be threadsafe.
-     * @deprecated Deprecated in 5.3, to be removed in 5.4. Replaced with
-     *             {@link #adviseMethod(Method, org.apache.tapestry5.plastic.MethodAdvice)}
-     */
-    void adviseMethod(Method method, MethodAdvice advice);
 
     /**
      * Advises <em>all</em> methods of the interface with the given advice.
-     * 
-     * @deprecated Deprecated in 5.3, to be removed in 5.4. Replaced with
-     *             {@link #adviseAllMethods(org.apache.tapestry5.plastic.MethodAdvice)}.
+     *
+     * @since 5.3
      */
     void adviseAllMethods(MethodAdvice advice);
 
     /**
      * Adds advice for a specific method of the aspect interceptor being constructed.
-     * 
-     * @param method
-     *            method (of the interface for which an interceptor is being constructed) to be advised. Multiple
-     *            advice is allowed for a single method; the advice will be executed in the order it is added.
-     * @param advice
-     *            the advice for this particular method. Advice must be threadsafe.
+     *
+     * @param method method (of the interface for which an interceptor is being constructed) to be advised. Multiple
+     *               advice is allowed for a single method; the advice will be executed in the order it is added.
+     * @param advice the advice for this particular method. Advice must be threadsafe.
      * @since 5.3
      */
-    void adviseMethod(Method method, org.apache.tapestry5.plastic.MethodAdvice advice);
-
-    /**
-     * Advises <em>all</em> methods of the interface with the given advice.
-     * 
-     * @since 5.3
-     */
-    void adviseAllMethods(org.apache.tapestry5.plastic.MethodAdvice advice);
+    void adviseMethod(Method method, MethodAdvice advice);
 
     /**
      * Returns the interface for which methods may be advised.
-     * 
-     * @see org.apache.tapestry5.ioc.services.MethodIterator
+     *
      * @since 5.1.0.0
      */
     Class getInterface();
 
     /**
      * Gets an annotation from a method, via {@link AnnotationAccess#getMethodAnnotationProvider(String, Class...)}.
-     * 
-     * @param <T>
-     *            type of annotation
-     * @param method
-     *            method to search
-     * @param annotationType
-     *            type of annotation
+     *
+     * @param <T>            type of annotation
+     * @param method         method to search
+     * @param annotationType type of annotation
      * @return the annotation found on the underlying implementation class (if known) or service interface, or null if
      *         not found
      */

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=1196357&r1=1196356&r2=1196357&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 Tue Nov  1 23:08:53 2011
@@ -20,12 +20,10 @@ import org.apache.tapestry5.ioc.internal
 import org.apache.tapestry5.ioc.internal.LoggerSourceImpl;
 import org.apache.tapestry5.ioc.internal.RegistryImpl;
 import org.apache.tapestry5.ioc.internal.RegistryWrapper;
-import org.apache.tapestry5.ioc.internal.services.ClassFactoryImpl;
 import org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 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;
 import org.apache.tapestry5.ioc.services.TapestryIOCModule;
 import org.slf4j.Logger;
@@ -54,8 +52,6 @@ public final class RegistryBuilder
 
     private final LoggerSource loggerSource;
 
-    private final ClassFactory classFactory;
-
     private final PlasticProxyFactory proxyFactory;
 
     private final Set<Class> addedModuleClasses = CollectionFactory.newSet();
@@ -79,10 +75,8 @@ public final class RegistryBuilder
         // Make the ClassFactory appear to be a service inside TapestryIOCModule, even before that
         // module exists.
 
-        Logger classFactoryLogger = loggerSource.getLogger(TapestryIOCModule.class.getName() + ".ClassFactory");
         Logger proxyFactoryLogger = loggerSource.getLogger(TapestryIOCModule.class.getName() + ".PlasticProxyFactory");
 
-        classFactory = new ClassFactoryImpl(this.classLoader, classFactoryLogger);
         proxyFactory = new PlasticProxyFactoryImpl(this.classLoader, proxyFactoryLogger);
 
         add(TapestryIOCModule.class);
@@ -174,7 +168,7 @@ public final class RegistryBuilder
     {
         lock.lock();
 
-        RegistryImpl registry = new RegistryImpl(modules, classFactory, proxyFactory, loggerSource);
+        RegistryImpl registry = new RegistryImpl(modules, proxyFactory, loggerSource);
 
         return new RegistryWrapper(registry);
     }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java Tue Nov  1 23:08:53 2011
@@ -22,7 +22,6 @@ 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.internal.util.MessagesImpl;
-import org.apache.tapestry5.ioc.services.ClassFabUtils;
 import org.apache.tapestry5.plastic.PlasticUtils;
 
 import java.lang.reflect.Constructor;
@@ -33,7 +32,6 @@ import java.util.List;
 import java.util.Map;
 
 import static org.apache.tapestry5.ioc.internal.util.InternalUtils.asString;
-import static org.apache.tapestry5.ioc.services.ClassFabUtils.toJavaClassName;
 
 final class IOCMessages
 {
@@ -105,7 +103,7 @@ final class IOCMessages
     static String contributionWrongReturnType(Method method)
     {
         return MESSAGES.format("contribution-wrong-return-type", asString(method),
-                toJavaClassName(method.getReturnType()));
+                PlasticUtils.toTypeName(method.getReturnType()));
     }
 
     static String tooManyContributionParameters(Method method)
@@ -228,7 +226,7 @@ final class IOCMessages
     static String noServicesMatchMarker(Class objectType, List<Class> markers)
     {
         return MESSAGES.format("no-services-match-marker",
-                ClassFabUtils.toJavaClassName(objectType),
+                PlasticUtils.toTypeName(objectType),
                 toJavaClassNames(markers));
     }
 
@@ -236,7 +234,7 @@ final class IOCMessages
                                           Collection<ServiceDef2> matchingServices)
     {
         return MESSAGES.format("many-services-match-marker",
-                ClassFabUtils.toJavaClassName(objectType),
+                PlasticUtils.toTypeName(objectType),
                 toJavaClassNames(markers),
                 InternalUtils.joinSorted(matchingServices));
     }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalRegistry.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalRegistry.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalRegistry.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalRegistry.java Tue Nov  1 23:08:53 2011
@@ -103,13 +103,6 @@ public interface InternalRegistry extend
      */
     <K, V> Map<K, V> getMappedConfiguration(ServiceDef3 serviceDef, Class<K> keyType, Class<V> valueType);
 
-    /**
-     * Convieience for creating a new {@link org.apache.tapestry5.ioc.services.ClassFab} instance using a
-     * {@link org.apache.tapestry5.ioc.services.ClassFactory}.
-     *
-     * @param serviceInterface the interface to be implemented by the provided class
-     */
-    ClassFab newClass(Class serviceInterface);
 
     /**
      * Given an input string that <em>may</em> contain symbols, returns the string with any and all symbols fully

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java Tue Nov  1 23:08:53 2011
@@ -59,12 +59,6 @@ public class RegistryImpl implements Reg
         BUILTIN.add(Builtin.class);
     }
 
-    /**
-     * Used to obtain the {@link org.apache.tapestry5.ioc.services.ClassFactory} service, which is
-     * crucial when creating
-     * runtime classes for proxies and the like.
-     */
-    static final String CLASS_FACTORY_SERVICE_ID = "ClassFactory";
 
     static final String PLASTIC_PROXY_FACTORY_SERVICE_ID = "PlasticProxyFactory";
 
@@ -91,8 +85,6 @@ public class RegistryImpl implements Reg
 
     private final PerthreadManager perthreadManager;
 
-    private final ClassFactory classFactory;
-
     private final PlasticProxyFactory proxyFactory;
 
     private final ServiceActivityTracker tracker;
@@ -118,15 +110,13 @@ public class RegistryImpl implements Reg
      * Constructs the registry from a set of module definitions and other resources.
      *
      * @param moduleDefs   defines the modules (and builders, decorators, etc., within)
-     * @param classFactory TODO
      * @param proxyFactory TODO
      * @param loggerSource used to obtain Logger instances
      */
-    public RegistryImpl(Collection<ModuleDef> moduleDefs, ClassFactory classFactory, PlasticProxyFactory proxyFactory,
+    public RegistryImpl(Collection<ModuleDef> moduleDefs, PlasticProxyFactory proxyFactory,
                         LoggerSource loggerSource)
     {
         assert moduleDefs != null;
-        assert classFactory != null;
         assert proxyFactory != null;
         assert loggerSource != null;
 
@@ -134,7 +124,6 @@ public class RegistryImpl implements Reg
 
         operationTracker = new PerThreadOperationTracker(loggerSource.getLogger(Registry.class));
 
-        this.classFactory = classFactory;
         this.proxyFactory = proxyFactory;
 
         Logger logger = loggerForBuiltinService(PERTHREAD_MANAGER_SERVICE_ID);
@@ -194,7 +183,6 @@ public class RegistryImpl implements Reg
 
         addBuiltin(SERVICE_ACTIVITY_SCOREBOARD_SERVICE_ID, ServiceActivityScoreboard.class, scoreboardAndTracker);
         addBuiltin(LOGGER_SOURCE_SERVICE_ID, LoggerSource.class, this.loggerSource);
-        addBuiltin(CLASS_FACTORY_SERVICE_ID, ClassFactory.class, this.classFactory);
         addBuiltin(PERTHREAD_MANAGER_SERVICE_ID, PerthreadManager.class, perthreadManager);
         addBuiltin(REGISTRY_SHUTDOWN_HUB_SERVICE_ID, RegistryShutdownHub.class, registryShutdownHub);
         addBuiltin(PLASTIC_PROXY_FACTORY_SERVICE_ID, PlasticProxyFactory.class, proxyFactory);
@@ -830,13 +818,6 @@ public class RegistryImpl implements Reg
         return orderer.getOrdered();
     }
 
-    public ClassFab newClass(Class serviceInterface)
-    {
-        lock.check();
-
-        return classFactory.newClass(serviceInterface);
-    }
-
     public <T> T getObject(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator,
                            Module localModule)
     {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectDecoratorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectDecoratorImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectDecoratorImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectDecoratorImpl.java Tue Nov  1 23:08:53 2011
@@ -14,10 +14,7 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
-import java.lang.reflect.Method;
-
 import org.apache.tapestry5.ioc.AnnotationAccess;
-import org.apache.tapestry5.ioc.MethodAdvice;
 import org.apache.tapestry5.ioc.annotations.PreventServiceDecoration;
 import org.apache.tapestry5.ioc.internal.AnnotationAccessImpl;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
@@ -26,34 +23,26 @@ import org.apache.tapestry5.ioc.services
 import org.apache.tapestry5.ioc.services.Builtin;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 
+import java.lang.reflect.Method;
+
 @PreventServiceDecoration
 public class AspectDecoratorImpl implements AspectDecorator
 {
     private final PlasticProxyFactory proxyFactory;
 
     public AspectDecoratorImpl(@Builtin
-    PlasticProxyFactory proxyFactory)
+                               PlasticProxyFactory proxyFactory)
     {
         this.proxyFactory = proxyFactory;
     }
 
-    public <T> T build(Class<T> serviceInterface, T delegate, MethodAdvice advice, String description)
-    {
-        assert advice != null;
-        AspectInterceptorBuilder<T> builder = createBuilder(serviceInterface, delegate, description);
-
-        builder.adviseAllMethods(advice);
-
-        return builder.build();
-    }
-
     public <T> AspectInterceptorBuilder<T> createBuilder(Class<T> serviceInterface, final T delegate, String description)
     {
         return createBuilder(serviceInterface, delegate, new AnnotationAccessImpl(serviceInterface), description);
     }
 
     public <T> AspectInterceptorBuilder<T> createBuilder(final Class<T> serviceInterface, final T delegate,
-            AnnotationAccess annotationAccess, final String description)
+                                                         AnnotationAccess annotationAccess, final String description)
     {
         assert serviceInterface != null;
         assert delegate != null;
@@ -66,16 +55,6 @@ public class AspectDecoratorImpl impleme
         {
             private AspectInterceptorBuilder<T> builder;
 
-            public void adviseMethod(Method method, MethodAdvice advice)
-            {
-                getBuilder().adviseMethod(method, advice);
-            }
-
-            public void adviseAllMethods(MethodAdvice advice)
-            {
-                getBuilder().adviseAllMethods(advice);
-            }
-
             public void adviseMethod(Method method, org.apache.tapestry5.plastic.MethodAdvice advice)
             {
                 getBuilder().adviseMethod(method, advice);

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java Tue Nov  1 23:08:53 2011
@@ -14,20 +14,17 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Set;
-
 import org.apache.tapestry5.ioc.AnnotationAccess;
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.MethodAdvice;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import org.apache.tapestry5.plastic.PlasticClass;
 import org.apache.tapestry5.plastic.PlasticClassTransformation;
 import org.apache.tapestry5.plastic.PlasticField;
 
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Set;
+
 @SuppressWarnings("all")
 public class AspectInterceptorBuilderImpl<T> extends AbtractAspectInterceptorBuilder<T>
 {
@@ -40,7 +37,7 @@ public class AspectInterceptorBuilderImp
     private final PlasticClass plasticClass;
 
     public AspectInterceptorBuilderImpl(AnnotationAccess annotationAccess, PlasticProxyFactory plasticProxyFactory,
-            Class<T> serviceInterface, T delegate, String description)
+                                        Class<T> serviceInterface, T delegate, String description)
     {
         super(annotationAccess);
 
@@ -61,23 +58,6 @@ public class AspectInterceptorBuilderImp
         }
     }
 
-    public void adviseMethod(Method method, MethodAdvice advice)
-    {
-        assert method != null;
-        assert advice != null;
-
-        AnnotationProvider methodAnnotationProvider = getMethodAnnotationProvider(method.getName(),
-                method.getParameterTypes());
-
-        adviseMethod(method, InternalUtils.toPlasticMethodAdvice(advice, methodAnnotationProvider));
-    }
-
-    public void adviseAllMethods(MethodAdvice advice)
-    {
-        for (Method m : serviceInterface.getMethods())
-            adviseMethod(m, advice);
-    }
-
     public void adviseMethod(Method method, org.apache.tapestry5.plastic.MethodAdvice advice)
     {
         assert method != null;

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/LazyAdvisorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/LazyAdvisorImpl.java?rev=1196357&r1=1196356&r2=1196357&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/LazyAdvisorImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/LazyAdvisorImpl.java Tue Nov  1 23:08:53 2011
@@ -14,10 +14,6 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
-import java.lang.reflect.Method;
-
-import org.apache.tapestry5.ioc.Invocation;
-import org.apache.tapestry5.ioc.MethodAdvice;
 import org.apache.tapestry5.ioc.MethodAdviceReceiver;
 import org.apache.tapestry5.ioc.ObjectCreator;
 import org.apache.tapestry5.ioc.annotations.NotLazy;
@@ -25,6 +21,10 @@ import org.apache.tapestry5.ioc.annotati
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.LazyAdvisor;
 import org.apache.tapestry5.ioc.services.ThunkCreator;
+import org.apache.tapestry5.plastic.MethodAdvice;
+import org.apache.tapestry5.plastic.MethodInvocation;
+
+import java.lang.reflect.Method;
 
 @PreventServiceDecoration
 public class LazyAdvisorImpl implements LazyAdvisor
@@ -58,7 +58,7 @@ public class LazyAdvisorImpl implements 
              * When the method is invoked, we don't immediately proceed. Instead, we return a thunk instance
              * that defers its behavior to the lazily invoked invocation.
              */
-            public void advise(final Invocation invocation)
+            public void advise(final MethodInvocation invocation)
             {
                 ObjectCreator deferred = new ObjectCreator()
                 {
@@ -66,7 +66,7 @@ public class LazyAdvisorImpl implements 
                     {
                         invocation.proceed();
 
-                        return invocation.getResult();
+                        return invocation.getReturnValue();
                     }
                 };
 
@@ -74,7 +74,7 @@ public class LazyAdvisorImpl implements 
 
                 Object thunk = thunkCreator.createThunk(thunkType, cachingObjectCreator, description);
 
-                invocation.overrideResult(thunk);
+                invocation.setReturnValue(thunk);
             }
         };
 



Mime
View raw message