commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r618149 [1/2] - in /commons/proper/jxpath/trunk: ./ src/java/org/apache/commons/jxpath/ src/java/org/apache/commons/jxpath/functions/ src/java/org/apache/commons/jxpath/ri/ src/java/org/apache/commons/jxpath/ri/axes/ src/java/org/apache/com...
Date Mon, 04 Feb 2008 02:04:18 GMT
Author: mbenson
Date: Sun Feb  3 18:04:13 2008
New Revision: 618149

URL: http://svn.apache.org/viewvc?rev=618149&view=rev
Log:
checkstyle

Added:
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynabeans/package.html   (with props)
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynamic/package.html   (with props)
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/package.html   (with props)
Modified:
    commons/proper/jxpath/trunk/checkstyle.xml
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicNodeSet.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicVariables.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/CompiledExpression.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/DynamicPropertyHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExpressionContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExtendedKeyManager.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Function.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathAbstractFactoryException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathFunctionNotFoundException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathTypeConversionException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/KeyManager.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/MapDynamicPropertyHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/NodeSet.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Pointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/ConstructorFunction.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/InfoSetUtil.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathCompiledExpression.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/QName.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationGreaterThan.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationRelationalExpression.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/LocationPath.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/NodeTypeTest.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointerFactory.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyOwnerPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributePointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodePointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPointerFactory.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynabeans/DynaBeanPropertyPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/HttpSessionHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/JXPathServletContexts.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/PageContextHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/PageScopeContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/PageScopeContextHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletRequestHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/BasicTypeConverter.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/KeyManagerUtils.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ValueUtils.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/JDOMParser.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/XMLParser2.java

Modified: commons/proper/jxpath/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/checkstyle.xml?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/checkstyle.xml (original)
+++ commons/proper/jxpath/trunk/checkstyle.xml Sun Feb  3 18:04:13 2008
@@ -126,7 +126,14 @@
           <!-- Checks for blocks. You know, those {}'s         -->
           <!-- See http://checkstyle.sf.net/config_blocks.html -->
           <module name="AvoidNestedBlocks"/>
-          <module name="EmptyBlock"/>
+          <module name="EmptyBlock">
+            <property name="option" value="stmt" />
+            <property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,INSTANCE_INIT,STATIC_INIT" />
+          </module>
+          <module name="EmptyBlock">
+            <property name="option" value="text" />
+            <property name="tokens" value="LITERAL_CATCH" />
+          </module>
           
           <module name="NeedBraces"/>
   
@@ -165,7 +172,6 @@
               <property name="format" value="\s+$"/>
               <property name="message" value="Line has trailing spaces."/>
           </module>
-          <module name="TodoComment"/>
           <module name="UpperEll"/>
   
       </module>

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicNodeSet.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicNodeSet.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicNodeSet.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicNodeSet.java Sun Feb  3 18:04:13 2008
@@ -31,24 +31,39 @@
     private List nodes;
     private List values;
 
+    /**
+     * Add a pointer to this NodeSet.
+     * @param pointer to add
+     */
     public void add(Pointer pointer) {
         if (pointers.add(pointer)) {
             clearCacheLists();
         }
     }
 
+    /**
+     * Add the specified NodeSet to this NodeSet.
+     * @param nodeSet to add
+     */
     public void add(NodeSet nodeSet) {
         if (pointers.addAll(nodeSet.getPointers())) {
             clearCacheLists();
         }
     }
 
+    /**
+     * Remove a pointer from this NodeSet.
+     * @param pointer to remove
+     */
     public void remove(Pointer pointer) {
         if (pointers.remove(pointer)) {
             clearCacheLists();
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public synchronized List getPointers() {
         if (readOnlyPointers == null) {
             readOnlyPointers = Collections.unmodifiableList(pointers);
@@ -56,6 +71,9 @@
         return readOnlyPointers;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public synchronized List getNodes() {
         if (nodes == null) {
             nodes = new ArrayList();
@@ -68,6 +86,9 @@
         return nodes;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public synchronized List getValues() {
         if (values == null) {
             values = new ArrayList();
@@ -80,6 +101,9 @@
         return values;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         return pointers.toString();
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicVariables.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicVariables.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicVariables.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/BasicVariables.java Sun Feb  3 18:04:13 2008
@@ -82,6 +82,9 @@
         vars.remove(varName);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         return vars.toString();
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/CompiledExpression.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/CompiledExpression.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/CompiledExpression.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/CompiledExpression.java Sun Feb  3 18:04:13 2008
@@ -40,12 +40,17 @@
     /**
      * Evaluates the xpath and returns the resulting object. Primitive
      * types are wrapped into objects.
+     * @param context to evaluate
+     * @return Object
      */
     Object getValue(JXPathContext context);
 
     /**
      * Evaluates the xpath, converts the result to the specified class and
      * returns the resulting object.
+     * @param context to evaluate
+     * @param requiredType return type
+     * @return Object
      */
     Object getValue(JXPathContext context, Class requiredType);
 
@@ -56,6 +61,8 @@
      * <li>The xpath does not in fact describe an existing property
      * <li>The property is not writable (no public, non-static set method)
      * </ul>
+     * @param context base
+     * @param value to set
      */
     void setValue(JXPathContext context, Object value);
 
@@ -63,6 +70,8 @@
      * Creates intermediate elements of
      * the path by invoking an AbstractFactory, which should first be
      * installed on the context by calling "setFactory".
+     * @param context base
+     * @return Pointer created
      */
     Pointer createPath(JXPathContext context);
 
@@ -79,6 +88,9 @@
      * element.
      * <li>The property is not writable (no public, non-static set method)
      * </ul>
+     * @param context base
+     * @param value to set
+     * @return Pointer created
      */
     Pointer createPathAndSetValue(JXPathContext context, Object value);
 
@@ -86,6 +98,8 @@
      * Traverses the xpath and returns a Iterator of all results found
      * for the path. If the xpath matches no properties
      * in the graph, the Iterator will not be null.
+     * @param context base
+     * @return Iterator
      */
     Iterator iterate(JXPathContext context);
 
@@ -94,6 +108,9 @@
      * A Pointer provides easy access to a property.
      * If the xpath matches no properties
      * in the graph, the pointer will be null.
+     * @param context base
+     * @param xpath string
+     * @return Pointer found
      */
     Pointer getPointer(JXPathContext context, String xpath);
 
@@ -102,16 +119,20 @@
      * A Pointer provides easy access to a property.
      * If the xpath matches no properties
      * in the graph, the Iterator be empty, but not null.
+     * @param context to iterate
+     * @return Iterator<Pointer>
      */
     Iterator iteratePointers(JXPathContext context);
 
     /**
-     * Remove the graph element described by this expression
+     * Remove the graph element described by this expression.
+     * @param context base
      */
     void removePath(JXPathContext context);
 
     /**
-     * Remove all graph elements described by this expression
+     * Remove all graph elements described by this expression.
+     * @param context base
      */
     void removeAll(JXPathContext context);
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/DynamicPropertyHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/DynamicPropertyHandler.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/DynamicPropertyHandler.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/DynamicPropertyHandler.java Sun Feb  3 18:04:13 2008
@@ -41,16 +41,24 @@
 
     /**
      * Returns a list of dynamic property names for the supplied object.
+     * @param object to inspect
+     * @return String[]
      */
     String[] getPropertyNames(Object object);
 
     /**
      * Returns the value of the specified dynamic property.
+     * @param object to search
+     * @param propertyName to retrieve
+     * @return Object
      */
     Object getProperty(Object object, String propertyName);
 
     /**
      * Modifies the value of the specified dynamic property.
+     * @param object to modify
+     * @param propertyName to modify
+     * @param value to set
      */
     void setProperty(Object object, String propertyName, Object value);
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExpressionContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExpressionContext.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExpressionContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExpressionContext.java Sun Feb  3 18:04:13 2008
@@ -68,6 +68,7 @@
 
     /**
      * Returns the current context position.
+     * @return int
      */
     int getPosition();
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExtendedKeyManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExtendedKeyManager.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExtendedKeyManager.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExtendedKeyManager.java Sun Feb  3 18:04:13 2008
@@ -30,9 +30,10 @@
 
     /**
      * Find a NodeSet by key/value.
-     * @param context
-     * @param key
-     * @param value
+     * @param context base
+     * @param key String
+     * @param value Object
+     * @return NodeSet found
      */
     NodeSet getNodeSetByKey(JXPathContext context, String key, Object value);
 

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Function.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Function.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Function.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Function.java Sun Feb  3 18:04:13 2008
@@ -40,6 +40,8 @@
      *
      * @param context can be used to acquire the context in which the
      *    function is being evaluted.
+     * @param parameters function arguments
+     * @return Object result
      */
     Object invoke(ExpressionContext context, Object[] parameters);
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathAbstractFactoryException.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathAbstractFactoryException.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathAbstractFactoryException.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathAbstractFactoryException.java Sun Feb  3 18:04:13 2008
@@ -28,6 +28,10 @@
 
     private static final long serialVersionUID = -4403564377958943239L;
 
+    /**
+     * Create a new JXPathAbstractFactoryException.
+     * @param message exception message
+     */
     public JXPathAbstractFactoryException(String message) {
         super(message);
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java Sun Feb  3 18:04:13 2008
@@ -37,7 +37,7 @@
 public class JXPathBasicBeanInfo implements JXPathBeanInfo {
     private boolean atomic = false;
     private Class clazz;
-    private PropertyDescriptor propertyDescriptors[];
+    private PropertyDescriptor[] propertyDescriptors;
     private Class dynamicPropertyHandlerClass;
     private HashMap propertyDescriptorMap;
 

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathException.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathException.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathException.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathException.java Sun Feb  3 18:04:13 2008
@@ -67,9 +67,8 @@
      * Create a new <code>JXPathException</code> with the
      * given <code>Exception</code> base cause and detail message.
      *
-     * @param e The exception to be encapsulated in a
-     * JXPathException
      * @param msg The detail message.
+     * @param e The exception to be encapsulated in a JXPathException
      */
     public JXPathException(String msg, Throwable e) {
         super(msg);
@@ -110,6 +109,7 @@
 
     /**
      * Same as {@link #getException() getException()}
+     * @return The encapsulated exception, or null if there is none.
      */
     public Throwable getCause() {
         return exception;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathFunctionNotFoundException.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathFunctionNotFoundException.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathFunctionNotFoundException.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathFunctionNotFoundException.java Sun Feb  3 18:04:13 2008
@@ -27,6 +27,10 @@
 
     private static final long serialVersionUID = -8875537628056117241L;
 
+    /**
+     * Create a new JXPathFunctionNotFoundException.
+     * @param message exception message
+     */
     public JXPathFunctionNotFoundException(String message) {
         super(message);
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathIntrospector.java Sun Feb  3 18:04:13 2008
@@ -62,6 +62,7 @@
     /**
      * Automatically creates and registers a JXPathBeanInfo object
      * for the specified class. That object returns true to isAtomic().
+     * @param beanClass to register
      */
     public static void registerAtomicClass(Class beanClass) {
         byClass.put(beanClass, new JXPathBasicBeanInfo(beanClass, true));
@@ -70,11 +71,11 @@
     /**
      * Automatically creates and registers a JXPathBeanInfo object
      * for the specified class. That object returns true to isDynamic().
+     * @param beanClass to register
+     * @param dynamicPropertyHandlerClass to handle beanClass
      */
-    public static void registerDynamicClass(
-        Class beanClass,
-        Class dynamicPropertyHandlerClass)
-    {
+    public static void registerDynamicClass(Class beanClass,
+            Class dynamicPropertyHandlerClass) {
         JXPathBasicBeanInfo bi =
             new JXPathBasicBeanInfo(beanClass, dynamicPropertyHandlerClass);
         if (beanClass.isInterface()) {
@@ -86,7 +87,7 @@
     }
 
     /**
-     * Creates  and registers a JXPathBeanInfo object for the supplied class. If
+     * Creates and registers a JXPathBeanInfo object for the supplied class. If
      * the class has already been registered, returns the registered
      * JXPathBeanInfo object.
      * <p>
@@ -97,6 +98,8 @@
      * <li>Otherwise, an instance of {@link JXPathBasicBeanInfo
      *     JXPathBasicBeanInfo}  is allocated.
      * </ul>
+     * @param beanClass whose info to get
+     * @return JXPathBeanInfo
      */
     public static JXPathBeanInfo getBeanInfo(Class beanClass) {
         JXPathBeanInfo beanInfo = (JXPathBeanInfo) byClass.get(beanClass);
@@ -116,6 +119,8 @@
     /**
      * Find a dynamic bean info if available for any superclasses or
      * interfaces.
+     * @param beanClass to search for
+     * @return JXPathBeanInfo
      */
     private static JXPathBeanInfo findDynamicBeanInfo(Class beanClass) {
         JXPathBeanInfo beanInfo = null;
@@ -126,7 +131,7 @@
             }
         }
 
-        Class interfaces[] = beanClass.getInterfaces();
+        Class[] interfaces = beanClass.getInterfaces();
         if (interfaces != null) {
             for (int i = 0; i < interfaces.length; i++) {
                 beanInfo = findDynamicBeanInfo(interfaces[i]);
@@ -147,6 +152,15 @@
         return null;
     }
 
+    /**
+     * find a JXPathBeanInfo instance for the specified class.
+     * Similar to javax.beans property handler discovery; search for a
+     * class with "XBeanInfo" appended to beanClass.name, then check
+     * whether beanClass implements JXPathBeanInfo for itself.
+     * Invokes the default constructor for any class it finds.
+     * @param beanClass for which to look for an info provider
+     * @return JXPathBeanInfo instance or null if none found
+     */
     private static synchronized JXPathBeanInfo findInformant(Class beanClass) {
         String name = beanClass.getName() + "XBeanInfo";
         try {
@@ -173,10 +187,13 @@
      * Try to create an instance of a named class.
      * First try the classloader of "sibling", then try the system
      * classloader.
+     * @param sibling Class
+     * @param className to instantiate
+     * @return new Object
+     * @throws Exception if instantiation fails
      */
     private static Object instantiate(Class sibling, String className)
-        throws Exception
-    {
+            throws Exception {
 
         // First check with sibling's classloader (if any).
         ClassLoader cl = sibling.getClassLoader();

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathTypeConversionException.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathTypeConversionException.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathTypeConversionException.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathTypeConversionException.java Sun Feb  3 18:04:13 2008
@@ -27,10 +27,19 @@
 
     private static final long serialVersionUID = -4403564377958943239L;
 
+    /**
+     * Create a new JXPathTypeConversionException.
+     * @param message exception text
+     */
     public JXPathTypeConversionException(String message) {
         super(message);
     }
 
+    /**
+     * Create a new JXPathTypeConversionException.
+     * @param message exception text
+     * @param ex underlying cause
+     */
     public JXPathTypeConversionException(String message, Exception ex) {
         super(message, ex);
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/KeyManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/KeyManager.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/KeyManager.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/KeyManager.java Sun Feb  3 18:04:13 2008
@@ -27,6 +27,10 @@
 
     /**
      * Find a node by key/value.
+     * @param context to search
+     * @param keyName String
+     * @param keyValue String
+     * @return Pointer
      */
     Pointer getPointerByKey(
         JXPathContext context,

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/MapDynamicPropertyHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/MapDynamicPropertyHandler.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/MapDynamicPropertyHandler.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/MapDynamicPropertyHandler.java Sun Feb  3 18:04:13 2008
@@ -29,12 +29,12 @@
 public class MapDynamicPropertyHandler implements DynamicPropertyHandler {
 
     /**
-     * Returns string representations of all keys in the map.
+     * {@inheritDoc}
      */
     public String[] getPropertyNames(Object object) {
         Map map = (Map) object;
         Set set = map.keySet();
-        String names[] = new String[set.size()];
+        String[] names = new String[set.size()];
         Iterator it = set.iterator();
         for (int i = 0; i < names.length; i++) {
             names[i] = String.valueOf(it.next());
@@ -43,14 +43,14 @@
     }
 
     /**
-     * Returns the value for the specified key.
+     * {@inheritDoc}
      */
     public Object getProperty(Object object, String propertyName) {
         return ((Map) object).get(propertyName);
     }
 
     /**
-     * Sets the specified key value.
+     * {@inheritDoc}
      */
     public void setProperty(Object object, String propertyName, Object value) {
         ((Map) object).put(propertyName, value);

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/NodeSet.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/NodeSet.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/NodeSet.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/NodeSet.java Sun Feb  3 18:04:13 2008
@@ -31,16 +31,19 @@
 
     /**
      * Returns a list of nodes.
+     * @return List
      */
     List getNodes();
 
     /**
      * Returns a list of pointers for all nodes in the set.
+     * @return List
      */
     List getPointers();
 
     /**
      * Returns a list of values of all contained pointers.
+     * @return List
      */
     List getValues();
 

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Pointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Pointer.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Pointer.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Pointer.java Sun Feb  3 18:04:13 2008
@@ -69,7 +69,7 @@
 
     /**
      * Returns the node this pointer is based on.
-     * @return
+     * @return Object
      */
     Object getRootNode();
 
@@ -84,11 +84,13 @@
      * If an object in the pointer's path is a Dynamic Property object (like a
      * Map), the asPath method generates an XPath that looks like this: <code>"
      * /departments[@name = 'HR']/employees[3]"</code>.
+     * @return String path
      */
     String asPath();
 
     /**
-     * Pointers are cloneable
+     * Pointers are cloneable.
+     * @return cloned Object
      */
     Object clone();
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/ConstructorFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/ConstructorFunction.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/ConstructorFunction.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/ConstructorFunction.java Sun Feb  3 18:04:13 2008
@@ -31,16 +31,23 @@
  * @version $Revision$ $Date$
  */
 public class ConstructorFunction implements Function {
+    private static final Object[] EMPTY_ARRAY = new Object[0];
 
     private Constructor constructor;
-    private static final Object EMPTY_ARRAY[] = new Object[0];
 
+    /**
+     * Create a new ConstructorFunction.
+     * @param constructor the constructor to call.
+     */
     public ConstructorFunction(Constructor constructor) {
         this.constructor = constructor;
     }
 
     /**
      * Converts parameters to suitable types and invokes the constructor.
+     * @param context evaluation context
+     * @param parameters constructor args
+     * @return new instance
      */
     public Object invoke(ExpressionContext context, Object[] parameters) {
         try {
@@ -49,7 +56,7 @@
                 parameters = EMPTY_ARRAY;
             }
             int pi = 0;
-            Class types[] = constructor.getParameterTypes();
+            Class[] types = constructor.getParameterTypes();
             if (types.length > 0
                 && ExpressionContext.class.isAssignableFrom(types[0])) {
                 pi = 1;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/InfoSetUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/InfoSetUtil.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/InfoSetUtil.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/InfoSetUtil.java Sun Feb  3 18:04:13 2008
@@ -32,9 +32,10 @@
     private static final Double ONE = new Double(1);
     private static final Double NOT_A_NUMBER = new Double(Double.NaN);
 
-
     /**
-     * Converts the supplied object to String
+     * Converts the supplied object to String.
+     * @param object to convert
+     * @return String value
      */
     public static String stringValue(Object object) {
         if (object instanceof String) {
@@ -63,7 +64,9 @@
     }
 
     /**
-     * Converts the supplied object to Number
+     * Converts the supplied object to Number.
+     * @param object to convert
+     * @return Number result
      */
     public static Number number(Object object) {
         if (object instanceof Number) {
@@ -92,7 +95,9 @@
     }
 
     /**
-     * Converts the supplied object to double
+     * Converts the supplied object to double.
+     * @param object to convert
+     * @return double
      */
     public static double doubleValue(Object object) {
         if (object instanceof Number) {
@@ -124,12 +129,15 @@
     }
 
     /**
-     * Converts the supplied object to boolean
+     * Converts the supplied object to boolean.
+     * @param object to convert
+     * @return boolean
      */
     public static boolean booleanValue(Object object) {
         if (object instanceof Number) {
             double value = ((Number) object).doubleValue();
-            return value != 0 && value != -0 && !Double.isNaN(value);
+            final int negZero = -0;
+            return value != 0 && value != negZero && !Double.isNaN(value);
         }
         if (object instanceof Boolean) {
             return ((Boolean) object).booleanValue();

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathCompiledExpression.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathCompiledExpression.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathCompiledExpression.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathCompiledExpression.java Sun Feb  3 18:04:13 2008
@@ -24,7 +24,7 @@
 import org.apache.commons.jxpath.Pointer;
 
 /**
- *
+ * RI of CompiledExpression.
  *
  * @author Dmitri Plotnikov
  * @version $Revision$ $Date$
@@ -34,25 +34,41 @@
     private String xpath;
     private Expression expression;
 
+    /**
+     * Create a new JXPathCompiledExpression.
+     * @param xpath source
+     * @param expression compiled
+     */
     public JXPathCompiledExpression(String xpath, Expression expression) {
         this.xpath = xpath;
         this.expression = expression;
     }
 
+    /**
+     * Get the source expression.
+     * @return String
+     */
     protected String getXPath() {
         return xpath;
     }
 
+    /**
+     * Get the compiled expression.
+     * @return Expression
+     */
     protected Expression getExpression() {
         return expression;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         return xpath;
     }
 
     /**
-     * @see CompiledExpression#getValue(JXPathContext)
+     * {@inheritDoc}
      */
     public Object getValue(JXPathContext context) {
         return ((JXPathContextReferenceImpl) context).
@@ -60,7 +76,7 @@
     }
 
     /**
-     * @see CompiledExpression#getValue(JXPathContext, Class)
+     * {@inheritDoc}
      */
     public Object getValue(JXPathContext context, Class requiredType) {
         return ((JXPathContextReferenceImpl) context).
@@ -68,7 +84,7 @@
     }
 
     /**
-     * @see CompiledExpression#setValue(JXPathContext, Object)
+     * {@inheritDoc}
      */
     public void setValue(JXPathContext context, Object value) {
         ((JXPathContextReferenceImpl) context).
@@ -76,7 +92,7 @@
     }
 
     /**
-     * @see CompiledExpression#createPath(JXPathContext)
+     * {@inheritDoc}
      */
     public Pointer createPath(JXPathContext context) {
         return ((JXPathContextReferenceImpl) context).
@@ -84,7 +100,7 @@
     }
 
     /**
-     * @see CompiledExpression#createPathAndSetValue(JXPathContext, Object)
+     * {@inheritDoc}
      */
     public Pointer createPathAndSetValue(JXPathContext context, Object value) {
         return ((JXPathContextReferenceImpl) context).
@@ -92,7 +108,7 @@
     }
 
     /**
-     * @see CompiledExpression#iterate(JXPathContext)
+     * {@inheritDoc}
      */
     public Iterator iterate(JXPathContext context) {
         return ((JXPathContextReferenceImpl) context).
@@ -100,7 +116,7 @@
     }
 
     /**
-     * @see CompiledExpression#getPointer(JXPathContext, String)
+     * {@inheritDoc}
      */
     public Pointer getPointer(JXPathContext context, String xpath) {
         return ((JXPathContextReferenceImpl) context).
@@ -108,7 +124,7 @@
     }
 
     /**
-     * @see CompiledExpression#iteratePointers(JXPathContext)
+     * {@inheritDoc}
      */
     public Iterator iteratePointers(JXPathContext context) {
         return ((JXPathContextReferenceImpl) context).
@@ -116,14 +132,14 @@
     }
 
     /**
-     * @see CompiledExpression#removePath(JXPathContext)
+     * {@inheritDoc}
      */
     public void removePath(JXPathContext context) {
         ((JXPathContextReferenceImpl) context).removePath(xpath, expression);
     }
 
     /**
-     * @see CompiledExpression#removeAll(JXPathContext)
+     * {@inheritDoc}
      */
     public void removeAll(JXPathContext context) {
         ((JXPathContextReferenceImpl) context).removeAll(xpath, expression);

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java Sun Feb  3 18:04:13 2008
@@ -71,8 +71,11 @@
     private static Map compiled = new HashMap();
     private static int cleanupCount = 0;
 
+    private static NodePointerFactory[] nodeFactoryArray = null;
+    // The frequency of the cache cleanup
+    private static final int CLEANUP_THRESHOLD = 500;
     private static final Vector nodeFactories = new Vector();
-    private static NodePointerFactory nodeFactoryArray[] = null;
+
     static {
         nodeFactories.add(new CollectionPointerFactory());
         nodeFactories.add(new BeanPointerFactory());
@@ -109,25 +112,69 @@
         createNodeFactoryArray();
     }
 
-    private Pointer rootPointer;
-    private Pointer contextPointer;
+    /**
+     * Create the default node factory array.
+     */
+    private static void createNodeFactoryArray() {
+        if (nodeFactoryArray == null) {
+            nodeFactoryArray =
+                (NodePointerFactory[]) nodeFactories.
+                    toArray(new NodePointerFactory[nodeFactories.size()]);
+            Arrays.sort(nodeFactoryArray, new Comparator() {
+                public int compare(Object a, Object b) {
+                    int orderA = ((NodePointerFactory) a).getOrder();
+                    int orderB = ((NodePointerFactory) b).getOrder();
+                    return orderA - orderB;
+                }
+            });
+        }
+    }
+
+    /**
+     * Call this with a custom NodePointerFactory to add support for
+     * additional types of objects.  Make sure the factory returns
+     * a name that puts it in the right position on the list of factories.
+     * @param factory NodePointerFactory to add
+     */
+    public static void addNodePointerFactory(NodePointerFactory factory) {
+        synchronized (nodeFactories) {
+            nodeFactories.add(factory);
+            nodeFactoryArray = null;
+        }
+    }
+
+    /**
+     * Get the registered NodePointerFactories.
+     * @return NodePointerFactory[]
+     */
+    public static NodePointerFactory[] getNodePointerFactories() {
+        return nodeFactoryArray;
+    }
 
+    /** Namespace resolver */
     protected NamespaceResolver namespaceResolver;
 
-    // The frequency of the cache cleanup
-    private static final int CLEANUP_THRESHOLD = 500;
+    private Pointer rootPointer;
+    private Pointer contextPointer;
 
+    /**
+     * Create a new JXPathContextReferenceImpl.
+     * @param parentContext parent context
+     * @param contextBean Object
+     */
     protected JXPathContextReferenceImpl(JXPathContext parentContext,
-                                         Object contextBean)
-    {
+            Object contextBean) {
         this(parentContext, contextBean, null);
     }
 
-    public JXPathContextReferenceImpl(
-        JXPathContext parentContext,
-        Object contextBean,
-        Pointer contextPointer)
-    {
+    /**
+     * Create a new JXPathContextReferenceImpl.
+     * @param parentContext parent context
+     * @param contextBean Object
+     * @param contextPointer context pointer
+     */
+    public JXPathContextReferenceImpl(JXPathContext parentContext,
+            Object contextBean, Pointer contextPointer) {
         super(parentContext, contextBean);
 
         synchronized (nodeFactories) {
@@ -160,50 +207,28 @@
                 .setNamespaceContextPointer((NodePointer) this.contextPointer);
     }
 
-    private static void createNodeFactoryArray() {
-        if (nodeFactoryArray == null) {
-            nodeFactoryArray =
-                (NodePointerFactory[]) nodeFactories.
-                    toArray(new NodePointerFactory[nodeFactories.size()]);
-            Arrays.sort(nodeFactoryArray, new Comparator() {
-                public int compare(Object a, Object b) {
-                    int orderA = ((NodePointerFactory) a).getOrder();
-                    int orderB = ((NodePointerFactory) b).getOrder();
-                    return orderA - orderB;
-                }
-            });
-        }
-    }
-
-    /**
-     * Call this with a custom NodePointerFactory to add support for
-     * additional types of objects.  Make sure the factory returns
-     * a name that puts it in the right position on the list of factories.
-     */
-    public static void addNodePointerFactory(NodePointerFactory factory) {
-        synchronized (nodeFactories) {
-            nodeFactories.add(factory);
-            nodeFactoryArray = null;
-        }
-    }
-
-    public static NodePointerFactory[] getNodePointerFactories() {
-        return nodeFactoryArray;
-    }
-
     /**
      * Returns a static instance of TreeCompiler.
      *
-     * Override this to return an aternate compiler.
+     * Override this to return an alternate compiler.
+     * @return Compiler
      */
     protected Compiler getCompiler() {
         return COMPILER;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     protected CompiledExpression compilePath(String xpath) {
         return new JXPathCompiledExpression(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Compile the given expression.
+     * @param xpath to compile
+     * @return Expression
+     */
     private Expression compileExpression(String xpath) {
         Expression expr;
 
@@ -251,6 +276,8 @@
     /**
      * Traverses the xpath and returns the resulting object. Primitive
      * types are wrapped into objects.
+     * @param xpath expression
+     * @return Object found
      */
     public Object getValue(String xpath) {
         Expression expression = compileExpression(xpath);
@@ -319,6 +346,12 @@
 //        return null;
 //    }
 
+    /**
+     * Get the value indicated.
+     * @param xpath String
+     * @param expr Expression
+     * @return Object
+     */
     public Object getValue(String xpath, Expression expr) {
         Object result = expr.computeValue(getEvalContext());
         if (result == null) {
@@ -364,12 +397,22 @@
     /**
      * Calls getValue(xpath), converts the result to the required type
      * and returns the result of the conversion.
+     * @param xpath expression
+     * @param requiredType Class
+     * @return Object
      */
     public Object getValue(String xpath, Class requiredType) {
         Expression expr = compileExpression(xpath);
         return getValue(xpath, expr, requiredType);
     }
 
+    /**
+     * Get the value indicated.
+     * @param xpath expression
+     * @param expr compiled Expression
+     * @param requiredType Class
+     * @return Object
+     */
     public Object getValue(String xpath, Expression expr, Class requiredType) {
         Object value = getValue(xpath, expr);
         if (value != null && requiredType != null) {
@@ -391,19 +434,38 @@
      * Traverses the xpath and returns a Iterator of all results found
      * for the path. If the xpath matches no properties
      * in the graph, the Iterator will not be null.
+     * @param xpath expression
+     * @return Iterator
      */
     public Iterator iterate(String xpath) {
         return iterate(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Traverses the xpath and returns a Iterator of all results found
+     * for the path. If the xpath matches no properties
+     * in the graph, the Iterator will not be null.
+     * @param xpath expression
+     * @param expr compiled Expression
+     * @return Iterator
+     */
     public Iterator iterate(String xpath, Expression expr) {
         return expr.iterate(getEvalContext());
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer getPointer(String xpath) {
         return getPointer(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Get a pointer to the specified path/expression.
+     * @param xpath String
+     * @param expr compiled Expression
+     * @return Pointer
+     */
     public Pointer getPointer(String xpath, Expression expr) {
         Object result = expr.computeValue(getEvalContext());
         if (result instanceof EvalContext) {
@@ -419,10 +481,19 @@
         return NodePointer.newNodePointer(null, result, getLocale());
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void setValue(String xpath, Object value) {
         setValue(xpath, compileExpression(xpath), value);
     }
 
+    /**
+     * Set the value of xpath to value.
+     * @param xpath path
+     * @param expr compiled Expression
+     * @param value Object
+     */
     public void setValue(String xpath, Expression expr, Object value) {
         try {
             setValue(xpath, expr, value, false);
@@ -433,10 +504,19 @@
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer createPath(String xpath) {
         return createPath(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Create the given path.
+     * @param xpath String
+     * @param expr compiled Expression
+     * @return resulting Pointer
+     */
     public Pointer createPath(String xpath, Expression expr) {
         try {
             Object result = expr.computeValue(getEvalContext());
@@ -463,15 +543,22 @@
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer createPathAndSetValue(String xpath, Object value) {
         return createPathAndSetValue(xpath, compileExpression(xpath), value);
     }
 
-    public Pointer createPathAndSetValue(
-        String xpath,
-        Expression expr,
-        Object value)
-    {
+    /**
+     * Create the given path setting its value to value.
+     * @param xpath String
+     * @param expr compiled Expression
+     * @param value Object
+     * @return resulting Pointer
+     */
+    public Pointer createPathAndSetValue(String xpath, Expression expr,
+            Object value) {
         try {
             return setValue(xpath, expr, value, true);
         }
@@ -482,12 +569,16 @@
         }
     }
 
-    private Pointer setValue(
-        String xpath,
-        Expression expr,
-        Object value,
-        boolean create)
-    {
+    /**
+     * Set the specified value.
+     * @param xpath path
+     * @param expr compiled Expression
+     * @param value destination value
+     * @param create whether to create missing node(s)
+     * @return Pointer created
+     */
+    private Pointer setValue(String xpath, Expression expr, Object value,
+            boolean create) {
         Object result = expr.computeValue(getEvalContext());
         Pointer pointer = null;
 
@@ -518,6 +609,7 @@
     /**
      * Checks if the path follows the JXPath restrictions on the type
      * of path that can be passed to create... methods.
+     * @param expr Expression to check
      */
     private void checkSimplePath(Expression expr) {
         if (!(expr instanceof LocationPath)
@@ -534,19 +626,38 @@
      * A Pointer provides easy access to a property.
      * If the xpath matches no properties
      * in the graph, the Iterator be empty, but not null.
+     * @param xpath expression
+     * @return Iterator
      */
     public Iterator iteratePointers(String xpath) {
         return iteratePointers(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Traverses the xpath and returns an Iterator of Pointers.
+     * A Pointer provides easy access to a property.
+     * If the xpath matches no properties
+     * in the graph, the Iterator be empty, but not null.
+     * @param xpath expression
+     * @param expr compiled Expression
+     * @return Iterator
+     */
     public Iterator iteratePointers(String xpath, Expression expr) {
         return expr.iteratePointers(getEvalContext());
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void removePath(String xpath) {
         removePath(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Remove the specified path.
+     * @param xpath expression
+     * @param expr compiled Expression
+     */
     public void removePath(String xpath, Expression expr) {
         try {
             NodePointer pointer = (NodePointer) getPointer(xpath, expr);
@@ -561,10 +672,18 @@
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void removeAll(String xpath) {
         removeAll(xpath, compileExpression(xpath));
     }
 
+    /**
+     * Remove all matching nodes.
+     * @param xpath expression
+     * @param expr compiled Expression
+     */
     public void removeAll(String xpath, Expression expr) {
         try {
             ArrayList list = new ArrayList();
@@ -589,6 +708,9 @@
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public JXPathContext getRelativeContext(Pointer pointer) {
         Object contextBean = pointer.getNode();
         if (contextBean == null) {
@@ -599,29 +721,55 @@
         return new JXPathContextReferenceImpl(this, contextBean, pointer);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer getContextPointer() {
         return contextPointer;
     }
 
+    /**
+     * Get absolute root pointer.
+     * @return NodePointer
+     */
     private NodePointer getAbsoluteRootPointer() {
         return (NodePointer) rootPointer;
     }
 
+    /**
+     * Get the evaluation context.
+     * @return EvalContext
+     */
     private EvalContext getEvalContext() {
         return new InitialContext(new RootContext(this,
                 (NodePointer) getContextPointer()));
     }
 
+    /**
+     * Get the absolute root context.
+     * @return EvalContext
+     */
     public EvalContext getAbsoluteRootContext() {
         return new InitialContext(new RootContext(this,
                 getAbsoluteRootPointer()));
     }
 
+    /**
+     * Get a VariablePointer for the given variable name.
+     * @param name variable name
+     * @return NodePointer
+     */
     public NodePointer getVariablePointer(QName name) {
         return NodePointer.newNodePointer(name, VariablePointerFactory
                 .contextWrapper(this), getLocale());
     }
 
+    /**
+     * Get the named Function.
+     * @param functionName name
+     * @param parameters function args
+     * @return Function
+     */
     public Function getFunction(QName functionName, Object[] parameters) {
         String namespace = functionName.getPrefix();
         String name = functionName.getName();
@@ -642,6 +790,9 @@
             "Undefined function: " + functionName.toString());
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void registerNamespace(String prefix, String namespaceURI) {
         if (namespaceResolver.isSealed()) {
             namespaceResolver = (NamespaceResolver) namespaceResolver.clone();
@@ -649,6 +800,9 @@
         namespaceResolver.registerNamespace(prefix, namespaceURI);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getNamespaceURI(String prefix) {
         return namespaceResolver.getNamespaceURI(prefix);
     }
@@ -661,6 +815,9 @@
         return namespaceResolver.getPrefix(namespaceURI);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void setNamespaceContextPointer(Pointer pointer) {
         if (namespaceResolver.isSealed()) {
             namespaceResolver = (NamespaceResolver) namespaceResolver.clone();
@@ -668,10 +825,17 @@
         namespaceResolver.setNamespaceContextPointer((NodePointer) pointer);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer getNamespaceContextPointer() {
         return namespaceResolver.getNamespaceContextPointer();
     }
 
+    /**
+     * Get the namespace resolver.
+     * @return NamespaceResolver
+     */
     public NamespaceResolver getNamespaceResolver() {
         namespaceResolver.seal();
         return namespaceResolver;
@@ -680,11 +844,12 @@
     /**
      * Checks if existenceCheckClass exists on the class path. If so, allocates
      * an instance of the specified class, otherwise returns null.
+     * @param className to instantiate
+     * @param existenceCheckClassName guard class
+     * @return className instance
      */
-    public static Object allocateConditionally(
-            String className,
-            String existenceCheckClassName)
-    {
+    public static Object allocateConditionally(String className,
+            String existenceCheckClassName) {
         try {
             try {
                 Class.forName(existenceCheckClassName);

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/QName.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/QName.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/QName.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/QName.java Sun Feb  3 18:04:13 2008
@@ -29,6 +29,10 @@
     private String name;
     private String qualifiedName;
 
+    /**
+     * Create a new QName.
+     * @param qualifiedName value
+     */
     public QName(String qualifiedName) {
         this.qualifiedName = qualifiedName;
         int index = qualifiedName.indexOf(':');
@@ -36,28 +40,50 @@
         name = index < 0 ? qualifiedName : qualifiedName.substring(index + 1);
     }
 
+    /**
+     * Create a new QName.
+     * @param prefix ns
+     * @param localName String
+     */
     public QName(String prefix, String localName) {
         this.prefix = prefix;
         this.name = localName;
         this.qualifiedName = prefix == null ? localName : prefix + ':' + localName;
     }
 
+    /**
+     * Get the prefix of this QName.
+     * @return String
+     */
     public String getPrefix() {
         return prefix;
     }
 
+    /**
+     * Get the local name.
+     * @return String
+     */
     public String getName() {
         return name;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         return qualifiedName;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public int hashCode() {
         return name.hashCode();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean equals(Object object) {
         if (this == object) {
             return true;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/ChildContext.java Sun Feb  3 18:04:13 2008
@@ -42,12 +42,8 @@
      * @param startFromParentLocation whether to start from parent location
      * @param reverse whether to iterate in reverse
      */
-    public ChildContext(
-        EvalContext parentContext,
-        NodeTest nodeTest,
-        boolean startFromParentLocation,
-        boolean reverse)
-    {
+    public ChildContext(EvalContext parentContext, NodeTest nodeTest,
+            boolean startFromParentLocation, boolean reverse) {
         super(parentContext);
         this.nodeTest = nodeTest;
         this.startFromParentLocation = startFromParentLocation;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PredicateContext.java Sun Feb  3 18:04:13 2008
@@ -38,6 +38,11 @@
     private Expression nameTestExpression;
     private PropertyPointer dynamicPropertyPointer;
 
+    /**
+     * Create a new PredicateContext.
+     * @param parentContext parent context
+     * @param expression compiled Expression
+     */
     public PredicateContext(EvalContext parentContext, Expression expression) {
         super(parentContext);
         this.expression = expression;
@@ -47,6 +52,9 @@
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextNode() {
         if (done) {
             return false;
@@ -65,7 +73,7 @@
                 // if the property is currently declared. Thus,
                 // we'll need to perform a search.
                 boolean ok = false;
-                String names[] = dynamicPropertyPointer.getPropertyNames();
+                String[] names = dynamicPropertyPointer.getPropertyNames();
                 for (int i = 0; i < names.length; i++) {
                     if (names[i].equals(propertyName)) {
                         ok = true;
@@ -109,6 +117,7 @@
     /**
      * Used for an optimized access to dynamic properties using the
      * "map[@name = 'name']" syntax
+     * @return whether valid
      */
     private boolean setupDynamicPropertyPointer() {
         if (nameTestExpression == null) {
@@ -130,6 +139,9 @@
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean setPosition(int position) {
         if (nameTestExpression == null) {
             return setPositionStandard(position);
@@ -149,6 +161,9 @@
         }
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodePointer getCurrentNodePointer() {
         if (position == 0) {
             if (!setPosition(1)) {
@@ -161,17 +176,28 @@
         return parentContext.getCurrentNodePointer();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void reset() {
         super.reset();
         parentContext.reset();
         done = false;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextSet() {
         reset();
         return parentContext.nextSet();
     }
 
+    /**
+     * Basic setPosition
+     * @param position to set
+     * @return whether valid
+     */
     private boolean setPositionStandard(int position) {
         if (this.position > position) {
             reset();

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SelfContext.java Sun Feb  3 18:04:13 2008
@@ -22,7 +22,7 @@
 import org.apache.commons.jxpath.ri.model.NodePointer;
 
 /**
- * EvalContext  that returns the current node from the parent context if the
+ * EvalContext that returns the current node from the parent context if the
  * test succeeds.
  *
  * @author Dmitri Plotnikov
@@ -33,15 +33,26 @@
     private boolean startedSet = false;
     private NodePointer nodePointer;
 
+    /**
+     * Create a new SelfContext.
+     * @param parentContext EvalContext
+     * @param nodeTest guard
+     */
     public SelfContext(EvalContext parentContext, NodeTest nodeTest) {
         super(parentContext);
         this.nodeTest = nodeTest;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer getSingleNodePointer() {
         return parentContext.getSingleNodePointer();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodePointer getCurrentNodePointer() {
         if (position == 0) {
             if (!setPosition(1)) {
@@ -51,15 +62,24 @@
         return nodePointer;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextNode() {
         return setPosition(getCurrentPosition() + 1);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void reset() {
         super.reset();
         startedSet = false;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean setPosition(int position) {
         if (position != 1) {
             return false;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/SimplePathInterpreter.java Sun Feb  3 18:04:13 2008
@@ -715,7 +715,8 @@
         }
 
         if (value instanceof Number) {
-            return (int) (InfoSetUtil.doubleValue(value) + 0.5) - 1;
+            final double round = 0.5;
+            return (int) (InfoSetUtil.doubleValue(value) + round) - 1;
         }
         return InfoSetUtil.booleanValue(value) ? 0 : -1;
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java Sun Feb  3 18:04:13 2008
@@ -602,10 +602,10 @@
      * @return String
      */
     protected Object functionSubstring(EvalContext context) {
+        final int minArgs = 2;
+        final int maxArgs = 3;
+        assertArgRange(minArgs, maxArgs);
         int ac = getArgumentCount();
-        if (ac != 2 && ac != 3) {
-            assertArgCount(2);
-        }
 
         String s1 = InfoSetUtil.stringValue(getArg1().computeValue(context));
         double from = InfoSetUtil.doubleValue(getArg2().computeValue(context));
@@ -704,7 +704,8 @@
      * @return String
      */
     protected Object functionTranslate(EvalContext context) {
-        assertArgCount(3);
+        final int argCount = 3;
+        assertArgCount(argCount);
         String s1 = InfoSetUtil.stringValue(getArg1().computeValue(context));
         String s2 = InfoSetUtil.stringValue(getArg2().computeValue(context));
         String s3 = InfoSetUtil.stringValue(getArg3().computeValue(context));
@@ -864,10 +865,9 @@
      * @return String
      */
     private Object functionFormatNumber(EvalContext context) {
-        int ac = getArgumentCount();
-        if (ac != 2 && ac != 3) {
-            assertArgCount(2);
-        }
+        final int minArgs = 2;
+        final int maxArgs = 3;
+        assertArgRange(minArgs, maxArgs);
 
         double number =
             InfoSetUtil.doubleValue(getArg1().computeValue(context));
@@ -875,7 +875,7 @@
             InfoSetUtil.stringValue(getArg2().computeValue(context));
 
         DecimalFormatSymbols symbols = null;
-        if (ac == 3) {
+        if (getArgumentCount() == maxArgs) {
             String symbolsName =
                 InfoSetUtil.stringValue(getArg3().computeValue(context));
             symbols =

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationGreaterThan.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationGreaterThan.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationGreaterThan.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationGreaterThan.java Sun Feb  3 18:04:13 2008
@@ -24,14 +24,25 @@
  */
 public class CoreOperationGreaterThan extends CoreOperationRelationalExpression {
 
+    /**
+     * Create a new CoreOperationGreaterThan.
+     * @param arg1 left operand
+     * @param arg2 right operand
+     */
     public CoreOperationGreaterThan(Expression arg1, Expression arg2) {
         super(new Expression[] { arg1, arg2 });
     }
 
+    /**
+     * {@inheritDoc}
+     */
     protected boolean evaluateCompare(int compare) {
         return compare > 0;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String getSymbol() {
         return ">";
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationRelationalExpression.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationRelationalExpression.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationRelationalExpression.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationRelationalExpression.java Sun Feb  3 18:04:13 2008
@@ -66,7 +66,7 @@
 
     /**
      * Template method for subclasses to evaluate the result of a comparison.
-     * @param compare result of comparison to evaluate 
+     * @param compare result of comparison to evaluate
      * @return ultimate operation success/failure
      */
     protected abstract boolean evaluateCompare(int compare);

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/ExpressionPath.java Sun Feb  3 18:04:13 2008
@@ -35,21 +35,28 @@
 public class ExpressionPath extends Path {
 
     private Expression expression;
-    private Expression predicates[];
+    private Expression[] predicates;
 
     private boolean basicKnown = false;
     private boolean basic;
 
-    public ExpressionPath(
-        Expression expression,
-        Expression[] predicates,
-        Step[] steps)
-    {
+    /**
+     * Create a new ExpressionPath.
+     * @param expression Expression
+     * @param predicates to execute
+     * @param steps navigation
+     */
+    public ExpressionPath(Expression expression, Expression[] predicates,
+            Step[] steps) {
         super(steps);
         this.expression = expression;
         this.predicates = predicates;
     }
 
+    /**
+     * Get the expression.
+     * @return Expression
+     */
     public Expression getExpression() {
         return expression;
     }
@@ -57,6 +64,7 @@
     /**
      * Predicates are the expressions in brackets that may follow
      * the root expression of the path.
+     * @return Expression[]
      */
     public Expression[] getPredicates() {
         return predicates;
@@ -65,6 +73,7 @@
     /**
      * Returns true if the root expression or any of the
      * predicates or the path steps are context dependent.
+     * @return boolean
      */
     public boolean computeContextDependent() {
         if (expression.isContextDependent()) {
@@ -83,6 +92,7 @@
     /**
      * Recognized paths formatted as <code>$x[3]/foo[2]</code>.  The
      * evaluation of such "simple" paths is optimized and streamlined.
+     * @return boolean
      */
     public synchronized boolean isSimpleExpressionPath() {
         if (!basicKnown) {
@@ -92,6 +102,9 @@
         return basic;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         StringBuffer buffer = new StringBuffer();
         if (expression instanceof CoreOperation
@@ -112,7 +125,7 @@
             }
         }
 
-        Step steps[] = getSteps();
+        Step[] steps = getSteps();
         if (steps != null) {
             for (int i = 0; i < steps.length; i++) {
                 buffer.append("/");
@@ -122,21 +135,27 @@
         return buffer.toString();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Object compute(EvalContext context) {
         return expressionPath(context, false);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Object computeValue(EvalContext context) {
         return expressionPath(context, true);
     }
 
     /**
      * Walks an expression path (a path that starts with an expression)
+     * @param evalContext base context
+     * @param firstMatch whether to return the first match found
+     * @return Object found
      */
-    protected Object expressionPath(
-        EvalContext evalContext,
-        boolean firstMatch)
-    {
+    protected Object expressionPath(EvalContext evalContext, boolean firstMatch) {
         Object value = expression.compute(evalContext);
         EvalContext context;
         if (value instanceof InitialContext) {

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/LocationPath.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/LocationPath.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/LocationPath.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/LocationPath.java Sun Feb  3 18:04:13 2008
@@ -27,22 +27,37 @@
 
     private boolean absolute;
 
+    /**
+     * Create a new LocationPath.
+     * @param absolute whether this is an absolute path
+     * @param steps to evaluate
+     */
     public LocationPath(boolean absolute, Step[] steps) {
         super(steps);
         this.absolute = absolute;
     }
 
+    /**
+     * Learn whether this LocationPath is absolute.
+     * @return boolean
+     */
     public boolean isAbsolute() {
         return absolute;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean computeContextDependent() {
         return !absolute || super.computeContextDependent();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         StringBuffer buffer = new StringBuffer();
-        Step steps[] = getSteps();
+        Step[] steps = getSteps();
         if (steps != null) {
             for (int i = 0; i < steps.length; i++) {
                 if (i > 0 || absolute) {
@@ -54,6 +69,9 @@
         return buffer.toString();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Object compute(EvalContext context) {
         // Create a chain of contexts
         EvalContext rootContext;
@@ -66,7 +84,9 @@
         return evalSteps(rootContext);
     }
 
-
+    /**
+     * {@inheritDoc}
+     */
     public Object computeValue(EvalContext context) {
         // Create a chain of contexts
         EvalContext rootContext;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/NodeTypeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/NodeTypeTest.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/NodeTypeTest.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/NodeTypeTest.java Sun Feb  3 18:04:13 2008
@@ -63,7 +63,8 @@
                 return "comment";
             case Compiler.NODE_TYPE_PI :
                 return "processing-instruction";
+            default:
+                return "UNKNOWN";
         }
-        return "UNKNOWN";
     }
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java Sun Feb  3 18:04:13 2008
@@ -839,7 +839,8 @@
                 if (sb.charAt(pos) == c[i]) {
                     sb.replace(pos, pos + 1, esc[i]);
                     pos += esc[i].length();
-                } else {
+                }
+                else {
                     pos++;
                 }
             }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointer.java Sun Feb  3 18:04:13 2008
@@ -37,12 +37,15 @@
     private Object bean;
     private JXPathBeanInfo beanInfo;
 
-    public BeanPointer(
-            QName name,
-            Object bean,
-            JXPathBeanInfo beanInfo,
-            Locale locale)
-    {
+    /**
+     * Create a new BeanPointer.
+     * @param name is the name given to the first node
+     * @param bean pointed
+     * @param beanInfo JXPathBeanInfo
+     * @param locale Locale
+     */
+    public BeanPointer(QName name, Object bean, JXPathBeanInfo beanInfo,
+            Locale locale) {
         super(null, locale);
         this.name = name;
         this.bean = bean;
@@ -50,59 +53,76 @@
     }
 
     /**
+     * Create a new BeanPointer.
+     * @param parent pointer
      * @param name is the name given to the first node
+     * @param bean pointed
+     * @param beanInfo JXPathBeanInfo
      */
-    public BeanPointer(
-            NodePointer parent,
-            QName name,
-            Object bean,
-            JXPathBeanInfo beanInfo)
-    {
+    public BeanPointer(NodePointer parent, QName name, Object bean,
+            JXPathBeanInfo beanInfo) {
         super(parent);
         this.name = name;
         this.bean = bean;
         this.beanInfo = beanInfo;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public PropertyPointer getPropertyPointer() {
         return new BeanPropertyPointer(this, beanInfo);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public QName getName() {
         return name;
     }
 
     /**
-     * Returns the bean itself
+     * {@inheritDoc}
      */
     public Object getBaseValue() {
         return bean;
     }
 
     /**
-     * Returns false
+     * {@inheritDoc}
+     * @return false
      */
     public boolean isCollection() {
         return false;
     }
 
     /**
-     * Returns 1.
+     * {@inheritDoc}
+     * @return 1
      */
     public int getLength() {
         return 1;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean isLeaf() {
         Object value = getNode();
         return value == null
             || JXPathIntrospector.getBeanInfo(value.getClass()).isAtomic();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public int hashCode() {
         return name == null ? 0 : name.hashCode();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean equals(Object object) {
         if (object == this) {
             return true;
@@ -139,6 +159,7 @@
     }
 
     /**
+     * {@inheritDoc}
      * If the pointer has a parent, then parent's path.
      * If the bean is null, "null()".
      * If the bean is a primitive value, the value itself.

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointerFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointerFactory.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointerFactory.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanPointerFactory.java Sun Feb  3 18:04:13 2008
@@ -32,26 +32,29 @@
  */
 public class BeanPointerFactory implements NodePointerFactory {
 
+    /** factory order constant */
     public static final int BEAN_POINTER_FACTORY_ORDER = 900;
 
+    /**
+     * {@inheritDoc}
+     */
     public int getOrder() {
         return BEAN_POINTER_FACTORY_ORDER;
     }
 
-    public NodePointer createNodePointer(
-        QName name,
-        Object bean,
-        Locale locale)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public NodePointer createNodePointer(QName name, Object bean, Locale locale) {
         JXPathBeanInfo bi = JXPathIntrospector.getBeanInfo(bean.getClass());
         return new BeanPointer(name, bean, bi, locale);
     }
 
-    public NodePointer createNodePointer(
-        NodePointer parent,
-        QName name,
-        Object bean)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public NodePointer createNodePointer(NodePointer parent, QName name,
+            Object bean) {
         if (bean == null) {
             return new NullPointer(parent, name);
         }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyOwnerPointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyOwnerPointer.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyOwnerPointer.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyOwnerPointer.java Sun Feb  3 18:04:13 2008
@@ -36,12 +36,15 @@
  * @version $Revision$ $Date$
  */
 public abstract class PropertyOwnerPointer extends NodePointer {
+    private static final Object UNINITIALIZED = new Object();
+
+    private Object value = UNINITIALIZED;
 
-    public NodeIterator childIterator(
-        NodeTest test,
-        boolean reverse,
-        NodePointer startWith)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public NodeIterator childIterator(NodeTest test, boolean reverse,
+            NodePointer startWith) {
         if (test == null) {
             return createNodeIterator(null, reverse, startWith);
         }
@@ -58,26 +61,45 @@
                 ? createNodeIterator(null, reverse, startWith) : null;
     }
 
-    public NodeIterator createNodeIterator(
-                String property,
-                boolean reverse,
-                NodePointer startWith)
-    {
+    /**
+     * Create a NodeIterator.
+     * @param property property name
+     * @param reverse whether to iterate in reverse
+     * @param startWith first pointer to return
+     * @return NodeIterator
+     */
+    public NodeIterator createNodeIterator(String property, boolean reverse,
+            NodePointer startWith) {
         return new PropertyIterator(this, property, reverse, startWith);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodeIterator attributeIterator(QName name) {
         return new BeanAttributeIterator(this, name);
     }
 
+    /**
+     * Create a new PropertyOwnerPointer.
+     * @param parent parent pointer
+     * @param locale Locale
+     */
     protected PropertyOwnerPointer(NodePointer parent, Locale locale) {
         super(parent, locale);
     }
 
+    /**
+     * Create a new PropertyOwnerPointer.
+     * @param parent pointer
+     */
     protected PropertyOwnerPointer(NodePointer parent) {
         super(parent);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void setIndex(int index) {
         if (this.index != index) {
             super.setIndex(index);
@@ -85,9 +107,9 @@
         }
     }
 
-    private static final Object UNINITIALIZED = new Object();
-
-    private Object value = UNINITIALIZED;
+    /**
+     * {@inheritDoc}
+     */
     public Object getImmediateNode() {
         if (value == UNINITIALIZED) {
             value = index == WHOLE_COLLECTION ? ValueUtils.getValue(getBaseValue())
@@ -96,6 +118,9 @@
         return value;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public abstract QName getName();
 
     /**
@@ -111,6 +136,7 @@
     /**
      * Throws an exception if you try to change the root element, otherwise
      * forwards the call to the parent pointer.
+     * @param value to set
      */
     public void setValue(Object value) {
         this.value = value;
@@ -157,6 +183,7 @@
     public abstract PropertyPointer getPropertyPointer();
 
     /**
+     * Learn whether dynamic property declaration is supported.
      * @return true if the property owner can set a property "does not exist".
      *         A good example is a Map. You can always assign a value to any
      *         key even if it has never been "declared".
@@ -165,10 +192,11 @@
         return false;
     }
 
-    public int compareChildNodePointers(
-        NodePointer pointer1,
-        NodePointer pointer2)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int compareChildNodePointers(NodePointer pointer1,
+            NodePointer pointer2) {
         int r = pointer1.getName().toString().compareTo(pointer2.getName().toString());
         return r == 0 ? pointer1.getIndex() - pointer2.getIndex() : r;
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java?rev=618149&r1=618148&r2=618149&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyPointer.java Sun Feb  3 18:04:13 2008
@@ -19,7 +19,6 @@
 import org.apache.commons.jxpath.AbstractFactory;
 import org.apache.commons.jxpath.JXPathAbstractFactoryException;
 import org.apache.commons.jxpath.JXPathContext;
-import org.apache.commons.jxpath.JXPathException;
 import org.apache.commons.jxpath.JXPathIntrospector;
 import org.apache.commons.jxpath.ri.QName;
 import org.apache.commons.jxpath.ri.model.NodePointer;



Mime
View raw message