tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r594319 [8/40] - in /tapestry/tapestry5/trunk: ./ tapestry-annotations/ tapestry-annotations/src/main/java/org/apache/tapestry/beaneditor/ tapestry-annotations/src/site/ tapestry-component-report/ tapestry-component-report/src/main/java/org...
Date Mon, 12 Nov 2007 22:23:28 GMT
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InheritedBinding.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InheritedBinding.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InheritedBinding.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InheritedBinding.java Mon Nov 12 14:22:31 2007
@@ -14,12 +14,12 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.lang.annotation.Annotation;
-
 import org.apache.tapestry.Binding;
 import org.apache.tapestry.ioc.BaseLocatable;
 import org.apache.tapestry.ioc.Location;
 import org.apache.tapestry.ioc.internal.util.TapestryException;
+
+import java.lang.annotation.Annotation;
 
 /**
  * Wraps another binding, adjusting the description of the binding and the location of the binding

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectContainerWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectContainerWorker.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectContainerWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectContainerWorker.java Mon Nov 12 14:22:31 2007
@@ -14,8 +14,6 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.List;
-
 import org.apache.tapestry.annotations.InjectContainer;
 import org.apache.tapestry.ioc.util.BodyBuilder;
 import org.apache.tapestry.model.MutableComponentModel;
@@ -24,6 +22,8 @@
 import org.apache.tapestry.services.ComponentClassTransformWorker;
 import org.apache.tapestry.services.TransformConstants;
 
+import java.util.List;
+
 /**
  * Identifies the {@link InjectContainer} annotation and adds code to initialize it to the core
  * component.
@@ -81,7 +81,7 @@
     }
 
     public static String buildCastExceptionMessage(Component component, String fieldName,
-            String fieldType)
+                                                   String fieldType)
     {
         return ServicesMessages.componentNotAssignableToField(component, fieldName, fieldType);
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectPageWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectPageWorker.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectPageWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectPageWorker.java Mon Nov 12 14:22:31 2007
@@ -14,9 +14,6 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.lang.reflect.Modifier;
-import java.util.List;
-
 import org.apache.tapestry.annotations.InjectPage;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
@@ -27,9 +24,12 @@
 import org.apache.tapestry.services.ComponentClassTransformWorker;
 import org.apache.tapestry.services.TransformMethodSignature;
 
+import java.lang.reflect.Modifier;
+import java.util.List;
+
 /**
  * Peforms transformations that allow pages to be injected into components.
- * 
+ *
  * @see InjectPage
  */
 public class InjectPageWorker implements ComponentClassTransformWorker
@@ -61,7 +61,7 @@
     }
 
     private void addInjectedPage(ClassTransformation transformation, String fieldName,
-            String cacheFieldName)
+                                 String cacheFieldName)
     {
         InjectPage annotation = transformation.getFieldAnnotation(fieldName, InjectPage.class);
 
@@ -74,7 +74,7 @@
                 .resolvePageClassNameToPageName(fieldType) : pageName;
 
         TransformMethodSignature sig = new TransformMethodSignature(Modifier.PRIVATE, fieldType, methodName, null,
-                null);
+                                                                    null);
 
         BodyBuilder builder = new BodyBuilder();
         builder.begin();

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectWorker.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InjectWorker.java Mon Nov 12 14:22:31 2007
@@ -23,7 +23,7 @@
 
 /**
  * Performs injection triggered by any field annotated with the {@link Inject} annotation.
- * <p>
+ * <p/>
  * The implementation of this worker mostly delegates to a chain of command of
  * {@link InjectionProvider}s.
  */

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/Instantiator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/Instantiator.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/Instantiator.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/Instantiator.java Mon Nov 12 14:22:31 2007
@@ -1,22 +1,22 @@
-// Copyright 2006 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.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+// Copyright 2006 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.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package org.apache.tapestry.internal.services;
 
-import org.apache.tapestry.internal.InternalComponentResources;
-import org.apache.tapestry.model.ComponentModel;
-import org.apache.tapestry.runtime.Component;
+import org.apache.tapestry.internal.InternalComponentResources;
+import org.apache.tapestry.model.ComponentModel;
+import org.apache.tapestry.runtime.Component;
 
 /**
  * An object that can instantiate a component. This is used with transformed classes, in which the
@@ -33,6 +33,8 @@
      */
     Component newInstance(InternalComponentResources resources);
 
-    /** Returns the model that defines the behavior of the component. */
+    /**
+     * Returns the model that defines the behavior of the component.
+     */
     ComponentModel getModel();
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformation.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformation.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformation.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformation.java Mon Nov 12 14:22:31 2007
@@ -14,13 +14,13 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.List;
-
 import org.apache.tapestry.internal.util.MultiKey;
 import org.apache.tapestry.ioc.internal.util.IdAllocator;
 import org.apache.tapestry.services.ClassTransformation;
 import org.apache.tapestry.services.ComponentClassTransformWorker;
 
+import java.util.List;
+
 /**
  * Extends {@link org.apache.tapestry.services.ClassTransformation} with additional methods that may
  * only be used internally by Tapestry.
@@ -42,9 +42,8 @@
 
     /**
      * Called (after {@link #finish()}) to construct an instantiator for the component.
-     * 
-     * @param componentClass
-     *            the class to be instantiated
+     *
+     * @param componentClass the class to be instantiated
      * @return the component's instantiator
      */
     Instantiator createInstantiator(Class componentClass);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java Mon Nov 12 14:22:31 2007
@@ -14,39 +14,16 @@
 
 package org.apache.tapestry.internal.services;
 
-import static java.lang.String.format;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
-import static org.apache.tapestry.ioc.internal.util.Defense.notBlank;
-import static org.apache.tapestry.ioc.internal.util.Defense.notNull;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Modifier;
-import java.util.Collections;
-import java.util.Formatter;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javassist.CannotCompileException;
-import javassist.ClassPool;
-import javassist.CtBehavior;
-import javassist.CtClass;
-import javassist.CtConstructor;
-import javassist.CtField;
-import javassist.CtMember;
-import javassist.CtMethod;
-import javassist.CtNewConstructor;
-import javassist.CtNewMethod;
-import javassist.NotFoundException;
+import javassist.*;
 import javassist.expr.ExprEditor;
 import javassist.expr.FieldAccess;
-
 import org.apache.tapestry.ComponentResources;
 import org.apache.tapestry.internal.InternalComponentResources;
 import org.apache.tapestry.internal.util.MultiKey;
 import org.apache.tapestry.ioc.internal.util.CollectionFactory;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.*;
+import static org.apache.tapestry.ioc.internal.util.Defense.notBlank;
+import static org.apache.tapestry.ioc.internal.util.Defense.notNull;
 import org.apache.tapestry.ioc.internal.util.IdAllocator;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.model.ComponentModel;
@@ -57,6 +34,11 @@
 import org.apache.tapestry.services.TransformUtils;
 import org.slf4j.Logger;
 
+import static java.lang.String.format;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Modifier;
+import java.util.*;
+
 /**
  * Implementation of the {@link org.apache.tapestry.internal.services.InternalClassTransformation}
  * interface.
@@ -75,13 +57,19 @@
 
     private final IdAllocator _idAllocator;
 
-    /** Map, keyed on InjectKey, of field name. */
+    /**
+     * Map, keyed on InjectKey, of field name.
+     */
     private final Map<MultiKey, String> _injectionCache = newMap();
 
-    /** Map from a field to the annotation objects for that field. */
+    /**
+     * Map from a field to the annotation objects for that field.
+     */
     private Map<String, List<Annotation>> _fieldAnnotations = newMap();
 
-    /** Used to identify fields that have been "claimed" by other annotations. */
+    /**
+     * Used to identify fields that have been "claimed" by other annotations.
+     */
     private Map<String, Object> _claimedFields = newMap();
 
     private Set<String> _addedFieldNames = newSet();
@@ -107,7 +95,9 @@
 
     private Set<String> _removedFieldNames;
 
-    /** Contains the assembled Javassist code for the class' default constructor. */
+    /**
+     * Contains the assembled Javassist code for the class' default constructor.
+     */
     private StringBuilder _constructor = new StringBuilder();
 
     private final List<ConstructorArg> _constructorArgs;
@@ -127,7 +117,7 @@
      * annotation.
      */
     public InternalClassTransformationImpl(CtClass ctClass, ClassLoader loader, Logger logger,
-            ComponentModel componentModel)
+                                           ComponentModel componentModel)
     {
         _ctClass = ctClass;
         _classPool = _ctClass.getClassPool();
@@ -153,14 +143,15 @@
 
         TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC
                 | Modifier.FINAL, ComponentResources.class.getName(), "getComponentResources",
-                null, null);
+                                  null, null);
 
         addMethod(sig, "return " + _resourcesFieldName + ";");
     }
 
     public InternalClassTransformationImpl(CtClass ctClass,
-            InternalClassTransformation parentTransformation, ClassLoader loader, Logger logger,
-            ComponentModel componentModel)
+                                           InternalClassTransformation parentTransformation, ClassLoader loader,
+                                           Logger logger,
+                                           ComponentModel componentModel)
     {
         _ctClass = ctClass;
         _classPool = _ctClass.getClassPool();
@@ -229,7 +220,9 @@
         return _resourcesFieldName;
     }
 
-    /** Loads the names of all declared fields and methods into the idAllocator. */
+    /**
+     * Loads the names of all declared fields and methods into the idAllocator.
+     */
 
     private void preloadMemberNames()
     {
@@ -282,7 +275,7 @@
     }
 
     public <T extends Annotation> T getMethodAnnotation(TransformMethodSignature signature,
-            Class<T> annotationClass)
+                                                        Class<T> annotationClass)
     {
         failIfFrozen();
 
@@ -301,16 +294,14 @@
     /**
      * Searches an array of objects (that are really annotations instances) to find one that is of
      * the correct type, which is returned.
-     * 
+     *
      * @param <T>
-     * @param annotationClass
-     *            the annotation to search for
-     * @param annotations
-     *            the available annotations
+     * @param annotationClass the annotation to search for
+     * @param annotations     the available annotations
      * @return the matching annotation instance, or null if not found
      */
     private <T extends Annotation> T findAnnotationInList(Class<T> annotationClass,
-            List<Annotation> annotations)
+                                                          List<Annotation> annotations)
     {
         for (Object annotation : annotations)
         {
@@ -393,7 +384,7 @@
         catch (NotFoundException ex)
         {
             throw new RuntimeException(ServicesMessages.missingDeclaredField(_ctClass, fieldName),
-                    ex);
+                                       ex);
         }
     }
 
@@ -440,7 +431,7 @@
      * super-interfaces). The implementations return null (or 0, or false, as appropriate to to the
      * method type). There are a number of degenerate cases that are not covered properly: these are
      * related to base interfaces that may be implemented by base classes.
-     * 
+     *
      * @param ctInterface
      * @throws NotFoundException
      */
@@ -577,7 +568,7 @@
         {
 
             CtMethod method = new CtMethod(returnType, signature.getMethodName(), parameters,
-                    _ctClass);
+                                           _ctClass);
 
             // TODO: Check for duplicate method add
 
@@ -649,11 +640,11 @@
 
         _addedMethods.add(method);
     }
-    
+
     public void prefixMethod(TransformMethodSignature methodSignature, String methodBody)
     {
         failIfFrozen();
-        
+
         CtMethod method = findMethod(methodSignature);
         try
         {
@@ -666,13 +657,13 @@
                     methodBody,
                     ex), methodBody, ex);
         }
-        
+
         addMethodToDescription("prefix", methodSignature, methodBody);
         _addedMethods.add(method);
     }
 
     private void addMethodToDescription(String operation, TransformMethodSignature methodSignature,
-            String methodBody)
+                                        String methodBody)
     {
         _formatter.format("%s method: %s %s %s(", operation, Modifier.toString(methodSignature
                 .getModifiers()), methodSignature.getReturnType(), methodSignature.getMethodName());
@@ -891,7 +882,7 @@
                 String[] exceptions = toTypeNames(method.getExceptionTypes());
 
                 result = new TransformMethodSignature(method.getModifiers(), type,
-                        method.getName(), parameters, exceptions);
+                                                      method.getName(), parameters, exceptions);
 
                 _methodSignatures.put(method, result);
             }
@@ -1103,13 +1094,10 @@
     /**
      * Adds a parameter to the constructor for the class; the parameter is used to initialize the
      * value for a field.
-     * 
-     * @param fieldName
-     *            name of field to inject
-     * @param fieldType
-     *            Javassist type of the field (and corresponding parameter)
-     * @param value
-     *            the value to be injected (which will in unusual cases be null)
+     *
+     * @param fieldName name of field to inject
+     * @param fieldType Javassist type of the field (and corresponding parameter)
+     * @param value     the value to be injected (which will in unusual cases be null)
      */
     private void addInjectToConstructor(String fieldName, CtClass fieldType, Object value)
     {
@@ -1341,8 +1329,8 @@
         String fieldType = getFieldType(fieldName);
 
         TransformMethodSignature sig = new TransformMethodSignature(Modifier.PRIVATE, "void",
-                methodName, new String[]
-                { fieldType }, null);
+                                                                    methodName, new String[]
+                {fieldType}, null);
 
         String message = ServicesMessages.readOnlyField(_ctClass.getName(), fieldName);
 
@@ -1443,7 +1431,7 @@
                 if (_addedMethods.contains(access.where())) return;
 
                 Map<String, String> transformMap = access.isReader() ? _fieldReadTransforms
-                        : _fieldWriteTransforms;
+                                                   : _fieldWriteTransforms;
 
                 String body = transformMap.get(access.getFieldName());
                 if (body == null) return;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkActionResponseGenerator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkActionResponseGenerator.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkActionResponseGenerator.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkActionResponseGenerator.java Mon Nov 12 14:22:31 2007
@@ -14,11 +14,11 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.io.IOException;
-
 import org.apache.tapestry.Link;
 import org.apache.tapestry.services.ActionResponseGenerator;
 import org.apache.tapestry.services.Response;
+
+import java.io.IOException;
 
 /**
  * The standard response generator which converts a {@link Link} into a

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactory.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactory.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactory.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactory.java Mon Nov 12 14:22:31 2007
@@ -20,7 +20,7 @@
 
 /**
  * A source for {@link Link} objects.
- * 
+ *
  * @see LinkFactoryListener
  */
 public interface LinkFactory
@@ -28,37 +28,30 @@
     /**
      * Creates a stateful action link. Action links are built for components. Action links are
      * encoded by the current request (that is, bound to the current request's session, if any).
-     * 
-     * @param component
-     *            the component for which an action link is to be generated
-     * @param action
-     *            a name associated with the action
-     * @param forForm
-     *            true if the link is for a form, false otherwise
-     * @param context
-     *            Additional path data, each value will be converted to a string and appended to the
-     *            URI
+     *
+     * @param component the component for which an action link is to be generated
+     * @param action    a name associated with the action
+     * @param forForm   true if the link is for a form, false otherwise
+     * @param context   Additional path data, each value will be converted to a string and appended to the
+     *                  URI
      * @return a link
      */
     Link createActionLink(ComponentPageElement component, String action, boolean forForm,
-            Object... context);
+                          Object... context);
 
     /**
      * Creates a render link for the page. If an activation context is supplied then that context is
      * built into the URI. If no activation context is supplied, then the activation context is
      * obtained from the page itself, by triggering a passivate event on its root component.
-     * <p>
+     * <p/>
      * When the activationContext is an empty array, the targetted page is checked to see if it can
      * provide an activation context. This is accomplished by triggering a "passivate" event on the
      * targetted page. If the override parameter is true, this will not occur (even when the
      * activation context is empty).
-     * 
-     * @param page
-     *            the page to which a link should be created
-     * @param override
-     *            if true, then the provided activation context is always used even if empty
-     * @param activationContext
-     *            the activation context for the page
+     *
+     * @param page              the page to which a link should be created
+     * @param override          if true, then the provided activation context is always used even if empty
+     * @param activationContext the activation context for the page
      * @return
      */
     Link createPageLink(Page page, boolean override, Object... activationContext);
@@ -66,13 +59,10 @@
     /**
      * As with {@link #createPageLink(Page, boolean, Object[])}, but the page is specified by
      * logical name, rather than as an instance.
-     * 
-     * @param page
-     *            the logical name of the page to generate a link to
-     * @param override
-     *            if true, then the provided activation context is always used even if empty
-     * @param context
-     *            activation context for the page
+     *
+     * @param page     the logical name of the page to generate a link to
+     * @param override if true, then the provided activation context is always used even if empty
+     * @param context  activation context for the page
      * @return
      */
     Link createPageLink(String page, boolean override, Object... context);
@@ -80,7 +70,7 @@
     /**
      * Adds a listener, to be notified any time an action or render link is created; this allows the
      * listener to modify the link (by adding additional query parameters to the link).
-     * 
+     *
      * @param listener
      */
     void addListener(LinkFactoryListener listener);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java Mon Nov 12 14:22:31 2007
@@ -14,16 +14,6 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newThreadSafeList;
-import static org.apache.tapestry.ioc.internal.util.Defense.notBlank;
-import static org.apache.tapestry.ioc.internal.util.Defense.notNull;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.tapestry.ComponentEventHandler;
 import org.apache.tapestry.Link;
 import org.apache.tapestry.TapestryConstants;
@@ -31,12 +21,19 @@
 import org.apache.tapestry.internal.TapestryInternalUtils;
 import org.apache.tapestry.internal.structure.ComponentPageElement;
 import org.apache.tapestry.internal.structure.Page;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.*;
+import static org.apache.tapestry.ioc.internal.util.Defense.notBlank;
+import static org.apache.tapestry.ioc.internal.util.Defense.notNull;
 import org.apache.tapestry.ioc.services.TypeCoercer;
 import org.apache.tapestry.ioc.util.StrategyRegistry;
 import org.apache.tapestry.runtime.Component;
 import org.apache.tapestry.services.Request;
 import org.apache.tapestry.services.Response;
 
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
 public class LinkFactoryImpl implements LinkFactory
 {
     private final Request _request;
@@ -59,8 +56,8 @@
     }
 
     public LinkFactoryImpl(Request request, Response encoder,
-            ComponentInvocationMap componentInvocationMap,
-            RequestPageCache pageCache, TypeCoercer typeCoercer)
+                           ComponentInvocationMap componentInvocationMap,
+                           RequestPageCache pageCache, TypeCoercer typeCoercer)
     {
         _request = request;
         _response = encoder;
@@ -108,7 +105,7 @@
     }
 
     public Link createActionLink(ComponentPageElement component, String action, boolean forForm,
-            Object... context)
+                                 Object... context)
     {
         notBlank(action, "action");
 
@@ -124,7 +121,7 @@
         String[] activationContext = collectActivationContextForPage(containingPage);
 
         ComponentInvocation invocation = new ComponentInvocation(target, contextStrings,
-                activationContext);
+                                                                 activationContext);
 
         Link link = new LinkImpl(_response, _request.getContextPath(), invocation, forForm);
 
@@ -168,7 +165,7 @@
         // When override is true, we use the activation context even if empty.
 
         String[] context = (override || activationContext.length != 0) ? toContextStrings(activationContext)
-                : collectActivationContextForPage(page);
+                           : collectActivationContextForPage(page);
 
         PageLinkTarget target = new PageLinkTarget(logicalPageName);
         ComponentInvocation invocation = new ComponentInvocation(target, context, null);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryListener.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryListener.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryListener.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkFactoryListener.java Mon Nov 12 14:22:31 2007
@@ -16,16 +16,17 @@
 
 import org.apache.tapestry.Link;
 
-/** Listener interface for objects that need to be notified about newly created links. */
+/**
+ * Listener interface for objects that need to be notified about newly created links.
+ */
 public interface LinkFactoryListener
 {
     /**
      * Invoked when a page link (a link that renders a page) is created. The listener may decide to
      * encode additional query parameters into the link (via
      * {@link Link#addParameter(String, String)}).
-     * 
-     * @param link
-     *            the newly created link
+     *
+     * @param link the newly created link
      */
     void createdPageLink(Link link);
 
@@ -33,9 +34,8 @@
      * Invoked when an action link (a link that asks a component to perform an action) is created.
      * The listener may decide to encode additional query parameters into the link (via
      * {@link Link#addParameter(String, String)}).
-     * 
-     * @param link
-     *            the newly created link
+     *
+     * @param link the newly created link
      */
     void createdActionLink(Link link);
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LinkImpl.java Mon Nov 12 14:22:31 2007
@@ -14,11 +14,11 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.List;
-
 import org.apache.tapestry.Link;
 import org.apache.tapestry.services.Response;
 
+import java.util.List;
+
 /**
  * Default implementation of {@link Link}.
  */
@@ -42,11 +42,11 @@
     public LinkImpl(Response encoder, String contextPath, String targetPath, boolean forForm)
     {
         this(encoder, contextPath, new ComponentInvocation(new OpaqueConstantTarget(targetPath),
-                new String[0], null), forForm);
+                                                           new String[0], null), forForm);
     }
 
     public LinkImpl(Response encoder, String contextPath, ComponentInvocation invocation,
-            boolean forForm)
+                    boolean forForm)
     {
         _contextPath = contextPath;
         _response = encoder;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationFilter.java Mon Nov 12 14:22:31 2007
@@ -14,13 +14,13 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.io.IOException;
-
 import org.apache.tapestry.services.Request;
 import org.apache.tapestry.services.RequestFilter;
 import org.apache.tapestry.services.RequestHandler;
 import org.apache.tapestry.services.Response;
 
+import java.io.IOException;
+
 /**
  * Responsible for determining the locale for the current request. Currently, this is based on the
  * client's web browser. Later extensions will store the current locale as a cookie, or as a session
@@ -29,7 +29,7 @@
 public class LocalizationFilter implements RequestFilter
 {
     private final LocalizationSetter _setter;
-    
+
     public LocalizationFilter(LocalizationSetter setter)
     {
         _setter = setter;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationSetterImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationSetterImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationSetterImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocalizationSetterImpl.java Mon Nov 12 14:22:31 2007
@@ -14,18 +14,17 @@
 
 package org.apache.tapestry.internal.services;
 
+import org.apache.tapestry.ioc.annotations.Inject;
+import org.apache.tapestry.ioc.annotations.Symbol;
 import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newConcurrentMap;
 import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
+import org.apache.tapestry.ioc.services.ThreadLocale;
+import org.apache.tapestry.services.PersistentLocale;
 
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.tapestry.ioc.annotations.Inject;
-import org.apache.tapestry.ioc.annotations.Symbol;
-import org.apache.tapestry.ioc.services.ThreadLocale;
-import org.apache.tapestry.services.PersistentLocale;
-
 /**
  * Given a set of supported locales, for a specified desired locale, sets the current thread's
  * locale to a supported locale that is closest to the desired.
@@ -43,9 +42,9 @@
     private final PersistentLocale _persistentLocale;
 
     public LocalizationSetterImpl(PersistentLocale persistentLocale, ThreadLocale threadLocale,
-            @Inject
-            @Symbol("tapestry.supported-locales")
-            String acceptedLocaleNames)
+                                  @Inject
+                                  @Symbol("tapestry.supported-locales")
+                                  String acceptedLocaleNames)
     {
         _persistentLocale = persistentLocale;
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocationRenderer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocationRenderer.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocationRenderer.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/LocationRenderer.java Mon Nov 12 14:22:31 2007
@@ -14,25 +14,19 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.ioc.IOCConstants.PERTHREAD_SCOPE;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-import java.net.URL;
-import java.util.Set;
-
 import org.apache.tapestry.MarkupWriter;
 import org.apache.tapestry.internal.TapestryInternalUtils;
+import static org.apache.tapestry.ioc.IOCConstants.PERTHREAD_SCOPE;
 import org.apache.tapestry.ioc.Location;
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.ioc.annotations.Scope;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
 import org.apache.tapestry.services.ObjectRenderer;
 
+import java.io.*;
+import java.net.URL;
+import java.util.Set;
+
 /**
  * Responsible for rendering a {@link Location}. It is designed to only perform the full output
  * (which includes a snippet of the source file) once per render. This requires the use of the
@@ -95,7 +89,7 @@
 
                 writer.element("td");
                 writer.attributes("class", line == current ? "t-location-line t-location-current"
-                        : "t-location-line");
+                                           : "t-location-line");
                 writer.write(Integer.toString(current));
                 writer.end();
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MapMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MapMessages.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MapMessages.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MapMessages.java Mon Nov 12 14:22:31 2007
@@ -16,12 +16,13 @@
 
 /**
  * An implementation  of {@link Messages} that is based on a map.
- * 
+ *
  */
-import java.util.Map;
 
 import org.apache.tapestry.ioc.Messages;
 import org.apache.tapestry.ioc.util.AbstractMessages;
+
+import java.util.Map;
 
 /**
  * Implementation of {@link Messages} based on a simple Map (of string keys and values).

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MarkupWriterImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MarkupWriterImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MarkupWriterImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MarkupWriterImpl.java Mon Nov 12 14:22:31 2007
@@ -14,16 +14,12 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.io.PrintWriter;
-
 import org.apache.tapestry.Link;
 import org.apache.tapestry.MarkupWriter;
-import org.apache.tapestry.dom.DefaultMarkupModel;
-import org.apache.tapestry.dom.Document;
-import org.apache.tapestry.dom.Element;
-import org.apache.tapestry.dom.MarkupModel;
-import org.apache.tapestry.dom.Text;
+import org.apache.tapestry.dom.*;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
+
+import java.io.PrintWriter;
 
 public class MarkupWriterImpl implements MarkupWriter
 {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSource.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSource.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSource.java Mon Nov 12 14:22:31 2007
@@ -14,12 +14,12 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.Locale;
-
 import org.apache.tapestry.internal.event.InvalidationEventHub;
 import org.apache.tapestry.internal.events.UpdateListener;
 import org.apache.tapestry.ioc.Messages;
 
+import java.util.Locale;
+
 public interface MessagesSource extends InvalidationEventHub, UpdateListener
 {
     /**
@@ -27,10 +27,9 @@
      * locale. If the component extends from another component, then its localized properties will
      * merge with its parent's properties (with the subclass overriding the super class on any
      * conflicts).
-     * 
-     * @param MessagesBundle
-     *            defines the set of properties files to read, as well as a series of parent bundles
-     *            to extend and override
+     *
+     * @param MessagesBundle defines the set of properties files to read, as well as a series of parent bundles
+     *                       to extend and override
      * @param locale
      * @return the message catalog for the bundle, in the indicated locale
      */

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSourceImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MessagesSourceImpl.java Mon Nov 12 14:22:31 2007
@@ -14,27 +14,20 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newConcurrentMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-
 import org.apache.tapestry.internal.TapestryInternalUtils;
 import org.apache.tapestry.internal.event.InvalidationEventHubImpl;
 import org.apache.tapestry.internal.util.MultiKey;
 import org.apache.tapestry.internal.util.URLChangeTracker;
 import org.apache.tapestry.ioc.Messages;
 import org.apache.tapestry.ioc.Resource;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.*;
 import org.apache.tapestry.ioc.internal.util.LocalizedNameGenerator;
 
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.*;
+
 /**
  * A utility class that encapsulates all the logic for reading properties files and assembling
  * {@link Messages} from them, in accordance with extension rules and locale. This represents code
@@ -45,7 +38,9 @@
 {
     private final URLChangeTracker _tracker;
 
-    /** Keyed on bundle id and locale. */
+    /**
+     * Keyed on bundle id and locale.
+     */
     private final Map<MultiKey, Messages> _messagesByBundleIdAndLocale = newConcurrentMap();
 
     /**

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MetaDataLocatorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MetaDataLocatorImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MetaDataLocatorImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MetaDataLocatorImpl.java Mon Nov 12 14:22:31 2007
@@ -14,15 +14,14 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newConcurrentMap;
-
-import java.util.Map;
-
 import org.apache.tapestry.ComponentResources;
 import org.apache.tapestry.internal.events.InvalidationListener;
 import org.apache.tapestry.ioc.internal.util.CollectionFactory;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newConcurrentMap;
 import org.apache.tapestry.services.MetaDataLocator;
+
+import java.util.Map;
 
 public class MetaDataLocatorImpl implements MetaDataLocator, InvalidationListener
 {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MethodCompileException.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MethodCompileException.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MethodCompileException.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MethodCompileException.java Mon Nov 12 14:22:31 2007
@@ -1,24 +1,22 @@
-// Copyright 2006 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.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+// Copyright 2006 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.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package org.apache.tapestry.internal.services;
 
 /**
  * Exception thrown when a method body fails to compile; this will allow the method body to be
  * displayed to the user on the request failure page.
- * 
- * 
  */
 public class MethodCompileException extends RuntimeException
 {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java Mon Nov 12 14:22:31 2007
@@ -1,28 +1,28 @@
-// Copyright 2006 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.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
+// Copyright 2006 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.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 package org.apache.tapestry.internal.services;
 
-import java.util.List;
-
-import org.apache.tapestry.annotations.Mixin;
-import org.apache.tapestry.ioc.internal.util.InternalUtils;
-import org.apache.tapestry.model.MutableComponentModel;
-import org.apache.tapestry.services.ClassTransformation;
-import org.apache.tapestry.services.ComponentClassResolver;
-import org.apache.tapestry.services.ComponentClassTransformWorker;
-import org.apache.tapestry.services.TransformConstants;
+import org.apache.tapestry.annotations.Mixin;
+import org.apache.tapestry.ioc.internal.util.InternalUtils;
+import org.apache.tapestry.model.MutableComponentModel;
+import org.apache.tapestry.services.ClassTransformation;
+import org.apache.tapestry.services.ComponentClassResolver;
+import org.apache.tapestry.services.ComponentClassTransformWorker;
+import org.apache.tapestry.services.TransformConstants;
+
+import java.util.List;
 
 /**
  * Supports the {@link Mixin} annotation, which allows a mixin to be part of the implementation of a

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java Mon Nov 12 14:22:31 2007
@@ -14,14 +14,16 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.Collection;
-
 import org.apache.tapestry.ioc.internal.util.TapestryException;
 import org.apache.tapestry.runtime.Component;
 import org.apache.tapestry.services.ActionResponseGenerator;
 import org.apache.tapestry.services.ComponentEventResultProcessor;
 
-/** A catch-all for type Object that reports the return value as an error. */
+import java.util.Collection;
+
+/**
+ * A catch-all for type Object that reports the return value as an error.
+ */
 public class ObjectComponentEventResultProcessor implements ComponentEventResultProcessor<Object>
 {
     private final Collection<Class> _configuredClasses;
@@ -32,7 +34,7 @@
     }
 
     public ActionResponseGenerator processComponentEvent(Object value, Component component,
-            String methodDescripion)
+                                                         String methodDescripion)
     {
         String message = ServicesMessages.invalidComponentEventResult(
                 component,

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/OnEventWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/OnEventWorker.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/OnEventWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/OnEventWorker.java Mon Nov 12 14:22:31 2007
@@ -14,19 +14,14 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.List;
-
 import org.apache.tapestry.annotations.OnEvent;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.ioc.util.BodyBuilder;
 import org.apache.tapestry.model.MutableComponentModel;
 import org.apache.tapestry.runtime.Component;
-import org.apache.tapestry.services.ClassTransformation;
-import org.apache.tapestry.services.ComponentClassTransformWorker;
-import org.apache.tapestry.services.MethodFilter;
-import org.apache.tapestry.services.TransformConstants;
-import org.apache.tapestry.services.TransformMethodSignature;
-import org.apache.tapestry.services.TransformUtils;
+import org.apache.tapestry.services.*;
+
+import java.util.List;
 
 /**
  * Provides implementations of the
@@ -47,7 +42,9 @@
             {
                 return signature.getMethodName().startsWith("on")
                         || transformation.getMethodAnnotation(signature, OnEvent.class) != null;
-            };
+            }
+
+            ;
         };
 
         List<TransformMethodSignature> methods = transformation.findMethods(filter);
@@ -70,7 +67,7 @@
     }
 
     private void addCodeForMethod(BodyBuilder builder, TransformMethodSignature method,
-            ClassTransformation transformation)
+                                  ClassTransformation transformation)
     {
         // $1 is the event
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactory.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactory.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactory.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactory.java Mon Nov 12 14:22:31 2007
@@ -17,12 +17,7 @@
 import org.apache.tapestry.Binding;
 import org.apache.tapestry.ComponentResources;
 import org.apache.tapestry.annotations.Component;
-import org.apache.tapestry.internal.parser.AttributeToken;
-import org.apache.tapestry.internal.parser.CommentToken;
-import org.apache.tapestry.internal.parser.DTDToken;
-import org.apache.tapestry.internal.parser.ExpansionToken;
-import org.apache.tapestry.internal.parser.StartElementToken;
-import org.apache.tapestry.internal.parser.TextToken;
+import org.apache.tapestry.internal.parser.*;
 import org.apache.tapestry.internal.structure.ComponentPageElement;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.internal.structure.PageElement;
@@ -51,42 +46,34 @@
      * that returns the fully expanded expression will be returned.
      */
     Binding newBinding(String parameterName, ComponentResources loadingComponentResources,
-            ComponentResources embeddedComponentResources, String defaultBindingPrefix,
-            String expression, Location location);
+                       ComponentResources embeddedComponentResources, String defaultBindingPrefix,
+                       String expression, Location location);
 
     /**
      * Creates a new component and adds it to the page and to its container.
-     * <p>
+     * <p/>
      * Note: doesn't add the component as a child of the container.
-     * 
-     * @param page
-     *            the page that will ultimately contain the new component
-     * @param container
-     *            the existing component that contains the new component
-     * @param id
-     *            the id, unique within the container, of the new component
-     * @param componentType
-     *            the type of the component (as defined in the template or the {@link Component}
-     *            annotation)
-     * @param componentClassName
-     *            the fully qualfied class name used when the componentType is blank (null or the
-     *            empty string)
-     * @param elementName
-     *            TODO
-     * @param location
-     *            location of the component's element within its container's template
+     *
+     * @param page               the page that will ultimately contain the new component
+     * @param container          the existing component that contains the new component
+     * @param id                 the id, unique within the container, of the new component
+     * @param componentType      the type of the component (as defined in the template or the {@link Component}
+     *                           annotation)
+     * @param componentClassName the fully qualfied class name used when the componentType is blank (null or the
+     *                           empty string)
+     * @param elementName        TODO
+     * @param location           location of the component's element within its container's template
      * @return the newly created comopnent, after adding it to the page and container
      */
     ComponentPageElement newComponentElement(Page page, ComponentPageElement container, String id,
-            String componentType, String componentClassName, String elementName, Location location);
+                                             String componentType, String componentClassName, String elementName,
+                                             Location location);
 
     /**
      * Creates a new root component for a page. Adds any mixins defined by the components model.
-     * 
-     * @param page
-     *            the page that will contain the root component
-     * @param className
-     *            the fully qualified class name of the root component
+     *
+     * @param page      the page that will contain the root component
+     * @param className the fully qualified class name of the root component
      * @return the root page element
      */
     ComponentPageElement newRootComponentElement(Page page, String className);
@@ -95,31 +82,29 @@
 
     /**
      * Adds a mixin to the element, resolving the mixin type to a mixin class.
-     * <p>
+     * <p/>
      * Sure, this isn't quite a <em>factory</em> method, but PEF has all the tools to accomplish
      * this handy, as opposed to PageLoaderImpl.
-     * 
-     * @param component
-     *            the component to which a mixin will be added
-     * @param mixinType
-     *            used to resolve the mixin class name
+     *
+     * @param component the component to which a mixin will be added
+     * @param mixinType used to resolve the mixin class name
      */
     void addMixinByTypeName(ComponentPageElement component, String mixinType);
 
     /**
      * Adds a mixin to the element.
-     * <p>
+     * <p/>
      * Sure, this isn't quite a <em>factory</em> method, but PEF has all the tools to accomplish
      * this handy, as opposed to PageLoaderImpl.
-     * 
-     * @param component
-     *            the component to which a mixin will be added
-     * @param mixinClassName
-     *            fully qualified class name of the mixin
+     *
+     * @param component      the component to which a mixin will be added
+     * @param mixinClassName fully qualified class name of the mixin
      */
     void addMixinByClassName(ComponentPageElement component, String mixinClassName);
 
-    /** Creates a new element from the token. */
+    /**
+     * Creates a new element from the token.
+     */
     PageElement newCommentElement(CommentToken token);
 
     PageElement newDTDElement(DTDToken token);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java Mon Nov 12 14:22:31 2007
@@ -14,30 +14,14 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.TapestryConstants.PROP_BINDING_PREFIX;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-
-import java.util.List;
-
 import org.apache.tapestry.Binding;
 import org.apache.tapestry.ComponentResources;
 import org.apache.tapestry.MarkupWriter;
-import org.apache.tapestry.internal.parser.AttributeToken;
-import org.apache.tapestry.internal.parser.CommentToken;
-import org.apache.tapestry.internal.parser.DTDToken;
-import org.apache.tapestry.internal.parser.ExpansionToken;
-import org.apache.tapestry.internal.parser.StartElementToken;
-import org.apache.tapestry.internal.parser.TextToken;
-import org.apache.tapestry.internal.structure.CommentPageElement;
-import org.apache.tapestry.internal.structure.ComponentPageElement;
-import org.apache.tapestry.internal.structure.ComponentPageElementImpl;
-import org.apache.tapestry.internal.structure.DTDPageElement;
-import org.apache.tapestry.internal.structure.ExpansionPageElement;
-import org.apache.tapestry.internal.structure.Page;
-import org.apache.tapestry.internal.structure.PageElement;
-import org.apache.tapestry.internal.structure.StartElementPageElement;
-import org.apache.tapestry.internal.structure.TextPageElement;
+import static org.apache.tapestry.TapestryConstants.PROP_BINDING_PREFIX;
+import org.apache.tapestry.internal.parser.*;
+import org.apache.tapestry.internal.structure.*;
 import org.apache.tapestry.ioc.Location;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.ioc.internal.util.TapestryException;
 import org.apache.tapestry.ioc.services.TypeCoercer;
@@ -47,6 +31,8 @@
 import org.apache.tapestry.services.ComponentClassResolver;
 import org.apache.tapestry.services.ComponentMessagesSource;
 
+import java.util.List;
+
 public class PageElementFactoryImpl implements PageElementFactory
 {
     private final ComponentInstantiatorSource _componentInstantiatorSource;
@@ -77,8 +63,8 @@
     }
 
     public PageElementFactoryImpl(ComponentInstantiatorSource componentInstantiatorSource,
-            ComponentClassResolver resolver, TypeCoercer typeCoercer, BindingSource bindingSource,
-            ComponentMessagesSource messagesSource)
+                                  ComponentClassResolver resolver, TypeCoercer typeCoercer, BindingSource bindingSource,
+                                  ComponentMessagesSource messagesSource)
     {
         _componentInstantiatorSource = componentInstantiatorSource;
         _componentClassResolver = resolver;
@@ -87,7 +73,9 @@
         _messagesSource = messagesSource;
     }
 
-    /** Singleton instance that represents any close tag of any element in any template. */
+    /**
+     * Singleton instance that represents any close tag of any element in any template.
+     */
     private final PageElement _endElement = new PageElement()
     {
         public void render(MarkupWriter writer, RenderQueue queue)
@@ -118,7 +106,7 @@
     }
 
     public PageElement newAttributeElement(ComponentResources componentResources,
-            final AttributeToken token)
+                                           final AttributeToken token)
     {
         final StringProvider provider = parseAttributeExpansionExpression(
                 token.getValue(),
@@ -137,7 +125,7 @@
     }
 
     private StringProvider parseAttributeExpansionExpression(String expression,
-            ComponentResources resources, final Location location)
+                                                             ComponentResources resources, final Location location)
     {
         final List<StringProvider> providers = newList();
 
@@ -223,7 +211,7 @@
     }
 
     public PageElement newExpansionElement(ComponentResources componentResources,
-            ExpansionToken token)
+                                           ExpansionToken token)
     {
         Binding binding = _bindingSource.newBinding(
                 "expansion",
@@ -237,8 +225,9 @@
     }
 
     public ComponentPageElement newComponentElement(Page page, ComponentPageElement container,
-            String id, String componentType, String componentClassName, String elementName,
-            Location location)
+                                                    String id, String componentType, String componentClassName,
+                                                    String elementName,
+                                                    Location location)
     {
         try
         {
@@ -279,7 +268,8 @@
             // template.
 
             ComponentPageElementImpl result = new ComponentPageElementImpl(page, container, id,
-                    elementName, instantiator, _typeCoercer, _messagesSource, location);
+                                                                           elementName, instantiator, _typeCoercer,
+                                                                           _messagesSource, location);
 
             page.addLifecycleListener(result);
 
@@ -296,7 +286,7 @@
     }
 
     private void checkForRecursion(String componentClassName, ComponentPageElement container,
-            Location location)
+                                   Location location)
     {
         // Container may be null for a root element;
 
@@ -319,7 +309,7 @@
         Instantiator instantiator = _componentInstantiatorSource.findInstantiator(componentType);
 
         ComponentPageElementImpl result = new ComponentPageElementImpl(page, instantiator,
-                _typeCoercer, _messagesSource);
+                                                                       _typeCoercer, _messagesSource);
 
         addMixins(result, instantiator);
 
@@ -378,8 +368,8 @@
     }
 
     public Binding newBinding(String parameterName, ComponentResources loadingComponentResources,
-            ComponentResources embeddedComponentResources, String defaultBindingPrefix,
-            String expression, Location location)
+                              ComponentResources embeddedComponentResources, String defaultBindingPrefix,
+                              String expression, Location location)
     {
 
         if (expression.contains(EXPANSION_START))

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLifecycleAnnotationWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLifecycleAnnotationWorker.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLifecycleAnnotationWorker.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLifecycleAnnotationWorker.java Mon Nov 12 14:22:31 2007
@@ -14,8 +14,6 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.lang.annotation.Annotation;
-
 import org.apache.tapestry.internal.util.MethodInvocationBuilder;
 import org.apache.tapestry.model.MutableComponentModel;
 import org.apache.tapestry.services.ClassTransformation;
@@ -23,6 +21,8 @@
 import org.apache.tapestry.services.MethodFilter;
 import org.apache.tapestry.services.TransformMethodSignature;
 
+import java.lang.annotation.Annotation;
+
 /**
  * Similar to {@link ComponentLifecycleMethodWorker} but applies to annotations/methods related to
  * the overall page lifecycle.
@@ -38,7 +38,8 @@
     private final MethodInvocationBuilder _invocationBuilder = new MethodInvocationBuilder();
 
     public PageLifecycleAnnotationWorker(final Class<? extends Annotation> methodAnnotationClass,
-            final TransformMethodSignature lifecycleMethodSignature, final String methodAlias)
+                                         final TransformMethodSignature lifecycleMethodSignature,
+                                         final String methodAlias)
     {
         _methodAnnotationClass = methodAnnotationClass;
         _lifecycleMethodSignature = lifecycleMethodSignature;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoader.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoader.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoader.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoader.java Mon Nov 12 14:22:31 2007
@@ -14,19 +14,19 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.Locale;
-
 import org.apache.tapestry.ComponentResourcesCommon;
 import org.apache.tapestry.internal.event.InvalidationEventHub;
 import org.apache.tapestry.internal.structure.Page;
 
+import java.util.Locale;
+
 /**
  * Instantiates a fully loaded, configured instance of a Tapestry page. This is a recursive process,
  * since part of loading a page is to load the page elements for the page, many of which are
  * components. Further, in some cases, the full component tree is not identified until after each
  * component's template is loaded. Because this is an expensive process, loaded pages will be used
  * for many requests (on behalf of many different users) and will be pooled between requests.
- * 
+ *
  * @see PagePool
  * @see RequestPageCache
  */
@@ -34,16 +34,14 @@
 {
     /**
      * Loads the page in the given locale.
-     * 
-     * @param logicalPageName
-     *            the <em>canonicalized</em> logical name of the page, which will be made
-     *            available via {@link Page#getLogicalName()} and
-     *            {@link ComponentResourcesCommon#getPageName()} (for any component within the
-     *            page).
-     * @param locale
-     *            the locale to load the page and its components , which will be made available via
-     *            {@link Page#getLocale()} and {@link ComponentResourcesCommon#getLocale()} (for any
-     *            component within the page)
+     *
+     * @param logicalPageName the <em>canonicalized</em> logical name of the page, which will be made
+     *                        available via {@link Page#getLogicalName()} and
+     *                        {@link ComponentResourcesCommon#getPageName()} (for any component within the
+     *                        page).
+     * @param locale          the locale to load the page and its components , which will be made available via
+     *                        {@link Page#getLocale()} and {@link ComponentResourcesCommon#getLocale()} (for any
+     *                        component within the page)
      * @see Page#getLocale()
      */
     Page loadPage(String logicalPageName, Locale locale);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java Mon Nov 12 14:22:31 2007
@@ -14,16 +14,16 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.Locale;
-
 import org.apache.tapestry.internal.event.InvalidationEventHubImpl;
 import org.apache.tapestry.internal.events.InvalidationListener;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.services.ComponentClassResolver;
 import org.apache.tapestry.services.PersistentFieldManager;
 
+import java.util.Locale;
+
 public class PageLoaderImpl extends InvalidationEventHubImpl implements PageLoader,
-        InvalidationListener
+                                                                        InvalidationListener
 {
     private final ComponentTemplateSource _templateSource;
 
@@ -36,8 +36,8 @@
     private final ComponentClassResolver _resolver;
 
     public PageLoaderImpl(ComponentTemplateSource templateSource,
-            PageElementFactory pageElementFactory, LinkFactory linkFactory,
-            PersistentFieldManager persistentFieldManager, ComponentClassResolver resolver)
+                          PageElementFactory pageElementFactory, LinkFactory linkFactory,
+                          PersistentFieldManager persistentFieldManager, ComponentClassResolver resolver)
     {
         _templateSource = templateSource;
         _pageElementFactory = pageElementFactory;
@@ -52,7 +52,8 @@
         // effort to pool them for reuse, but not too likely.
 
         PageLoaderProcessor processor = new PageLoaderProcessor(_templateSource,
-                _pageElementFactory, _linkFactory, _persistentFieldManager);
+                                                                _pageElementFactory, _linkFactory,
+                                                                _persistentFieldManager);
 
         String pageClassName = _resolver.resolvePageNameToClassName(logicalPageName);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageLoaderProcessor.java Mon Nov 12 14:22:31 2007
@@ -14,40 +14,17 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newStack;
-import static org.apache.tapestry.ioc.internal.util.InternalUtils.isBlank;
-import static org.apache.tapestry.ioc.internal.util.InternalUtils.isNonBlank;
-
-import java.util.Locale;
-import java.util.Map;
-
 import org.apache.tapestry.Binding;
 import org.apache.tapestry.ComponentResources;
 import org.apache.tapestry.TapestryConstants;
 import org.apache.tapestry.internal.bindings.LiteralBinding;
-import org.apache.tapestry.internal.parser.AttributeToken;
-import org.apache.tapestry.internal.parser.BlockToken;
-import org.apache.tapestry.internal.parser.BodyToken;
-import org.apache.tapestry.internal.parser.CommentToken;
-import org.apache.tapestry.internal.parser.ComponentTemplate;
-import org.apache.tapestry.internal.parser.DTDToken;
-import org.apache.tapestry.internal.parser.EndElementToken;
-import org.apache.tapestry.internal.parser.ExpansionToken;
-import org.apache.tapestry.internal.parser.ParameterToken;
-import org.apache.tapestry.internal.parser.StartComponentToken;
-import org.apache.tapestry.internal.parser.StartElementToken;
-import org.apache.tapestry.internal.parser.TemplateToken;
-import org.apache.tapestry.internal.parser.TextToken;
-import org.apache.tapestry.internal.structure.BlockImpl;
-import org.apache.tapestry.internal.structure.BodyPageElement;
-import org.apache.tapestry.internal.structure.ComponentPageElement;
-import org.apache.tapestry.internal.structure.Page;
-import org.apache.tapestry.internal.structure.PageElement;
-import org.apache.tapestry.internal.structure.PageImpl;
+import org.apache.tapestry.internal.parser.*;
+import org.apache.tapestry.internal.structure.*;
 import org.apache.tapestry.ioc.Location;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.*;
 import org.apache.tapestry.ioc.internal.util.IdAllocator;
+import static org.apache.tapestry.ioc.internal.util.InternalUtils.isBlank;
+import static org.apache.tapestry.ioc.internal.util.InternalUtils.isNonBlank;
 import org.apache.tapestry.ioc.internal.util.OneShotLock;
 import org.apache.tapestry.ioc.internal.util.TapestryException;
 import org.apache.tapestry.ioc.util.Stack;
@@ -57,6 +34,9 @@
 import org.apache.tapestry.services.PersistentFieldManager;
 import org.slf4j.Logger;
 
+import java.util.Locale;
+import java.util.Map;
+
 /**
  * Contains all the work-state related to the {@link PageLoaderImpl}.
  */
@@ -110,8 +90,8 @@
     private final ComponentTemplateSource _templateSource;
 
     public PageLoaderProcessor(ComponentTemplateSource templateSource,
-            PageElementFactory pageElementFactory, LinkFactory linkFactory,
-            PersistentFieldManager persistentFieldManager)
+                               PageElementFactory pageElementFactory, LinkFactory linkFactory,
+                               PersistentFieldManager persistentFieldManager)
     {
         _templateSource = templateSource;
         _pageElementFactory = pageElementFactory;
@@ -156,7 +136,7 @@
     }
 
     private void addMixinsToComponent(ComponentPageElement component, EmbeddedComponentModel model,
-            String mixins)
+                                      String mixins)
     {
         if (model != null)
         {
@@ -172,8 +152,8 @@
     }
 
     private void bindParametersFromModel(EmbeddedComponentModel model,
-            ComponentPageElement loadingComponent, ComponentPageElement component,
-            Map<String, Binding> bindingMap)
+                                         ComponentPageElement loadingComponent, ComponentPageElement component,
+                                         Map<String, Binding> bindingMap)
     {
         for (String name : model.getParameterNames())
         {
@@ -206,13 +186,13 @@
      * Creates a new binding, or returns an existing binding (or null) for the "inherit:" binding
      * prefix. Mostly a wrapper around
      * {@link BindingSource#newBinding(String, ComponentResources, ComponentResources, String, String, Location)
-     * 
+     *
      * @return the new binding, or an existing binding (if inherited), or null (if inherited, and
      *         the containing parameter is not bound)
      */
     private Binding findBinding(ComponentPageElement loadingComponent,
-            ComponentPageElement component, String name, String value, String defaultBindingPrefix,
-            Location location)
+                                ComponentPageElement component, String name, String value, String defaultBindingPrefix,
+                                Location location)
     {
         if (value.startsWith(INHERIT_PREFIX))
         {
@@ -251,17 +231,14 @@
 
     /**
      * Determines the default binding prefix for a particular parameter.
-     * 
-     * @param component
-     *            the component which will have a parameter bound
-     * @param parameterName
-     *            the name of the parameter
-     * @param informalParameterBindingPrefix
-     *            the default to use for informal parameters
+     *
+     * @param component                      the component which will have a parameter bound
+     * @param parameterName                  the name of the parameter
+     * @param informalParameterBindingPrefix the default to use for informal parameters
      * @return the binding prefix
      */
     private String determineDefaultBindingPrefix(ComponentPageElement component,
-            String parameterName, String informalParameterBindingPrefix)
+                                                 String parameterName, String informalParameterBindingPrefix)
     {
         String defaultBindingPrefix = component.getDefaultBindingPrefix(parameterName);
 
@@ -315,13 +292,11 @@
     /**
      * Invoked whenever a token (start, startComponent, etc.) is encountered that will eventually
      * have a matching end token. Sets up the behavior for the end token.
-     * 
-     * @param discard
-     *            if true, the end is discarded (if false the end token is added to the active body
-     *            element)
-     * @param command
-     *            command to execute to return processor state back to what it was before the
-     *            command executed
+     *
+     * @param discard if true, the end is discarded (if false the end token is added to the active body
+     *                element)
+     * @param command command to execute to return processor state back to what it was before the
+     *                command executed
      */
     private void configureEnd(boolean discard, Runnable command)
     {
@@ -704,7 +679,9 @@
         _dtdAdded = true;
     }
 
-    /** Works the component queue, until exausted. */
+    /**
+     * Works the component queue, until exausted.
+     */
     private void workComponentQueue()
     {
         while (!_componentQueue.isEmpty())

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePool.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePool.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePool.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePool.java Mon Nov 12 14:22:31 2007
@@ -24,16 +24,14 @@
     /**
      * Obtains a page instance from the pool via a logical page name. A page instance is created if
      * no such page is currently available.
-     * 
-     * @param logicalPageName
-     *            logical name used to identify the page
+     *
+     * @param logicalPageName logical name used to identify the page
      * @return a page instance
      */
     Page checkout(String logicalPageName);
 
     /**
-     * @param page
-     *            a previously checked-out page
+     * @param page a previously checked-out page
      */
     void release(Page page);
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePoolImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePoolImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePoolImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PagePoolImpl.java Mon Nov 12 14:22:31 2007
@@ -14,22 +14,21 @@
 
 package org.apache.tapestry.internal.services;
 
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
-
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
 import org.apache.tapestry.internal.events.InvalidationListener;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.ioc.internal.util.CollectionFactory;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
 import org.apache.tapestry.ioc.services.ThreadLocale;
 import org.apache.tapestry.services.ComponentClassResolver;
 import org.slf4j.Logger;
 
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
 /**
  * A very naive implementation just to get us past the start line.
- * <p>
+ * <p/>
  * Registered as an invalidation listener with the
  * {@link org.apache.tapestry.internal.services.PageLoader}; thus the pool is cleared whenever
  */
@@ -46,7 +45,7 @@
     private final Map<PageLocator, List<Page>> _pool = newMap();
 
     public PagePoolImpl(Logger logger, PageLoader pageLoader, ThreadLocale threadLocale,
-            ComponentClassResolver resolver)
+                        ComponentClassResolver resolver)
     {
         _logger = logger;
         _pageLoader = pageLoader;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java Mon Nov 12 14:22:31 2007
@@ -14,15 +14,10 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.io.IOException;
-
 import org.apache.tapestry.internal.TapestryInternalUtils;
-import org.apache.tapestry.services.ActionResponseGenerator;
-import org.apache.tapestry.services.ComponentClassResolver;
-import org.apache.tapestry.services.Dispatcher;
-import org.apache.tapestry.services.PageRenderRequestHandler;
-import org.apache.tapestry.services.Request;
-import org.apache.tapestry.services.Response;
+import org.apache.tapestry.services.*;
+
+import java.io.IOException;
 
 /**
  * Dispatches incoming requests for render requests. Render requests consist of either just a
@@ -37,7 +32,7 @@
     private final PageRenderRequestHandler _handler;
 
     public PageRenderDispatcher(ComponentClassResolver componentClassResolver,
-            PageRenderRequestHandler handler)
+                                PageRenderRequestHandler handler)
     {
         _componentClassResolver = componentClassResolver;
         _handler = handler;
@@ -88,7 +83,7 @@
      * Converts the "extra path", the portion after the page name (and after the slash seperating
      * the page name from the activation context) into an array of strings. LinkFactory and friends
      * URL encode each value, so we URL decode the value (we assume that page names are "URL safe").
-     * 
+     *
      * @param extraPath
      * @return
      */



Mime
View raw message