You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/05/08 04:23:23 UTC

svn commit: r654390 [4/5] - in /tapestry/tapestry5/trunk: tapestry-core/src/main/java/org/apache/tapestry/ tapestry-core/src/main/java/org/apache/tapestry/internal/services/ tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ tapestry-c...

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java Wed May  7 19:23:21 2008
@@ -21,8 +21,8 @@
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.ioc.annotations.Scope;
 import org.apache.tapestry.ioc.annotations.Symbol;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
 import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.ioc.internal.util.LocationImpl;
 import org.apache.tapestry.ioc.internal.util.TapestryException;
@@ -83,16 +83,16 @@
     private static final Pattern EXPANSION_PATTERN = Pattern.compile(EXPANSION_REGEXP);
 
 
-    private XMLReader _reader;
+    private XMLReader reader;
 
     // Resource being parsed
-    private Resource _templateResource;
+    private Resource templateResource;
 
-    private Locator _locator;
+    private Locator locator;
 
-    private final List<TemplateToken> _tokens = newList();
+    private final List<TemplateToken> tokens = CollectionFactory.newList();
 
-    private final boolean _compressWhitespaceDefault;
+    private final boolean compressWhitespaceDefault;
 
     /**
      * Because {@link org.xml.sax.ContentHandler#startPrefixMapping(String, String)} events arrive before the
@@ -100,47 +100,47 @@
      * events, we need to accumlate the {@link org.apache.tapestry.internal.parser.DefineNamespacePrefixToken}s ahead of
      * time to get the correct ordering in the output tokens list.
      */
-    private final List<DefineNamespacePrefixToken> _defineNamespaceTokens = newList();
+    private final List<DefineNamespacePrefixToken> defineNamespaceTokens = newList();
 
     // Non-blank ids from start component elements
 
-    private final Set<String> _componentIds = newSet();
+    private final Set<String> componentIds = CollectionFactory.newSet();
 
     // Used to accumulate text provided by the characters() method. Even contiguous characters may
     // be broken up across multiple invocations due to parser internals. We accumulate those
     // together before forming a text token.
 
-    private final StringBuilder _textBuffer = new StringBuilder();
+    private final StringBuilder textBuffer = new StringBuilder();
 
-    private Location _textStartLocation;
+    private Location textStartLocation;
 
-    private boolean _textIsCData;
+    private boolean textIsCData;
 
-    private boolean _insideBody;
+    private boolean insideBody;
 
-    private boolean _insideBodyErrorLogged;
+    private boolean insideBodyErrorLogged;
 
-    private boolean _ignoreEvents;
+    private boolean ignoreEvents;
 
-    private final Logger _logger;
+    private final Logger logger;
 
-    private final Map<String, URL> _configuration;
+    private final Map<String, URL> configuration;
 
-    private final Stack<Runnable> _endTagHandlerStack = new Stack<Runnable>();
+    private final Stack<Runnable> endTagHandlerStack = new Stack<Runnable>();
 
-    private boolean _compressWhitespace;
+    private boolean compressWhitespace;
 
-    private final Stack<Boolean> _compressWhitespaceStack = new Stack<Boolean>();
+    private final Stack<Boolean> compressWhitespaceStack = new Stack<Boolean>();
 
-    private final Runnable _endOfElementHandler = new Runnable()
+    private final Runnable endOfElementHandler = new Runnable()
     {
         public void run()
         {
-            _tokens.add(new EndElementToken(getCurrentLocation()));
+            tokens.add(new EndElementToken(getCurrentLocation()));
 
             // Restore the flag to how it was before the element was parsed.
 
-            _compressWhitespace = _compressWhitespaceStack.pop();
+            compressWhitespace = compressWhitespaceStack.pop();
         }
     };
 
@@ -148,7 +148,7 @@
     {
         public void run()
         {
-            _compressWhitespace = _compressWhitespaceStack.pop();
+            compressWhitespace = compressWhitespaceStack.pop();
         }
     };
 
@@ -158,48 +158,48 @@
                               @Symbol(TapestryConstants.COMPRESS_WHITESPACE_SYMBOL)
                               boolean compressWhitespaceDefault)
     {
-        _logger = logger;
-        _configuration = configuration;
-        _compressWhitespaceDefault = compressWhitespaceDefault;
+        this.logger = logger;
+        this.configuration = configuration;
+        this.compressWhitespaceDefault = compressWhitespaceDefault;
 
         reset();
     }
 
     private void reset()
     {
-        _tokens.clear();
-        _defineNamespaceTokens.clear();
-        _componentIds.clear();
-        _templateResource = null;
-        _locator = null;
-        _textBuffer.setLength(0);
-        _textStartLocation = null;
-        _textIsCData = false;
-        _insideBody = false;
-        _insideBodyErrorLogged = false;
-        _ignoreEvents = true;
+        tokens.clear();
+        defineNamespaceTokens.clear();
+        componentIds.clear();
+        templateResource = null;
+        locator = null;
+        textBuffer.setLength(0);
+        textStartLocation = null;
+        textIsCData = false;
+        insideBody = false;
+        insideBodyErrorLogged = false;
+        ignoreEvents = true;
 
-        _endTagHandlerStack.clear();
-        _compressWhitespaceStack.clear();
+        endTagHandlerStack.clear();
+        compressWhitespaceStack.clear();
     }
 
     public ComponentTemplate parseTemplate(Resource templateResource)
     {
-        _compressWhitespace = _compressWhitespaceDefault;
+        compressWhitespace = compressWhitespaceDefault;
 
-        if (_reader == null)
+        if (reader == null)
         {
             try
             {
-                _reader = XMLReaderFactory.createXMLReader();
+                reader = XMLReaderFactory.createXMLReader();
 
-                _reader.setContentHandler(this);
+                reader.setContentHandler(this);
 
-                _reader.setEntityResolver(this);
+                reader.setEntityResolver(this);
 
-                _reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
+                reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
 
-                _reader.setProperty("http://xml.org/sax/properties/lexical-handler", this);
+                reader.setProperty("http://xml.org/sax/properties/lexical-handler", this);
             }
             catch (Exception ex)
             {
@@ -210,22 +210,22 @@
         if (!templateResource.exists())
             throw new RuntimeException(ServicesMessages.missingTemplateResource(templateResource));
 
-        _templateResource = templateResource;
+        this.templateResource = templateResource;
 
         try
         {
             InputSource source = new InputSource(templateResource.openStream());
 
-            _reader.parse(source);
+            reader.parse(source);
 
-            return new ComponentTemplateImpl(_templateResource, _tokens, _componentIds);
+            return new ComponentTemplateImpl(this.templateResource, tokens, componentIds);
         }
         catch (Exception ex)
         {
             // Some parsers get in an unknown state when an error occurs, and are are not
             // subsequently useable.
 
-            _reader = null;
+            reader = null;
 
             throw new TapestryException(ServicesMessages.templateParseError(templateResource, ex), getCurrentLocation(),
                                         ex);
@@ -238,7 +238,7 @@
 
     public void setDocumentLocator(Locator locator)
     {
-        _locator = locator;
+        this.locator = locator;
     }
 
     /**
@@ -246,13 +246,13 @@
      */
     public void characters(char[] ch, int start, int length) throws SAXException
     {
-        if (_ignoreEvents) return;
+        if (ignoreEvents) return;
 
         if (insideBody()) return;
 
-        if (_textBuffer.length() == 0) _textStartLocation = getCurrentLocation();
+        if (textBuffer.length() == 0) textStartLocation = getCurrentLocation();
 
-        _textBuffer.append(ch, start, length);
+        textBuffer.append(ch, start, length);
     }
 
 
@@ -262,20 +262,20 @@
      */
     private void processTextBuffer()
     {
-        if (_textBuffer.length() == 0) return;
+        if (textBuffer.length() == 0) return;
 
-        String text = _textBuffer.toString();
+        String text = textBuffer.toString();
 
-        _textBuffer.setLength(0);
+        textBuffer.setLength(0);
 
-        if (_textIsCData)
+        if (textIsCData)
         {
-            _tokens.add(new CDATAToken(text, _textStartLocation));
+            tokens.add(new CDATAToken(text, textStartLocation));
 
             return;
         }
 
-        if (_compressWhitespace)
+        if (compressWhitespace)
         {
             text = compressWhitespaceInText(text);
 
@@ -320,7 +320,7 @@
             {
                 String prefix = text.substring(startx, matchStart);
 
-                _tokens.add(new TextToken(prefix, _textStartLocation));
+                tokens.add(new TextToken(prefix, textStartLocation));
             }
 
             // Group 1 includes the real text of the expansion, with whitespace around the
@@ -328,7 +328,7 @@
 
             String expression = matcher.group(1);
 
-            _tokens.add(new ExpansionToken(expression, _textStartLocation));
+            tokens.add(new ExpansionToken(expression, textStartLocation));
 
             startx = matcher.end();
         }
@@ -336,14 +336,14 @@
         // Catch anything after the final regexp match.
 
         if (startx < text.length())
-            _tokens.add(new TextToken(text.substring(startx, text.length()), _textStartLocation));
+            tokens.add(new TextToken(text.substring(startx, text.length()), textStartLocation));
     }
 
     public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
     {
-        _ignoreEvents = false;
+        ignoreEvents = false;
 
-        if (_insideBody) throw new IllegalStateException(ServicesMessages
+        if (insideBody) throw new IllegalStateException(ServicesMessages
                 .mayNotNestElementsInsideBody(localName));
 
         // Add any accumulated text into a text token
@@ -366,17 +366,17 @@
      */
     private boolean insideBody()
     {
-        if (_insideBody)
+        if (insideBody)
         {
             // Limit to one logged error per infraction.
 
-            if (!_insideBodyErrorLogged)
-                _logger.error(ServicesMessages.contentInsideBodyNotAllowed(getCurrentLocation()));
+            if (!insideBodyErrorLogged)
+                logger.error(ServicesMessages.contentInsideBodyNotAllowed(getCurrentLocation()));
 
-            _insideBodyErrorLogged = true;
+            insideBodyErrorLogged = true;
         }
 
-        return _insideBody;
+        return insideBody;
     }
 
     private void startTapestryElement(String localName, Attributes attributes)
@@ -417,11 +417,11 @@
 
     private void startContainer(String elementName, Attributes attributes)
     {
-        _compressWhitespaceStack.push(_compressWhitespace);
+        compressWhitespaceStack.push(compressWhitespace);
 
         // Neither the container nor its end tag are considered tokens, just the contents inside.
 
-        _endTagHandlerStack.push(_ignoreEndElement);
+        endTagHandlerStack.push(_ignoreEndElement);
 
         for (int i = 0; i < attributes.getLength(); i++)
         {
@@ -450,7 +450,7 @@
 
         // null is ok for blockId
 
-        _tokens.add(new BlockToken(blockId, getCurrentLocation()));
+        tokens.add(new BlockToken(blockId, getCurrentLocation()));
 
         // TODO: Check for an xml:space attribute
     }
@@ -464,7 +464,7 @@
         if (InternalUtils.isBlank(parameterName))
             throw new TapestryException(ServicesMessages.parameterElementNameRequired(), getCurrentLocation(), null);
 
-        _tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
+        tokens.add(new ParameterToken(parameterName, getCurrentLocation()));
     }
 
     /**
@@ -474,9 +474,9 @@
     {
         // Record how the flag was set at the start of the element
 
-        _compressWhitespaceStack.push(_compressWhitespace);
+        compressWhitespaceStack.push(compressWhitespace);
 
-        _endTagHandlerStack.push(_endOfElementHandler);
+        endTagHandlerStack.push(endOfElementHandler);
 
 
     }
@@ -516,7 +516,7 @@
             // "preserve" turns off whitespace compression
             // "default" (the other option, but we'll accept anything) turns it on (or leaves it on, more likely).
 
-            _compressWhitespace = !"preserve".equalsIgnoreCase(value);
+            compressWhitespace = !"preserve".equalsIgnoreCase(value);
 
             return true;
         }
@@ -605,18 +605,18 @@
 
         if (isComponent)
         {
-            _tokens.add(new StartComponentToken(elementName, id, type, mixins, location));
+            tokens.add(new StartComponentToken(elementName, id, type, mixins, location));
         }
         else
         {
-            _tokens.add(new StartElementToken(namespaceURI, elementName, location));
+            tokens.add(new StartElementToken(namespaceURI, elementName, location));
         }
 
         addDefineNamespaceTokens();
 
-        _tokens.addAll(attributeTokens);
+        tokens.addAll(attributeTokens);
 
-        if (id != null) _componentIds.add(id);
+        if (id != null) componentIds.add(id);
 
         // TODO: Is there value in having different end elements for components vs. ordinary
         // elements?
@@ -636,16 +636,16 @@
 
     private void startBody()
     {
-        _tokens.add(new BodyToken(getCurrentLocation()));
+        tokens.add(new BodyToken(getCurrentLocation()));
 
-        _insideBody = true;
-        _insideBodyErrorLogged = false;
+        insideBody = true;
+        insideBodyErrorLogged = false;
 
-        _endTagHandlerStack.push(new Runnable()
+        endTagHandlerStack.push(new Runnable()
         {
             public void run()
             {
-                _insideBody = false;
+                insideBody = false;
 
                 // And don't add an end element token.
             }
@@ -656,14 +656,14 @@
     {
         processTextBuffer();
 
-        _endTagHandlerStack.pop().run();
+        endTagHandlerStack.pop().run();
     }
 
     private Location getCurrentLocation()
     {
-        if (_locator == null) return null;
+        if (locator == null) return null;
 
-        return new LocationImpl(_templateResource, _locator.getLineNumber(), _locator
+        return new LocationImpl(templateResource, locator.getLineNumber(), locator
                 .getColumnNumber());
     }
 
@@ -673,14 +673,14 @@
      */
     private void addDefineNamespaceTokens()
     {
-        _tokens.addAll(_defineNamespaceTokens);
+        tokens.addAll(defineNamespaceTokens);
 
-        _defineNamespaceTokens.clear();
+        defineNamespaceTokens.clear();
     }
 
     public void comment(char[] ch, int start, int length) throws SAXException
     {
-        if (_ignoreEvents || insideBody()) return;
+        if (ignoreEvents || insideBody()) return;
 
         processTextBuffer();
 
@@ -698,7 +698,7 @@
         // provided as a single call to comment(), so we're good for the meantime (until we find
         // out some parsers aren't so compliant).
 
-        _tokens.add(new CommentToken(comment, getCurrentLocation()));
+        tokens.add(new CommentToken(comment, getCurrentLocation()));
     }
 
     public void endCDATA() throws SAXException
@@ -709,19 +709,19 @@
 
         // Again, CDATA doesn't nest, so we know we're back to ordinary markup.
 
-        _textIsCData = false;
+        textIsCData = false;
     }
 
     public void startCDATA() throws SAXException
     {
-        if (_ignoreEvents || insideBody()) return;
+        if (ignoreEvents || insideBody()) return;
 
         processTextBuffer();
 
         // Because CDATA doesn't mix with any other SAX/lexical events, we can simply turn on a flag
         // here and turn it off when we see the end.
 
-        _textIsCData = true;
+        textIsCData = true;
     }
 
     // Empty methods defined by the various interfaces.
@@ -749,7 +749,7 @@
         // Since an exception is thrown for case #1 above, we can just add the DTDToken.
         // When we go to process the token (in PageLoaderProcessor), we can make sure
         // that the final page has only a single DTDToken (the first one).
-        _tokens.add(new DTDToken(name, publicId, systemId, getCurrentLocation()));
+        tokens.add(new DTDToken(name, publicId, systemId, getCurrentLocation()));
     }
 
     public void startEntity(String name) throws SAXException
@@ -788,7 +788,7 @@
 
         DefineNamespacePrefixToken token = new DefineNamespacePrefixToken(uri, prefix, getCurrentLocation());
 
-        _defineNamespaceTokens.add(token);
+        defineNamespaceTokens.add(token);
     }
 
     public void endPrefixMapping(String prefix) throws SAXException
@@ -797,7 +797,7 @@
 
     public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
     {
-        URL url = _configuration.get(publicId);
+        URL url = configuration.get(publicId);
 
         if (url != null) return new InputSource(url.openStream());
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TranslatorSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TranslatorSourceImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TranslatorSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TranslatorSourceImpl.java Wed May  7 19:23:21 2008
@@ -26,13 +26,13 @@
 
 public class TranslatorSourceImpl implements TranslatorSource, InvalidationListener
 {
-    private final Map<String, Translator> _translators;
+    private final Map<String, Translator> translators;
 
-    private final StrategyRegistry<Translator> _registry;
+    private final StrategyRegistry<Translator> registry;
 
     public TranslatorSourceImpl(Map<String, Translator> translators)
     {
-        _translators = translators;
+        this.translators = translators;
 
         Map<Class, Translator> typeToTranslator = CollectionFactory.newMap();
 
@@ -41,30 +41,30 @@
             typeToTranslator.put(t.getType(), t);
         }
 
-        _registry = StrategyRegistry.newInstance(Translator.class, typeToTranslator, true);
+        registry = StrategyRegistry.newInstance(Translator.class, typeToTranslator, true);
     }
 
     public Translator get(String name)
     {
 
-        Translator result = _translators.get(name);
+        Translator result = translators.get(name);
 
         if (result == null)
             throw new RuntimeException(ServicesMessages.unknownTranslatorType(name, InternalUtils
-                    .sortedKeys(_translators)));
+                    .sortedKeys(translators)));
 
         return result;
     }
 
     public Translator getByType(Class valueType)
     {
-        Translator result = _registry.get(valueType);
+        Translator result = registry.get(valueType);
 
         if (result == null)
         {
             List<String> names = CollectionFactory.newList();
 
-            for (Class type : _registry.getTypes())
+            for (Class type : registry.getTypes())
             {
                 names.add(type.getName());
             }
@@ -77,11 +77,11 @@
 
     public Translator findByType(Class valueType)
     {
-        return _registry.get(valueType);
+        return registry.get(valueType);
     }
 
     public void objectWasInvalidated()
     {
-        _registry.clearCache();
+        registry.clearCache();
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TypeCoercedValueEncoderFactory.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TypeCoercedValueEncoderFactory.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TypeCoercedValueEncoderFactory.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/TypeCoercedValueEncoderFactory.java Wed May  7 19:23:21 2008
@@ -24,11 +24,11 @@
  */
 public class TypeCoercedValueEncoderFactory implements ValueEncoderFactory<Object>
 {
-    private final TypeCoercer _typeCoercer;
+    private final TypeCoercer typeCoercer;
 
     public TypeCoercedValueEncoderFactory(TypeCoercer typeCoercer)
     {
-        _typeCoercer = typeCoercer;
+        this.typeCoercer = typeCoercer;
     }
 
     public ValueEncoder<Object> create(final Class<Object> type)
@@ -37,12 +37,12 @@
         {
             public String toClient(Object value)
             {
-                return _typeCoercer.coerce(value, String.class);
+                return typeCoercer.coerce(value, String.class);
             }
 
             public Object toValue(String clientValue)
             {
-                return _typeCoercer.coerce(clientValue, type);
+                return typeCoercer.coerce(clientValue, type);
             }
         };
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/UpdateListenerHubImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/UpdateListenerHubImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/UpdateListenerHubImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/UpdateListenerHubImpl.java Wed May  7 19:23:21 2008
@@ -15,17 +15,17 @@
 package org.apache.tapestry.internal.services;
 
 import org.apache.tapestry.internal.events.UpdateListener;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newThreadSafeList;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
 
 import java.util.List;
 
 public class UpdateListenerHubImpl implements UpdateListenerHub
 {
-    private final List<UpdateListener> _listeners = newThreadSafeList();
+    private final List<UpdateListener> listeners = CollectionFactory.newThreadSafeList();
 
     public void addUpdateListener(UpdateListener listener)
     {
-        _listeners.add(listener);
+        listeners.add(listener);
 
     }
 
@@ -34,7 +34,7 @@
      */
     public void fireUpdateEvent()
     {
-        for (UpdateListener listener : _listeners)
+        for (UpdateListener listener : listeners)
         {
             listener.checkForUpdates();
         }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationConstraintGeneratorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationConstraintGeneratorImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationConstraintGeneratorImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationConstraintGeneratorImpl.java Wed May  7 19:23:21 2008
@@ -23,11 +23,11 @@
 
 public class ValidationConstraintGeneratorImpl implements ValidationConstraintGenerator
 {
-    private final List<ValidationConstraintGenerator> _configuration;
+    private final List<ValidationConstraintGenerator> configuration;
 
     public ValidationConstraintGeneratorImpl(final List<ValidationConstraintGenerator> configuration)
     {
-        _configuration = configuration;
+        this.configuration = configuration;
     }
 
     public List<String> buildConstraints(Class propertyType, AnnotationProvider annotationProvider)
@@ -37,7 +37,7 @@
 
         List<String> result = CollectionFactory.newList();
 
-        for (ValidationConstraintGenerator g : _configuration)
+        for (ValidationConstraintGenerator g : configuration)
         {
             List<String> constraints = g.buildConstraints(propertyType, annotationProvider);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImpl.java Wed May  7 19:23:21 2008
@@ -19,7 +19,7 @@
 import org.apache.tapestry.ioc.MessageFormatter;
 import org.apache.tapestry.ioc.Messages;
 import org.apache.tapestry.ioc.Resource;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newConcurrentMap;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry.services.ValidationMessagesSource;
 
 import java.util.Collection;
@@ -28,37 +28,37 @@
 
 public class ValidationMessagesSourceImpl implements ValidationMessagesSource, UpdateListener
 {
-    private final MessagesSource _messagesSource;
+    private final MessagesSource messagesSource;
 
-    private final MessagesBundle _bundle;
+    private final MessagesBundle bundle;
 
-    private final Map<Locale, Messages> _cache = newConcurrentMap();
+    private final Map<Locale, Messages> cache = CollectionFactory.newConcurrentMap();
 
     private class ValidationMessagesBundle implements MessagesBundle
     {
-        private final Resource _baseResource;
+        private final Resource baseResource;
 
-        private final MessagesBundle _parent;
+        private final MessagesBundle parent;
 
         public ValidationMessagesBundle(final Resource baseResource, final MessagesBundle parent)
         {
-            _baseResource = baseResource;
-            _parent = parent;
+            this.baseResource = baseResource;
+            this.parent = parent;
         }
 
         public Resource getBaseResource()
         {
-            return _baseResource;
+            return baseResource;
         }
 
         public Object getId()
         {
-            return _baseResource.getPath();
+            return baseResource.getPath();
         }
 
         public MessagesBundle getParent()
         {
-            return _parent;
+            return parent;
         }
 
     }
@@ -69,11 +69,11 @@
      */
     private class ValidationMessages implements Messages
     {
-        private final Locale _locale;
+        private final Locale locale;
 
         public ValidationMessages(final Locale locale)
         {
-            _locale = locale;
+            this.locale = locale;
         }
 
         private Messages messages()
@@ -81,7 +81,7 @@
             // The MessagesSource caches the value returned, until any underlying file is touched,
             // at which point an updated Messages will be returned.
 
-            return _messagesSource.getMessages(_bundle, _locale);
+            return messagesSource.getMessages(bundle, locale);
         }
 
         public boolean contains(String key)
@@ -115,7 +115,7 @@
 
     ValidationMessagesSourceImpl(Collection<String> bundles, Resource classpathRoot, URLChangeTracker tracker)
     {
-        _messagesSource = new MessagesSourceImpl(tracker);
+        messagesSource = new MessagesSourceImpl(tracker);
 
         MessagesBundle parent = null;
 
@@ -126,17 +126,17 @@
             parent = new ValidationMessagesBundle(bundleResource, parent);
         }
 
-        _bundle = parent;
+        bundle = parent;
     }
 
     public Messages getValidationMessages(Locale locale)
     {
-        Messages result = _cache.get(locale);
+        Messages result = cache.get(locale);
 
         if (result == null)
         {
             result = new ValidationMessages(locale);
-            _cache.put(locale, result);
+            cache.put(locale, result);
         }
 
         return result;
@@ -147,7 +147,7 @@
         // When there are changes, the Messages cached inside the MessagesSource will be discarded
         // and will be rebuilt on demand by the ValidatonMessages instances.
 
-        _messagesSource.checkForUpdates();
+        messagesSource.checkForUpdates();
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidatorSpecification.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidatorSpecification.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidatorSpecification.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValidatorSpecification.java Wed May  7 19:23:21 2008
@@ -21,9 +21,9 @@
  */
 class ValidatorSpecification
 {
-    private final String _validatorType;
+    private final String validatorType;
 
-    private final String _constraintValue;
+    private final String constraintValue;
 
     public ValidatorSpecification(String validatorType)
     {
@@ -32,24 +32,24 @@
 
     public ValidatorSpecification(String validatorType, String constraintValue)
     {
-        _validatorType = validatorType;
-        _constraintValue = constraintValue;
+        this.validatorType = validatorType;
+        this.constraintValue = constraintValue;
     }
 
     public String getConstraintValue()
     {
-        return _constraintValue;
+        return constraintValue;
     }
 
     public String getValidatorType()
     {
-        return _validatorType;
+        return validatorType;
     }
 
     @Override
     public String toString()
     {
-        return String.format("ValidatorSpecification[%s %s]", _validatorType, _constraintValue);
+        return String.format("ValidatorSpecification[%s %s]", validatorType, constraintValue);
     }
 
     @Override
@@ -59,8 +59,8 @@
 
         ValidatorSpecification ov = (ValidatorSpecification) other;
 
-        if (!_validatorType.equals(ov._validatorType)) return false;
+        if (!validatorType.equals(ov.validatorType)) return false;
 
-        return TapestryInternalUtils.isEqual(_constraintValue, ov._constraintValue);
+        return TapestryInternalUtils.isEqual(constraintValue, ov.constraintValue);
     }
 }
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValueEncoderSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValueEncoderSourceImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValueEncoderSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/ValueEncoderSourceImpl.java Wed May  7 19:23:21 2008
@@ -26,13 +26,13 @@
 
 public class ValueEncoderSourceImpl implements ValueEncoderSource, InvalidationListener
 {
-    private final StrategyRegistry<ValueEncoderFactory> _registry;
+    private final StrategyRegistry<ValueEncoderFactory> registry;
 
-    private final Map<Class, ValueEncoder> _cache = CollectionFactory.newConcurrentMap();
+    private final Map<Class, ValueEncoder> cache = CollectionFactory.newConcurrentMap();
 
     public ValueEncoderSourceImpl(Map<Class, ValueEncoderFactory> configuration)
     {
-        _registry = StrategyRegistry.newInstance(ValueEncoderFactory.class, configuration);
+        registry = StrategyRegistry.newInstance(ValueEncoderFactory.class, configuration);
     }
 
     @SuppressWarnings({ "unchecked" })
@@ -40,15 +40,15 @@
     {
         Defense.notNull(type, "type");
 
-        ValueEncoder<T> result = _cache.get(type);
+        ValueEncoder<T> result = cache.get(type);
 
         if (result == null)
         {
-            ValueEncoderFactory<T> factory = _registry.get(type);
+            ValueEncoderFactory<T> factory = registry.get(type);
 
             result = factory.create(type);
 
-            _cache.put(type, result);
+            cache.put(type, result);
         }
 
         return result;
@@ -56,7 +56,7 @@
 
     public void objectWasInvalidated()
     {
-        _registry.clearCache();
-        _cache.clear();
+        registry.clearCache();
+        cache.clear();
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/BlockImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/BlockImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/BlockImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/BlockImpl.java Wed May  7 19:23:21 2008
@@ -18,7 +18,7 @@
 import org.apache.tapestry.MarkupWriter;
 import org.apache.tapestry.ioc.BaseLocatable;
 import org.apache.tapestry.ioc.Location;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry.runtime.RenderCommand;
 import org.apache.tapestry.runtime.RenderQueue;
 
@@ -29,7 +29,7 @@
     // We could lazily create this, but for <t:block> and <t:parameter>, the case
     // for an empty block is extremely rare.
 
-    private final List<PageElement> _elements = newList();
+    private final List<PageElement> elements = CollectionFactory.newList();
 
     public BlockImpl(Location location)
     {
@@ -38,7 +38,7 @@
 
     public void addToBody(PageElement element)
     {
-        _elements.add(element);
+        elements.add(element);
     }
 
     /**
@@ -46,9 +46,9 @@
      */
     public void render(MarkupWriter writer, RenderQueue queue)
     {
-        int count = _elements.size();
+        int count = elements.size();
         for (int i = count - 1; i >= 0; i--)
-            queue.push(_elements.get(i));
+            queue.push(elements.get(i));
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/CommentPageElement.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/CommentPageElement.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/CommentPageElement.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/CommentPageElement.java Wed May  7 19:23:21 2008
@@ -25,21 +25,21 @@
  */
 public class CommentPageElement implements PageElement
 {
-    private final String _text;
+    private final String text;
 
     public CommentPageElement(final String text)
     {
-        _text = text;
+        this.text = text;
     }
 
     public void render(MarkupWriter writer, RenderQueue queue)
     {
-        writer.comment(_text);
+        writer.comment(text);
     }
 
     @Override
     public String toString()
     {
-        return String.format("Comment[%s]", _text);
+        return String.format("Comment[%s]", text);
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java Wed May  7 19:23:21 2008
@@ -24,8 +24,7 @@
 import org.apache.tapestry.internal.util.NotificationEventCallback;
 import org.apache.tapestry.ioc.BaseLocatable;
 import org.apache.tapestry.ioc.Location;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry.ioc.internal.util.Defense;
 import static org.apache.tapestry.ioc.internal.util.Defense.notBlank;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
@@ -113,20 +112,20 @@
 
     private static class RenderPhaseEventHandler implements ComponentEventCallback
     {
-        private boolean _result = true;
+        private boolean result = true;
 
-        private List<RenderCommand> _commands;
+        private List<RenderCommand> commands;
 
         boolean getResult()
         {
-            return _result;
+            return result;
         }
 
         public boolean handleResult(Object result)
         {
             if (result instanceof Boolean)
             {
-                _result = (Boolean) result;
+                this.result = (Boolean) result;
                 return true; // abort other handler methods
             }
 
@@ -161,21 +160,21 @@
 
         private void add(RenderCommand command)
         {
-            if (_commands == null) _commands = newList();
+            if (commands == null) commands = CollectionFactory.newList();
 
-            _commands.add(command);
+            commands.add(command);
         }
 
         public void queueCommands(RenderQueue queue)
         {
-            if (_commands == null) return;
+            if (commands == null) return;
 
-            for (RenderCommand command : _commands)
+            for (RenderCommand command : commands)
                 queue.push(command);
         }
     }
 
-    private final RenderCommand _afterRender = new RenderCommand()
+    private final RenderCommand afterRender = new RenderCommand()
     {
         public void render(final MarkupWriter writer, RenderQueue queue)
         {
@@ -192,7 +191,7 @@
 
             invoke(true, callback);
 
-            if (!handler.getResult()) queue.push(_beginRender);
+            if (!handler.getResult()) queue.push(beginRender);
 
             handler.queueCommands(queue);
         }
@@ -204,7 +203,7 @@
         }
     };
 
-    private final RenderCommand _afterRenderBody = new RenderCommand()
+    private final RenderCommand afterRenderBody = new RenderCommand()
     {
         public void render(final MarkupWriter writer, RenderQueue queue)
         {
@@ -221,7 +220,7 @@
 
             invoke(true, callback);
 
-            if (!handler.getResult()) queue.push(_beforeRenderBody);
+            if (!handler.getResult()) queue.push(beforeRenderBody);
 
             handler.queueCommands(queue);
         }
@@ -233,7 +232,7 @@
         }
     };
 
-    private final RenderCommand _afterRenderTemplate = new RenderCommand()
+    private final RenderCommand afterRenderTemplate = new RenderCommand()
     {
         public void render(final MarkupWriter writer, final RenderQueue queue)
         {
@@ -250,7 +249,7 @@
 
             invoke(true, callback);
 
-            if (!handler.getResult()) queue.push(_beforeRenderTemplate);
+            if (!handler.getResult()) queue.push(beforeRenderTemplate);
 
             handler.queueCommands(queue);
         }
@@ -262,7 +261,7 @@
         }
     };
 
-    private final RenderCommand _beforeRenderBody = new RenderCommand()
+    private final RenderCommand beforeRenderBody = new RenderCommand()
     {
         public void render(final MarkupWriter writer, RenderQueue queue)
         {
@@ -279,9 +278,9 @@
 
             invoke(false, callback);
 
-            queue.push(_afterRenderBody);
+            queue.push(afterRenderBody);
 
-            if (handler.getResult()) pushElements(queue, _body);
+            if (handler.getResult()) pushElements(queue, body);
 
             handler.queueCommands(queue);
         }
@@ -293,7 +292,7 @@
         }
     };
 
-    private final RenderCommand _beforeRenderTemplate = new RenderCommand()
+    private final RenderCommand beforeRenderTemplate = new RenderCommand()
     {
         public void render(final MarkupWriter writer, final RenderQueue queue)
         {
@@ -310,9 +309,9 @@
 
             invoke(false, callback);
 
-            queue.push(_afterRenderTemplate);
+            queue.push(afterRenderTemplate);
 
-            if (handler.getResult()) pushElements(queue, _template);
+            if (handler.getResult()) pushElements(queue, template);
 
             handler.queueCommands(queue);
         }
@@ -324,7 +323,7 @@
         }
     };
 
-    private final RenderCommand _beginRender = new RenderCommand()
+    private final RenderCommand beginRender = new RenderCommand()
     {
         public void render(final MarkupWriter writer, final RenderQueue queue)
         {
@@ -341,13 +340,13 @@
 
             invoke(false, callback);
 
-            queue.push(_afterRender);
+            queue.push(afterRender);
 
             // If the component has no template whatsoever, then a
             // renderBody element is added as the lone element of the component's template.
             // So every component will have a non-empty template.
 
-            if (handler.getResult()) queue.push(_beforeRenderTemplate);
+            if (handler.getResult()) queue.push(beforeRenderTemplate);
 
             handler.queueCommands(queue);
         }
@@ -359,17 +358,17 @@
         }
     };
 
-    private Map<String, Block> _blocks;
+    private Map<String, Block> blocks;
 
-    private List<PageElement> _body;
+    private List<PageElement> body;
 
-    private Map<String, ComponentPageElement> _children;
+    private Map<String, ComponentPageElement> children;
 
-    private final String _elementName;
+    private final String elementName;
 
-    private final PageResources _pageResources;
+    private final PageResources pageResources;
 
-    private final RenderCommand _cleanupRender = new RenderCommand()
+    private final RenderCommand cleanupRender = new RenderCommand()
     {
         public void render(final MarkupWriter writer, RenderQueue queue)
         {
@@ -388,14 +387,14 @@
 
             if (handler.getResult())
             {
-                _rendering = false;
+                rendering = false;
 
                 Element current = writer.getElement();
 
-                if (current != _elementAtSetup)
-                    throw new TapestryException(StructureMessages.unbalancedElements(_completeId), getLocation(), null);
+                if (current != elementAtSetup)
+                    throw new TapestryException(StructureMessages.unbalancedElements(completeId), getLocation(), null);
 
-                _elementAtSetup = null;
+                elementAtSetup = null;
 
                 invoke(false, POST_RENDER_CLEANUP);
 
@@ -403,11 +402,11 @@
                 // the page's dirty count. If the entire render goes well, then the page will be
                 // clean and can be stored into the pool for later reuse.
 
-                _page.decrementDirtyCount();
+                page.decrementDirtyCount();
             }
             else
             {
-                queue.push(_setupRender);
+                queue.push(setupRender);
             }
 
             handler.queueCommands(queue);
@@ -420,54 +419,54 @@
         }
     };
 
-    private final String _completeId;
+    private final String completeId;
 
     // The user-provided class, with runtime code enhancements. In a component with mixins, this
     // is the component to which the mixins are attached.
-    private final Component _coreComponent;
+    private final Component coreComponent;
 
     /**
      * Component lifecycle instances for all mixins; the core component is added to this list during page load. This is
      * only used in the case that a component has mixins (in which case, the core component is listed last).
      */
-    private List<Component> _components = null;
+    private List<Component> components = null;
 
-    private final ComponentPageElement _container;
+    private final ComponentPageElement container;
 
-    private final InternalComponentResources _coreResources;
+    private final InternalComponentResources coreResources;
 
-    private final String _id;
+    private final String id;
 
-    private boolean _loaded;
+    private boolean loaded;
 
     /**
      * Map from mixin id (the simple name of the mixin class) to resources for the mixin. Created when first mixin is
      * added.
      */
-    private Map<String, InternalComponentResources> _mixinIdToComponentResources;
+    private Map<String, InternalComponentResources> mixinIdToComponentResources;
 
-    private final String _nestedId;
+    private final String nestedId;
 
-    private final Page _page;
+    private final Page page;
 
-    private boolean _rendering;
+    private boolean rendering;
 
     /**
      * Used to detect mismatches calls to {@link MarkupWriter#element(String, Object[])} } and {@link
      * org.apache.tapestry.MarkupWriter#end()}.  The expectation is that any element(s) begun by this component during
      * rendering will be balanced by end() calls, resulting in the current element reverting to its initial value.
      */
-    private Element _elementAtSetup;
+    private Element elementAtSetup;
 
-    private final RenderCommand _setupRender = new RenderCommand()
+    private final RenderCommand setupRender = new RenderCommand()
     {
         public void render(final MarkupWriter writer, RenderQueue queue)
         {
             // TODO: Check for recursive rendering.
 
-            _rendering = true;
+            rendering = true;
 
-            _elementAtSetup = writer.getElement();
+            elementAtSetup = writer.getElement();
 
             RenderPhaseEventHandler handler = new RenderPhaseEventHandler();
             final Event event = new EventImpl(handler);
@@ -482,9 +481,9 @@
 
             invoke(false, callback);
 
-            queue.push(_cleanupRender);
+            queue.push(cleanupRender);
 
-            if (handler.getResult()) queue.push(_beginRender);
+            if (handler.getResult()) queue.push(beginRender);
 
             handler.queueCommands(queue);
         }
@@ -499,13 +498,13 @@
     // We know that, at the very least, there will be an element to force the component to render
     // its body, so there's no reason to wait to initialize the list.
 
-    private final List<PageElement> _template = newList();
+    private final List<PageElement> template = CollectionFactory.newList();
 
 
     public ComponentPageElement newChild(String id, String elementName, Instantiator instantiator, Location location)
     {
-        ComponentPageElementImpl child = new ComponentPageElementImpl(_page, this, id, elementName, instantiator,
-                                                                      location, _pageResources);
+        ComponentPageElementImpl child = new ComponentPageElementImpl(page, this, id, elementName, instantiator,
+                                                                      location, pageResources);
 
         addEmbeddedElement(child);
 
@@ -530,23 +529,24 @@
     {
         super(location);
 
-        _page = page;
-        _container = container;
-        _id = id;
-        _elementName = elementName;
-        _pageResources = pageResources;
+        this.page = page;
+        this.container = container;
+        this.id = id;
+        this.elementName = elementName;
+        this.pageResources = pageResources;
+
+        ComponentResources containerResources = container == null
+                                                ? null
+                                                : container.getComponentResources();
 
-        ComponentResources containerResources = container == null ? null : container
-                .getComponentResources();
-
-        String pageName = _page.getLogicalName();
+        String pageName = this.page.getLogicalName();
 
         // A page (really, the root component of a page) does not have a container.
 
         if (container == null)
         {
-            _completeId = pageName;
-            _nestedId = null;
+            completeId = pageName;
+            nestedId = null;
         }
         else
         {
@@ -559,21 +559,20 @@
 
             if (parentNestedId == null)
             {
-                _nestedId = caselessId;
-                _completeId = pageName + ":" + caselessId;
+                nestedId = caselessId;
+                completeId = pageName + ":" + caselessId;
             }
             else
             {
-                _nestedId = parentNestedId + "." + caselessId;
-                _completeId = container.getCompleteId() + "." + caselessId;
+                nestedId = parentNestedId + "." + caselessId;
+                completeId = container.getCompleteId() + "." + caselessId;
             }
         }
 
-        _coreResources = new InternalComponentResourcesImpl(_page, this, containerResources, _pageResources,
-                                                            _completeId, _nestedId, instantiator
-        );
+        coreResources = new InternalComponentResourcesImpl(this.page, this, containerResources, this.pageResources,
+                                                           completeId, nestedId, instantiator);
 
-        _coreComponent = _coreResources.getComponent();
+        coreComponent = coreResources.getComponent();
     }
 
     /**
@@ -586,23 +585,23 @@
 
     public void addEmbeddedElement(ComponentPageElement child)
     {
-        if (_children == null) _children = newCaseInsensitiveMap();
+        if (children == null) children = CollectionFactory.newCaseInsensitiveMap();
 
         String childId = child.getId();
 
-        ComponentPageElement existing = _children.get(childId);
+        ComponentPageElement existing = children.get(childId);
         if (existing != null)
             throw new TapestryException(StructureMessages.duplicateChildComponent(this, childId), child, null);
 
-        _children.put(childId, child);
+        children.put(childId, child);
     }
 
     public void addMixin(Instantiator instantiator)
     {
-        if (_mixinIdToComponentResources == null)
+        if (mixinIdToComponentResources == null)
         {
-            _mixinIdToComponentResources = newCaseInsensitiveMap();
-            _components = newList();
+            mixinIdToComponentResources = CollectionFactory.newCaseInsensitiveMap();
+            components = CollectionFactory.newList();
         }
 
         String mixinClassName = instantiator.getModel().getComponentClassName();
@@ -610,17 +609,17 @@
 
         String mixinExtension = "$" + mixinName.toLowerCase();
 
-        InternalComponentResourcesImpl resources = new InternalComponentResourcesImpl(_page, this, _coreResources,
-                                                                                      _pageResources,
-                                                                                      _completeId + mixinExtension,
-                                                                                      _nestedId + mixinExtension,
+        InternalComponentResourcesImpl resources = new InternalComponentResourcesImpl(page, this, coreResources,
+                                                                                      pageResources,
+                                                                                      completeId + mixinExtension,
+                                                                                      nestedId + mixinExtension,
                                                                                       instantiator);
 
         // TODO: Check for name collision?
 
-        _mixinIdToComponentResources.put(mixinName, resources);
+        mixinIdToComponentResources.put(mixinName, resources);
 
-        _components.add(resources.getComponent());
+        components.add(resources.getComponent());
     }
 
     public void bindParameter(String parameterName, Binding binding)
@@ -632,10 +631,10 @@
         if (dotx > 0)
         {
             String mixinName = parameterName.substring(0, dotx);
-            InternalComponentResources mixinResources = InternalUtils.get(_mixinIdToComponentResources, mixinName);
+            InternalComponentResources mixinResources = InternalUtils.get(mixinIdToComponentResources, mixinName);
 
             if (mixinResources == null) throw new TapestryException(
-                    StructureMessages.missingMixinForParameter(_completeId, mixinName, parameterName), binding, null);
+                    StructureMessages.missingMixinForParameter(completeId, mixinName, parameterName), binding, null);
 
             String simpleName = parameterName.substring(dotx + 1);
 
@@ -647,15 +646,15 @@
 
         // Does it match a formal parameter name of the core component? That takes precedence
 
-        if (_coreResources.getComponentModel().getParameterModel(parameterName) != null)
+        if (coreResources.getComponentModel().getParameterModel(parameterName) != null)
         {
-            _coreResources.bindParameter(parameterName, binding);
+            coreResources.bindParameter(parameterName, binding);
             return;
         }
 
-        for (String mixinName : InternalUtils.sortedKeys(_mixinIdToComponentResources))
+        for (String mixinName : InternalUtils.sortedKeys(mixinIdToComponentResources))
         {
-            InternalComponentResources resources = _mixinIdToComponentResources.get(mixinName);
+            InternalComponentResources resources = mixinIdToComponentResources.get(mixinName);
             if (resources.getComponentModel().getParameterModel(parameterName) != null)
             {
                 resources.bindParameter(parameterName, binding);
@@ -668,8 +667,8 @@
 
         // An informal parameter
 
-        if (informalParameterResources == null && _coreResources.getComponentModel().getSupportsInformalParameters())
-            informalParameterResources = _coreResources;
+        if (informalParameterResources == null && coreResources.getComponentModel().getSupportsInformalParameters())
+            informalParameterResources = coreResources;
 
         // For the moment, informal parameters accumulate in the core component's resources, but
         // that will likely change.
@@ -679,14 +678,14 @@
 
     public void addToBody(PageElement element)
     {
-        if (_body == null) _body = newList();
+        if (body == null) body = CollectionFactory.newList();
 
-        _body.add(element);
+        body.add(element);
     }
 
     public void addToTemplate(PageElement element)
     {
-        _template.add(element);
+        template.add(element);
     }
 
     private void addUnboundParameterNames(String prefix, List<String> unbound, InternalComponentResources resource)
@@ -723,11 +722,11 @@
         // If this component has mixins, add the core component to the end of the list, after the
         // mixins.
 
-        if (_components != null)
+        if (components != null)
         {
-            List<Component> ordered = newList();
+            List<Component> ordered = CollectionFactory.newList();
 
-            Iterator<Component> i = _components.iterator();
+            Iterator<Component> i = components.iterator();
 
             // Add all the normal components to the final list.
 
@@ -744,16 +743,16 @@
                 i.remove();
             }
 
-            ordered.add(_coreComponent);
+            ordered.add(coreComponent);
 
             // Add the remaining, late executing mixins
 
-            ordered.addAll(_components);
+            ordered.addAll(components);
 
-            _components = ordered;
+            components = ordered;
         }
 
-        _loaded = true;
+        loaded = true;
 
         // For some parameters, bindings (from defaults) are provided inside the callback method, so
         // that is invoked first, before we check for unbound parameters.
@@ -768,37 +767,37 @@
     {
         // If no body, then no beforeRenderBody or afterRenderBody
 
-        if (_body != null) queue.push(_beforeRenderBody);
+        if (body != null) queue.push(beforeRenderBody);
     }
 
     public String getCompleteId()
     {
-        return _completeId;
+        return completeId;
     }
 
     public Component getComponent()
     {
-        return _coreComponent;
+        return coreComponent;
     }
 
     public InternalComponentResources getComponentResources()
     {
-        return _coreResources;
+        return coreResources;
     }
 
     public ComponentPageElement getContainerElement()
     {
-        return _container;
+        return container;
     }
 
     public Page getContainingPage()
     {
-        return _page;
+        return page;
     }
 
     public ComponentPageElement getEmbeddedElement(String embeddedId)
     {
-        ComponentPageElement embeddedElement = InternalUtils.get(_children, embeddedId
+        ComponentPageElement embeddedElement = InternalUtils.get(children, embeddedId
                 .toLowerCase());
 
         if (embeddedElement == null)
@@ -809,22 +808,22 @@
 
     public String getId()
     {
-        return _id;
+        return id;
     }
 
 
     public Logger getLogger()
     {
-        return _coreResources.getLogger();
+        return coreResources.getLogger();
     }
 
     public Component getMixinByClassName(String mixinClassName)
     {
         Component result = null;
 
-        if (_mixinIdToComponentResources != null)
+        if (mixinIdToComponentResources != null)
         {
-            for (InternalComponentResources resources : _mixinIdToComponentResources.values())
+            for (InternalComponentResources resources : mixinIdToComponentResources.values())
             {
                 if (resources.getComponentModel().getComponentClassName().equals(mixinClassName))
                 {
@@ -834,7 +833,7 @@
             }
         }
 
-        if (result == null) throw new TapestryException(StructureMessages.unknownMixin(_completeId, mixinClassName),
+        if (result == null) throw new TapestryException(StructureMessages.unknownMixin(completeId, mixinClassName),
                                                         getLocation(), null);
 
         return result;
@@ -844,30 +843,30 @@
     {
         ComponentResources result = null;
 
-        if (_mixinIdToComponentResources != null)
-            result = _mixinIdToComponentResources.get(mixinId);
+        if (mixinIdToComponentResources != null)
+            result = mixinIdToComponentResources.get(mixinId);
 
         if (result == null)
             throw new IllegalArgumentException(
-                    String.format("Unable to locate mixin '%s' for component '%s'.", mixinId, _completeId));
+                    String.format("Unable to locate mixin '%s' for component '%s'.", mixinId, completeId));
 
         return result;
     }
 
     public String getNestedId()
     {
-        return _nestedId;
+        return nestedId;
     }
 
     public boolean dispatchEvent(ComponentEvent event)
     {
-        if (_components == null) return _coreComponent.dispatchComponentEvent(event);
+        if (components == null) return coreComponent.dispatchComponentEvent(event);
 
         // Otherwise, iterate over mixins + core component
 
         boolean result = false;
 
-        for (Component component : _components)
+        for (Component component : components)
         {
             result |= component.dispatchComponentEvent(event);
 
@@ -890,13 +889,13 @@
         { // Optimization: In the most general case (just the one component, no mixins)
             // invoke the callback on the component and be done ... no iterators, no nothing.
 
-            if (_components == null)
+            if (components == null)
             {
-                callback.run(_coreComponent);
+                callback.run(coreComponent);
                 return;
             }
 
-            Iterator<Component> i = reverse ? InternalUtils.reverseIterator(_components) : _components.iterator();
+            Iterator<Component> i = reverse ? InternalUtils.reverseIterator(components) : components.iterator();
 
             while (i.hasNext()) callback.run(i.next());
         }
@@ -908,12 +907,12 @@
 
     public boolean isLoaded()
     {
-        return _loaded;
+        return loaded;
     }
 
     public boolean isRendering()
     {
-        return _rendering;
+        return rendering;
     }
 
     /**
@@ -921,7 +920,7 @@
      */
     private String phaseToString(String phaseName)
     {
-        return String.format("%s[%s]", phaseName, _completeId);
+        return String.format("%s[%s]", phaseName, completeId);
     }
 
 
@@ -935,19 +934,19 @@
 
         // Once we start rendering, the page is considered dirty, until we cleanup post render.
 
-        _page.incrementDirtyCount();
+        page.incrementDirtyCount();
 
-        queue.startComponent(_coreResources);
+        queue.startComponent(coreResources);
 
         queue.push(POP_COMPONENT_ID);
 
-        queue.push(_setupRender);
+        queue.push(setupRender);
     }
 
     @Override
     public String toString()
     {
-        return String.format("ComponentPageElement[%s]", _completeId);
+        return String.format("ComponentPageElement[%s]", completeId);
     }
 
     public boolean triggerEvent(String eventType, Object[] contextValues, ComponentEventCallback callback)
@@ -969,7 +968,7 @@
 
             public <T> T get(Class<T> desiredType, int index)
             {
-                return _pageResources.coerce(values[index], desiredType);
+                return pageResources.coerce(values[index], desiredType);
             }
         };
     }
@@ -987,7 +986,7 @@
 
         // Provide a default handler for when the provided handler is null.
         final ComponentEventCallback providedHandler = callback == null ? new NotificationEventCallback(eventType,
-                                                                                                        _completeId) : callback;
+                                                                                                        completeId) : callback;
 
         ComponentEventCallback wrapped = new ComponentEventCallback()
         {
@@ -1020,7 +1019,7 @@
             try
             {
                 ComponentEvent event = new ComponentEventImpl(currentEventType, componentId, currentContext, wrapped,
-                                                              _pageResources);
+                                                              pageResources);
 
                 result |= component.dispatchEvent(event);
 
@@ -1069,12 +1068,12 @@
 
     private void verifyRequiredParametersAreBound()
     {
-        List<String> unbound = newList();
+        List<String> unbound = CollectionFactory.newList();
 
-        addUnboundParameterNames(null, unbound, _coreResources);
+        addUnboundParameterNames(null, unbound, coreResources);
 
-        for (String name : InternalUtils.sortedKeys(_mixinIdToComponentResources))
-            addUnboundParameterNames(name, unbound, _mixinIdToComponentResources.get(name));
+        for (String name : InternalUtils.sortedKeys(mixinIdToComponentResources))
+            addUnboundParameterNames(name, unbound, mixinIdToComponentResources.get(name));
 
         if (unbound.isEmpty()) return;
 
@@ -1083,12 +1082,12 @@
 
     public Locale getLocale()
     {
-        return _page.getLocale();
+        return page.getLocale();
     }
 
     public String getElementName(String defaultElementName)
     {
-        return _elementName != null ? _elementName : defaultElementName;
+        return elementName != null ? elementName : defaultElementName;
     }
 
     public Block getBlock(String id)
@@ -1096,7 +1095,7 @@
         Block result = findBlock(id);
 
         if (result == null)
-            throw new BlockNotFoundException(StructureMessages.blockNotFound(_completeId, id), getLocation());
+            throw new BlockNotFoundException(StructureMessages.blockNotFound(completeId, id), getLocation());
 
         return result;
     }
@@ -1105,17 +1104,17 @@
     {
         notBlank(id, "id");
 
-        return InternalUtils.get(_blocks, id);
+        return InternalUtils.get(blocks, id);
     }
 
     public void addBlock(String blockId, Block block)
     {
-        if (_blocks == null) _blocks = newCaseInsensitiveMap();
+        if (blocks == null) blocks = CollectionFactory.newCaseInsensitiveMap();
 
-        if (_blocks.containsKey(blockId))
+        if (blocks.containsKey(blockId))
             throw new TapestryException(StructureMessages.duplicateBlock(this, blockId), block, null);
 
-        _blocks.put(blockId, block);
+        blocks.put(blockId, block);
     }
 
     public String getDefaultBindingPrefix(String parameterName)
@@ -1125,10 +1124,10 @@
         if (dotx > 0)
         {
             String mixinName = parameterName.substring(0, dotx);
-            InternalComponentResources mixinResources = InternalUtils.get(_mixinIdToComponentResources, mixinName);
+            InternalComponentResources mixinResources = InternalUtils.get(mixinIdToComponentResources, mixinName);
 
             if (mixinResources == null) throw new TapestryException(
-                    StructureMessages.missingMixinForParameter(_completeId, mixinName, parameterName), null, null);
+                    StructureMessages.missingMixinForParameter(completeId, mixinName, parameterName), null, null);
 
             String simpleName = parameterName.substring(dotx + 1);
 
@@ -1139,15 +1138,15 @@
 
         // A formal parameter of the core component?
 
-        ParameterModel pm = _coreResources.getComponentModel().getParameterModel(parameterName);
+        ParameterModel pm = coreResources.getComponentModel().getParameterModel(parameterName);
 
         if (pm != null) return pm.getDefaultBindingPrefix();
 
         // Search for mixin that it is a formal parameter of
 
-        for (String mixinName : InternalUtils.sortedKeys(_mixinIdToComponentResources))
+        for (String mixinName : InternalUtils.sortedKeys(mixinIdToComponentResources))
         {
-            InternalComponentResources resources = _mixinIdToComponentResources.get(mixinName);
+            InternalComponentResources resources = mixinIdToComponentResources.get(mixinName);
 
             pm = resources.getComponentModel().getParameterModel(parameterName);
 
@@ -1161,11 +1160,11 @@
 
     public String getPageName()
     {
-        return _page.getLogicalName();
+        return page.getLogicalName();
     }
 
     public Map<String, Binding> getInformalParameterBindings()
     {
-        return _coreResources.getInformalParameterBindings();
+        return coreResources.getInformalParameterBindings();
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/DTDPageElement.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/DTDPageElement.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/DTDPageElement.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/DTDPageElement.java Wed May  7 19:23:21 2008
@@ -24,27 +24,28 @@
 
 public class DTDPageElement implements PageElement
 {
+    private final String name;
 
-    private final String _name;
-    private final String _publicId;
-    private final String _systemId;
+    private final String publicId;
+
+    private final String systemId;
 
     public DTDPageElement(String name, String publicId, String systemId)
     {
-        _name = name;
-        _publicId = publicId;
-        _systemId = systemId;
+        this.name = name;
+        this.publicId = publicId;
+        this.systemId = systemId;
     }
 
     public void render(MarkupWriter writer, RenderQueue queue)
     {
-        writer.getDocument().dtd(_name, _publicId, _systemId);
+        writer.getDocument().dtd(name, publicId, systemId);
     }
 
     @Override
     public String toString()
     {
-        return String.format("DTD[name=%s; publicId=%s; systemId=%s]", _name, _publicId, _systemId);
+        return String.format("DTD[name=%s; publicId=%s; systemId=%s]", name, publicId, systemId);
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ExpansionPageElement.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ExpansionPageElement.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ExpansionPageElement.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/ExpansionPageElement.java Wed May  7 19:23:21 2008
@@ -1,17 +1,17 @@
-// 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.structure;
 
 import org.apache.tapestry.Binding;
@@ -24,32 +24,32 @@
  */
 public class ExpansionPageElement implements PageElement
 {
-    private final Binding _binding;
+    private final Binding binding;
 
-    private final boolean _invariant;
+    private final boolean invariant;
 
-    private final TypeCoercer _coercer;
+    private final TypeCoercer coercer;
 
-    private boolean _cached;
+    private boolean cached;
 
-    private String _cachedValue;
+    private String cachedValue;
 
     public ExpansionPageElement(Binding binding, TypeCoercer coercer)
     {
-        _binding = binding;
-        _coercer = coercer;
+        this.binding = binding;
+        this.coercer = coercer;
 
-        _invariant = _binding.isInvariant();
+        invariant = this.binding.isInvariant();
     }
 
     public void render(MarkupWriter writer, RenderQueue queue)
     {
-        String value = _cached ? _cachedValue : _coercer.coerce(_binding.get(), String.class);
+        String value = cached ? cachedValue : coercer.coerce(binding.get(), String.class);
 
-        if (_invariant && !_cached)
+        if (invariant && !cached)
         {
-            _cachedValue = value;
-            _cached = true;
+            cachedValue = value;
+            cached = true;
         }
 
         writer.write(value);
@@ -58,6 +58,6 @@
     @Override
     public String toString()
     {
-        return String.format("Expansion[%s]", _binding.toString());
+        return String.format("Expansion[%s]", binding.toString());
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java?rev=654390&r1=654389&r2=654390&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java Wed May  7 19:23:21 2008
@@ -22,7 +22,6 @@
 import org.apache.tapestry.ioc.Messages;
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.ioc.internal.util.CollectionFactory;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newCaseInsensitiveMap;
 import org.apache.tapestry.ioc.internal.util.Defense;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.apache.tapestry.ioc.internal.util.TapestryException;
@@ -42,49 +41,49 @@
  */
 public class InternalComponentResourcesImpl implements InternalComponentResources
 {
-    private final Page _page;
+    private final Page page;
 
-    private final String _completeId;
+    private final String completeId;
 
-    private final String _nestedId;
+    private final String nestedId;
 
-    private final ComponentModel _componentModel;
+    private final ComponentModel componentModel;
 
-    private final ComponentPageElement _element;
+    private final ComponentPageElement element;
 
-    private final Component _component;
+    private final Component component;
 
-    private final ComponentResources _containerResources;
+    private final ComponentResources containerResources;
 
-    private final PageResources _pageResources;
+    private final PageResources pageResources;
 
     // Case insensitive
-    private Map<String, Binding> _bindings;
+    private Map<String, Binding> bindings;
 
-    private Messages _messages;
+    private Messages messages;
 
     // Case insensitive
-    private Map<String, Object> _renderVariables;
+    private Map<String, Object> renderVariables;
 
     public InternalComponentResourcesImpl(Page page, ComponentPageElement element,
                                           ComponentResources containerResources, PageResources pageResources,
                                           String completeId, String nestedId, Instantiator componentInstantiator
     )
     {
-        _page = page;
-        _element = element;
-        _containerResources = containerResources;
-        _pageResources = pageResources;
-        _completeId = completeId;
-        _nestedId = nestedId;
+        this.page = page;
+        this.element = element;
+        this.containerResources = containerResources;
+        this.pageResources = pageResources;
+        this.completeId = completeId;
+        this.nestedId = nestedId;
 
-        _componentModel = componentInstantiator.getModel();
-        _component = componentInstantiator.newInstance(this);
+        componentModel = componentInstantiator.getModel();
+        component = componentInstantiator.newInstance(this);
     }
 
     public Location getLocation()
     {
-        return _element.getLocation();
+        return element.getLocation();
     }
 
     @Override
@@ -95,22 +94,22 @@
 
     public ComponentModel getComponentModel()
     {
-        return _componentModel;
+        return componentModel;
     }
 
     public Component getEmbeddedComponent(String embeddedId)
     {
-        return _element.getEmbeddedElement(embeddedId).getComponent();
+        return element.getEmbeddedElement(embeddedId).getComponent();
     }
 
     public Object getFieldChange(String fieldName)
     {
-        return _page.getFieldChange(_nestedId, fieldName);
+        return page.getFieldChange(nestedId, fieldName);
     }
 
     public String getId()
     {
-        return _element.getId();
+        return element.getId();
     }
 
     public boolean hasFieldChange(String fieldName)
@@ -126,17 +125,17 @@
      */
     public Link createActionLink(String action, boolean forForm, Object... context)
     {
-        return _page.createActionLink(_element.getNestedId(), action, forForm, context);
+        return page.createActionLink(element.getNestedId(), action, forForm, context);
     }
 
     public Link createPageLink(String pageName, boolean override, Object... context)
     {
-        return _page.createPageLink(pageName, override, context);
+        return page.createPageLink(pageName, override, context);
     }
 
     public void discardPersistentFieldChanges()
     {
-        _page.discardPersistentFieldChanges();
+        page.discardPersistentFieldChanges();
     }
 
     public String getElementName()
@@ -146,12 +145,12 @@
 
     public String getCompleteId()
     {
-        return _completeId;
+        return completeId;
     }
 
     public Component getComponent()
     {
-        return _component;
+        return component;
     }
 
     public boolean isBound(String parameterName)
@@ -170,27 +169,27 @@
 
     public boolean isRendering()
     {
-        return _element.isRendering();
+        return element.isRendering();
     }
 
     public boolean triggerEvent(String eventType, Object[] context, ComponentEventCallback handler)
     {
-        return _element.triggerEvent(eventType, context, handler);
+        return element.triggerEvent(eventType, context, handler);
     }
 
     public boolean triggerContextEvent(String eventType, EventContext context, ComponentEventCallback callback)
     {
-        return _element.triggerContextEvent(eventType, context, callback);
+        return element.triggerContextEvent(eventType, context, callback);
     }
 
     public String getNestedId()
     {
-        return _nestedId;
+        return nestedId;
     }
 
     public Component getPage()
     {
-        return _element.getContainingPage().getRootComponent();
+        return element.getContainingPage().getRootComponent();
     }
 
     public boolean isInvariant(String parameterName)
@@ -202,14 +201,14 @@
 
     public boolean isLoaded()
     {
-        return _element.isLoaded();
+        return element.isLoaded();
     }
 
     public void persistFieldChange(String fieldName, Object newValue)
     {
         try
         {
-            _page.persistFieldChange(this, fieldName, newValue);
+            page.persistFieldChange(this, fieldName, newValue);
         }
         catch (Exception ex)
         {
@@ -220,9 +219,9 @@
 
     public void bindParameter(String parameterName, Binding binding)
     {
-        if (_bindings == null) _bindings = newCaseInsensitiveMap();
+        if (bindings == null) bindings = CollectionFactory.newCaseInsensitiveMap();
 
-        _bindings.put(parameterName, binding);
+        bindings.put(parameterName, binding);
     }
 
     @SuppressWarnings("unchecked")
@@ -237,7 +236,7 @@
 
             Object boundValue = b.get();
 
-            return _pageResources.coerce(boundValue, expectedType);
+            return pageResources.coerce(boundValue, expectedType);
         }
         catch (Exception ex)
         {
@@ -248,7 +247,7 @@
 
     public Object readParameter(String parameterName, String desiredTypeName)
     {
-        Class parameterType = _pageResources.toClass(desiredTypeName);
+        Class parameterType = pageResources.toClass(desiredTypeName);
 
         return readParameter(parameterName, parameterType);
     }
@@ -269,7 +268,7 @@
 
         try
         {
-            Object coerced = _pageResources.coerce(parameterValue, bindingType);
+            Object coerced = pageResources.coerce(parameterValue, bindingType);
 
             b.set(coerced);
         }
@@ -282,7 +281,7 @@
 
     private Binding getBinding(String parameterName)
     {
-        return _bindings == null ? null : _bindings.get(parameterName);
+        return bindings == null ? null : bindings.get(parameterName);
     }
 
     public AnnotationProvider getAnnotationProvider(String parameterName)
@@ -292,25 +291,25 @@
 
     public Logger getLogger()
     {
-        return _componentModel.getLogger();
+        return componentModel.getLogger();
     }
 
     public Component getMixinByClassName(String mixinClassName)
     {
-        return _element.getMixinByClassName(mixinClassName);
+        return element.getMixinByClassName(mixinClassName);
     }
 
     public void renderInformalParameters(MarkupWriter writer)
     {
-        if (_bindings == null) return;
+        if (bindings == null) return;
 
-        for (String name : _bindings.keySet())
+        for (String name : bindings.keySet())
         {
             // Skip all formal parameters.
 
-            if (_componentModel.getParameterModel(name) != null) continue;
+            if (componentModel.getParameterModel(name) != null) continue;
 
-            Binding b = _bindings.get(name);
+            Binding b = bindings.get(name);
 
             Object value = b.get();
 
@@ -321,7 +320,7 @@
 
             if (value instanceof Block) continue;
 
-            String valueString = _pageResources.coerce(value, String.class);
+            String valueString = pageResources.coerce(value, String.class);
 
             writer.attributes(name, valueString);
         }
@@ -329,46 +328,46 @@
 
     public Component getContainer()
     {
-        if (_containerResources == null) return null;
+        if (containerResources == null) return null;
 
-        return _containerResources.getComponent();
+        return containerResources.getComponent();
     }
 
     public ComponentResources getContainerResources()
     {
-        return _containerResources;
+        return containerResources;
     }
 
     public Messages getContainerMessages()
     {
-        return _containerResources != null ? _containerResources.getMessages() : null;
+        return containerResources != null ? containerResources.getMessages() : null;
     }
 
     public Locale getLocale()
     {
-        return _element.getLocale();
+        return element.getLocale();
     }
 
     public Messages getMessages()
     {
-        if (_messages == null) _messages = _pageResources.getMessages(_componentModel);
+        if (messages == null) messages = pageResources.getMessages(componentModel);
 
-        return _messages;
+        return messages;
     }
 
     public String getElementName(String defaultElementName)
     {
-        return _element.getElementName(defaultElementName);
+        return element.getElementName(defaultElementName);
     }
 
     public void queueRender(RenderQueue queue)
     {
-        queue.push(_element);
+        queue.push(element);
     }
 
     public Block getBlock(String blockId)
     {
-        return _element.getBlock(blockId);
+        return element.getBlock(blockId);
     }
 
     public Block getBlockParameter(String parameterName)
@@ -383,31 +382,31 @@
 
     public Block findBlock(String blockId)
     {
-        return _element.findBlock(blockId);
+        return element.findBlock(blockId);
     }
 
     public Resource getBaseResource()
     {
-        return _componentModel.getBaseResource();
+        return componentModel.getBaseResource();
     }
 
     public String getPageName()
     {
-        return _element.getPageName();
+        return element.getPageName();
     }
 
     public Map<String, Binding> getInformalParameterBindings()
     {
         Map<String, Binding> result = CollectionFactory.newMap();
 
-        if (_bindings != null)
+        if (bindings != null)
         {
-            for (String name : _bindings.keySet())
+            for (String name : bindings.keySet())
             {
 
-                if (_componentModel.getParameterModel(name) != null) continue;
+                if (componentModel.getParameterModel(name) != null) continue;
 
-                result.put(name, _bindings.get(name));
+                result.put(name, bindings.get(name));
             }
         }
 
@@ -416,11 +415,11 @@
 
     public Object getRenderVariable(String name)
     {
-        Object result = InternalUtils.get(_renderVariables, name);
+        Object result = InternalUtils.get(renderVariables, name);
 
         if (result == null) throw new IllegalArgumentException(StructureMessages.missingRenderVariable(getCompleteId(),
                                                                                                        name,
-                                                                                                       _renderVariables == null ? null : _renderVariables.keySet()));
+                                                                                                       renderVariables == null ? null : renderVariables.keySet()));
 
         return result;
     }
@@ -430,21 +429,21 @@
         Defense.notBlank(name, "name");
         Defense.notNull(value, "value");
 
-        if (!_element.isRendering())
+        if (!element.isRendering())
             throw new IllegalStateException(StructureMessages.renderVariableSetWhenNotRendering(getCompleteId(), name));
 
-        if (_renderVariables == null) _renderVariables = CollectionFactory.newCaseInsensitiveMap();
+        if (renderVariables == null) renderVariables = CollectionFactory.newCaseInsensitiveMap();
 
-        _renderVariables.put(name, value);
+        renderVariables.put(name, value);
     }
 
     public void postRenderCleanup()
     {
-        if (_renderVariables != null) _renderVariables.clear();
+        if (renderVariables != null) renderVariables.clear();
     }
 
     public void addPageLifecycleListener(PageLifecycleListener listener)
     {
-        _page.addLifecycleListener(listener);
+        page.addLifecycleListener(listener);
     }
 }