commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r604783 [1/3] - in /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath: ./ functions/ ri/ ri/axes/ ri/compiler/ ri/model/ ri/model/beans/ ri/model/container/ ri/model/dom/ ri/model/dynamic/ ri/model/jdom/ ri/parser/ servlet/ uti...
Date Mon, 17 Dec 2007 07:29:46 GMT
Author: mbenson
Date: Sun Dec 16 23:29:28 2007
New Revision: 604783

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

Modified:
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/AbstractFactory.java
    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/ClassFunctions.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Container.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ExpressionContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Function.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/FunctionLibrary.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Functions.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathAbstractFactoryException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.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/JXPathInvalidAccessException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathTypeConversionException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/NodeSet.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Pointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/MethodFunction.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/EvalContext.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/JXPathContextFactoryReferenceImpl.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/NamespaceResolver.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/Parser.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.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/DescendantContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NodeSetContext.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.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/RootContext.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/axes/UnionContext.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/CoreOperation.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationAnd.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationCompare.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationDivide.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationMod.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationMultiply.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationNegate.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationOr.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationSubtract.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/CoreOperationUnion.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/Expression.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/ExtensionFunction.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/NodeNameTest.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/Path.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/Step.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/compiler/TreeCompiler.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/VariablePointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/VariablePointerFactory.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/BeanAttributeIterator.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/BeanPropertyPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/CollectionAttributeNodeIterator.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/CollectionChildNodeIterator.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/CollectionNodeIterator.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/CollectionPointerFactory.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/NullElementPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/NullPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/NullPropertyPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyIterator.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/container/ContainerPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/container/ContainerPointerFactory.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/DOMNamespaceIterator.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dom/DOMNodeIterator.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/dom/DOMPointerFactory.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/dynamic/DynamicAttributeIterator.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/dynamic/DynamicPropertyPointer.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNamespacePointer.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/ri/parser/ParseException.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.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/PageScopeContextHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletRequestAndContext.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/MethodLookupUtils.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/TypeConverter.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/TypeUtils.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/DOMParser.java
    commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/xml/DocumentContainer.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/src/java/org/apache/commons/jxpath/AbstractFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/AbstractFactory.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/AbstractFactory.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/AbstractFactory.java Sun Dec 16 23:29:28 2007
@@ -38,7 +38,7 @@
      * it should create the collection. Then it should create the index'th
      * element of the collection and return true.
      * <p>
-     * 
+     *
      * @param context can be used to evaluate other XPaths, get to variables
      * etc.
      * @param pointer describes the location of the node to be created
@@ -49,22 +49,22 @@
      * @param index is used if the pointer represents a collection element. You
      * may need to expand or even create the collection to accommodate the new
      * element.
-     * 
+     *
      * @return true if the object was successfully created
      */
-    public boolean createObject(JXPathContext context, Pointer pointer, 
-                                Object parent, String name, int index) 
+    public boolean createObject(JXPathContext context, Pointer pointer,
+                                Object parent, String name, int index)
     {
         return false;
     }
 
     /**
      * Declare the specified variable
-     * 
-     * @param context hosts variable pools. See 
+     *
+     * @param context hosts variable pools. See
      * {@link JXPathContext#getVariables() JXPathContext.getVariables()}
      * @param name is the name of the variable without the "$" sign
-     * 
+     *
      * @return true if the variable was successfully defined
      */
     public boolean declareVariable(JXPathContext context, String name) {

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -21,7 +21,7 @@
 import java.util.List;
 
 /**
- * A simple implementation of NodeSet that behaves as a collection of pointers. 
+ * A simple implementation of NodeSet that behaves as a collection of pointers.
  * @author Dmitri Plotnikov
  * @version $Revision$ $Date$
  */

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -81,7 +81,7 @@
     public void undeclareVariable(String varName) {
         vars.remove(varName);
     }
-    
+
     public String toString() {
         return vars.toString();
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ClassFunctions.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ClassFunctions.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ClassFunctions.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ClassFunctions.java Sun Dec 16 23:29:28 2007
@@ -28,7 +28,7 @@
 /**
  * Extension functions provided by a Java class.
  *
- * Let's say, we declared a ClassFunction like this:
+ * Let's say we declared a ClassFunction like this:
  * <blockquote><pre>
  *     new ClassFunctions(Integer.class, "int")
  * </pre></blockquote>
@@ -52,10 +52,16 @@
  * @version $Revision$ $Date$
  */
 public class ClassFunctions implements Functions {
+    private static final Object[] EMPTY_ARRAY = new Object[0];
+
     private Class functionClass;
     private String namespace;
-    private static final Object[] EMPTY_ARRAY = new Object[0];
 
+    /**
+     * Create a new ClassFunctions.
+     * @param functionClass Class providing the functions
+     * @param namespace assigned ns
+     */
     public ClassFunctions(Class functionClass, String namespace) {
         this.functionClass = functionClass;
         this.namespace = namespace;
@@ -77,6 +83,7 @@
      * @param namespace if it is not the namespace specified in the constructor,
      *     the method returns null
      * @param name is a function name or "new" for a constructor.
+     * @param parameters Object[] of parameters
      *
      * @return a MethodFunction, a ConstructorFunction or null if there is no
      *      such function.
@@ -84,13 +91,13 @@
     public Function getFunction(
         String namespace,
         String name,
-        Object[] parameters) 
-    {
+        Object[] parameters) {
         if (namespace == null) {
             if (this.namespace != null) {
                 return null;
             }
-        } else if (!namespace.equals(this.namespace)) {
+        }
+        else if (!namespace.equals(this.namespace)) {
             return null;
         }
 

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Container.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Container.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Container.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Container.java Sun Dec 16 23:29:28 2007
@@ -30,12 +30,14 @@
 
     /**
      * Returns the contained value.
+     * @return Object value
      */
     Object getValue();
 
     /**
      * Modifies the value contained by this container.  May throw
      * UnsupportedOperationException.
+     * @param value Object value to set.
      */
     void setValue(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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -43,7 +43,7 @@
  * This expression will find all nodes of the graph that are dates.
  */
 public interface ExpressionContext {
-    
+
     /**
      * Get the JXPathContext in which this function is being evaluated.
      *

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -19,13 +19,13 @@
 /**
  * Extension function interface. Extension functions are grouped into
  * {@link Functions Functions} objects, which are installed on
- * JXPathContexts using the 
+ * JXPathContexts using the
  * {@link JXPathContext#setFunctions JXPathContext.setFunctions()}
  * call.
  * <p>
  * The Function interface can be implemented directly. However,
  * most of the time JXPath's built-in implementations should suffice.
- * See {@link ClassFunctions ClassFunctions} and 
+ * See {@link ClassFunctions ClassFunctions} and
  * {@link PackageFunctions PackageFunctions}.
  *
  * @author Dmitri Plotnikov

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/FunctionLibrary.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/FunctionLibrary.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/FunctionLibrary.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/FunctionLibrary.java Sun Dec 16 23:29:28 2007
@@ -69,7 +69,7 @@
     public Function getFunction(
         String namespace,
         String name,
-        Object[] parameters) 
+        Object[] parameters)
     {
         if (byNamespace == null) {
             prepareCache();

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Functions.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Functions.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Functions.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/Functions.java Sun Dec 16 23:29:28 2007
@@ -21,7 +21,7 @@
 /**
  * A group of Function objects sharing a common namespace or a set of
  * common namespaces. Use the classes
- * {@link ClassFunctions ClassFunctions} and 
+ * {@link ClassFunctions ClassFunctions} and
  * {@link PackageFunctions PackageFunctions}
  * to register extension functions implemented as Java methods.
  *
@@ -33,12 +33,17 @@
     /**
      * Returns all namespaces in which this function collection defines
      * functions.
+     * @return Set
      */
     Set getUsedNamespaces();
 
     /**
      * Returns a Function, if any, for the specified namespace,
      * name and parameter types.
+     * @param namespace ns
+     * @param name function name
+     * @param parameters Object[]
+     * @return Function
      */
     Function getFunction(String namespace, String name, 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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -19,7 +19,7 @@
 /**
  * Thrown when an AbstractFactory cannot generate an object for the requested
  * path.
- * 
+ *
  * @author Dmitri Plotnikov
  * @version $Revision: 155422 $ $Date: 2005-02-26 08:07:46 -0500 (Sat, 26 Feb 2005) $
  */
@@ -30,5 +30,5 @@
 
     public JXPathAbstractFactoryException(String message) {
         super(message);
-    }    
+    }
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContext.java Sun Dec 16 23:29:28 2007
@@ -148,7 +148,7 @@
  * elements:
  *
  * <pre><blockquote>
- * String homeZipCode = 
+ * String homeZipCode =
  *     (String) context.getValue("addresses[@name='home']/zipCode");
  * </blockquote></pre>
  *
@@ -215,7 +215,7 @@
  *
  * <pre><blockquote>
  * public class AddressFactory extends AbstractFactory {
- *    public boolean createObject(JXPathContext context, 
+ *    public boolean createObject(JXPathContext context,
  *               Pointer pointer, Object parent, String name, int index){
  *     if ((parent instanceof Employee) &amp;&amp; name.equals("address"){
  *       ((Employee)parent).setAddress(new Address());
@@ -303,15 +303,15 @@
  * <p>
  * Here's how you can create new objects:
  * <pre><blockquote>
- * Book book = 
+ * Book book =
  *    (Book) context.getValue(
  *         "org.apache.commons.jxpath.example.Book.new ('John Updike')");
  * </blockquote></pre>
  *
  * Here's how you can call static methods:
  * <pre><blockquote>
- *   Book book = 
- *    (Book) context.getValue( 
+ *   Book book =
+ *    (Book) context.getValue(
  *       "org. apache.commons.jxpath.example.Book.getBestBook('John Updike')");
  * </blockquote></pre>
  *
@@ -369,8 +369,8 @@
  *
  * See  <a href="http://www.w3schools.com/xpath">XPath Tutorial by
  * W3Schools</a><br>. Also see <a href="http://www.w3.org/TR/xpath">XML Path
- * Language (XPath) Version 1.0</a><br><br> 
- * 
+ * Language (XPath) Version 1.0</a><br><br>
+ *
  * You will also find more information and examples in
  * <a href="http://commons.apache.org/jxpath/users-guide.html">
  * JXPath User's Guide</a>
@@ -394,7 +394,7 @@
 
     private static JXPathContextFactory contextFactory;
     private static JXPathContext compilationContext;
-    
+
     private static final PackageFunctions GENERIC_FUNCTIONS =
         new PackageFunctions("", null);
 
@@ -412,21 +412,21 @@
      */
     public static JXPathContext newContext(
         JXPathContext parentContext,
-        Object contextBean) 
+        Object contextBean)
     {
         return getContextFactory().newContext(parentContext, contextBean);
     }
 
     /**
-     * Acquires a context factory and caches it. 
+     * Acquires a context factory and caches it.
      */
     private static JXPathContextFactory getContextFactory () {
         if (contextFactory == null) {
-            contextFactory = JXPathContextFactory.newInstance();            
+            contextFactory = JXPathContextFactory.newInstance();
         }
         return contextFactory;
     }
-    
+
     /**
      * This  constructor should remain protected - it is to be overridden by
      * subclasses, but never explicitly invoked by clients.
@@ -449,7 +449,7 @@
     public Object getContextBean() {
         return contextBean;
     }
-    
+
     /**
      * Returns a Pointer for the context bean.
      */
@@ -550,18 +550,18 @@
         }
         return locale;
     }
-    
+
     /**
      * Sets DecimalFormatSymbols for a given name. The DecimalFormatSymbols can
      * be referenced as the third, optional argument in the invocation of
      * <code>format-number (number,format,decimal-format-name)</code> function.
      * By default, JXPath uses the symbols for the current locale.
-     * 
+     *
      * @param name the format name or null for default format.
      */
     public synchronized void setDecimalFormatSymbols(
         String name,
-        DecimalFormatSymbols symbols) 
+        DecimalFormatSymbols symbols)
     {
         if (decimalFormats == null) {
             decimalFormats = new HashMap();
@@ -578,7 +578,7 @@
         }
         return (DecimalFormatSymbols) decimalFormats.get(name);
     }
-    
+
     /**
      * If the context is in the lenient mode, then getValue() returns null
      * for inexistent paths.  Otherwise, a path that does not map to
@@ -629,7 +629,7 @@
      * produces the same result as <code>getValue()</code> on object models
      * like JavaBeans, but a different result for DOM/JDOM etc., because it
      * returns the Node itself, rather than its textual contents.
-     * 
+     *
      * @param xpath the xpath to be evaluated
      * @return the found object
      */
@@ -637,10 +637,10 @@
     	Pointer pointer = getPointer(xpath);
         return pointer == null ? null : pointer.getNode();
     }
-    
+
     /**
-     * Finds all nodes that match the specified XPath. 
-     *   
+     * Finds all nodes that match the specified XPath.
+     *
      * @param xpath the xpath to be evaluated
      * @return a list of found objects
      */
@@ -653,7 +653,7 @@
 		}
 		return list;
     }
-    
+
     /**
      * Evaluates the xpath and returns the resulting object. Primitive
      * types are wrapped into objects.
@@ -817,7 +817,7 @@
 
     /**
      * Registers a namespace prefix.
-     * 
+     *
      * @param prefix A namespace prefix
      * @param namespaceURI A URI for that prefix
      */
@@ -825,14 +825,14 @@
         throw new UnsupportedOperationException(
                 "Namespace registration is not implemented by " + getClass());
     }
-    
+
     /**
      * Given a prefix, returns a registered namespace URI. If the requested
      * prefix was not defined explicitly using the registerNamespace method,
      * JXPathContext will then check the context node to see if the prefix is
      * defined there. See
      * {@link #setNamespaceContextPointer(Pointer) setNamespaceContextPointer}.
-     * 
+     *
      * @param prefix The namespace prefix to look up
      * @return namespace URI or null if the prefix is undefined.
      */
@@ -840,7 +840,7 @@
         throw new UnsupportedOperationException(
                 "Namespace registration is not implemented by " + getClass());
     }
-    
+
     /**
      * Get the prefix associated with the specifed namespace URI.
      * @param namespaceURI the ns URI to check.
@@ -857,7 +857,7 @@
      * context where the namespaces are defined. By default,
      * NamespaceContextPointer is the same as the Context Pointer, see
      * {@link #getContextPointer() getContextPointer()}
-     * 
+     *
      * @param namespaceContextPointer The pointer to the context where prefixes used in
      *        XPath expressions should be resolved.
      */
@@ -865,12 +865,12 @@
         throw new UnsupportedOperationException(
                 "Namespace registration is not implemented by " + getClass());
     }
-    
+
     /**
      * Returns the namespace context pointer set with
      * {@link #setNamespaceContextPointer(Pointer) setNamespaceContextPointer()}
      * or, if none has been specified, the context pointer otherwise.
-     * 
+     *
      * @return The namespace context pointer.
      */
     public Pointer getNamespaceContextPointer() {

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathContextFactory.java Sun Dec 16 23:29:28 2007
@@ -54,7 +54,10 @@
         finding the default impl )
     */
     private static String factoryImplName = null;
-    
+
+    /**
+     * Create a new JXPathContextFactory.
+     */
     protected JXPathContextFactory () {
 
     }
@@ -91,8 +94,9 @@
      * <code>JXPathContextFactory</code> it can use the factory to
      * obtain JXPathContext instances.
      *
-     * @exception JXPathFactoryConfigurationError if the implementation is not
-     * available or cannot be instantiated.
+     * @return JXPathContextFactory
+     * @exception JXPathContextFactoryConfigurationError if the implementation
+     *            is not available or cannot be instantiated.
      */
     public static JXPathContextFactory newInstance() {
         if (factoryImplName == null) {
@@ -120,15 +124,16 @@
     /**
      * Creates a new instance of a JXPathContext using the
      * currently configured parameters.
-     *
+     * @param parentContext parent context
+     * @param contextBean Object bean
+     * @return JXPathContext
      * @exception JXPathContextFactoryConfigurationError if a JXPathContext
-     * cannot be created which satisfies the configuration requested
+     *            cannot be created which satisfies the configuration requested
      */
 
     public abstract JXPathContext newContext(
         JXPathContext parentContext,
-        Object contextBean)
-        throws JXPathContextFactoryConfigurationError;
+        Object contextBean);
 
     // -------------------- private methods --------------------
     // This code is duplicated in all factories.
@@ -147,13 +152,14 @@
         }
     }
 
-    /** Private implementation method - will find the implementation
-        class in the specified order.
-        @param property    Property name
-        @param defaultFactory Default implementation, if nothing else is found
-        
-        @return class name of the JXPathContextFactory
-    */
+    /**
+     * Private implementation method - will find the implementation
+     * class in the specified order.
+     * @param property    Property name
+     * @param defaultFactory Default implementation, if nothing else is found
+     *
+     * @return class name of the JXPathContextFactory
+     */
     private static String findFactory(String property, String defaultFactory) {
         // Use the factory ID system property first
         try {

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -25,7 +25,7 @@
 
 public class JXPathException extends RuntimeException {
     private static final long serialVersionUID = 4306409701468017766L;
-    
+
     /** @serial */
     private Throwable 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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -26,7 +26,7 @@
 public class JXPathFunctionNotFoundException extends JXPathException {
 
     private static final long serialVersionUID = -8875537628056117241L;
-    
+
     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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -73,7 +73,7 @@
      */
     public static void registerDynamicClass(
         Class beanClass,
-        Class dynamicPropertyHandlerClass) 
+        Class dynamicPropertyHandlerClass)
     {
         JXPathBasicBeanInfo bi =
             new JXPathBasicBeanInfo(beanClass, dynamicPropertyHandlerClass);
@@ -142,7 +142,7 @@
             if (beanInfo != null && beanInfo.isDynamic()) {
                 return beanInfo;
             }
-            return findDynamicBeanInfo(sup);                
+            return findDynamicBeanInfo(sup);
         }
         return null;
     }
@@ -175,7 +175,7 @@
      * classloader.
      */
     private static Object instantiate(Class sibling, String className)
-        throws Exception 
+        throws Exception
     {
 
         // First check with sibling's classloader (if any).

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathInvalidAccessException.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathInvalidAccessException.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathInvalidAccessException.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathInvalidAccessException.java Sun Dec 16 23:29:28 2007
@@ -26,11 +26,11 @@
 public class JXPathInvalidAccessException extends JXPathException {
 
     private static final long serialVersionUID = -8875537628056117241L;
-    
+
     public JXPathInvalidAccessException(String message) {
         super(message);
     }
-    
+
     public JXPathInvalidAccessException(String message, Throwable ex) {
         super(message, ex);
     }

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -18,7 +18,7 @@
 
 /**
  * Thrown when JXPath cannot convert supplied value to the required type.
- * 
+ *
  * @author Dmitri Plotnikov
  * @version $Revision: 155422 $ $Date: 2005-02-26 08:07:46 -0500 (Sat, 26 Feb 2005) $
  */

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -23,7 +23,7 @@
  * function.  Alternatively, the function can declare the argument as
  * a Collection (or List or Set), in which case it will be given a collection
  * of <i>values</i> matching the path.
- * 
+ *
  * @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
  * @version $Id$
  */
@@ -33,15 +33,15 @@
      * Returns a list of nodes.
      */
     List getNodes();
-    
+
     /**
      * Returns a list of pointers for all nodes in the set.
      */
     List getPointers();
-    
+
     /**
      * Returns a list of values of all contained pointers.
      */
     List getValues();
-    
+
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/PackageFunctions.java Sun Dec 16 23:29:28 2007
@@ -63,7 +63,6 @@
  * <code>"java.util.Date.new()"</code> and <code>"length('foo')"</code>
  * without the explicit registration of any extension functions.
  * </p>
-
  *
  * @author Dmitri Plotnikov
  * @version $Revision$ $Date$
@@ -73,6 +72,11 @@
     private String namespace;
     private static final Object[] EMPTY_ARRAY = new Object[0];
 
+    /**
+     * Create a new PackageFunctions.
+     * @param classPrefix class prefix
+     * @param namespace namespace String
+     */
     public PackageFunctions(String classPrefix, String namespace) {
         this.classPrefix = classPrefix;
         this.namespace = namespace;
@@ -80,13 +84,14 @@
 
     /**
      * Returns the namespace specified in the constructor
+     * @return (singleton) namespace Set
      */
     public Set getUsedNamespaces() {
         return Collections.singleton(namespace);
     }
 
     /**
-     * Returns a Function, if any, for the specified namespace,
+     * Returns a Function, if found, for the specified namespace,
      * name and parameter types.
      * <p>
      * @param  namespace - if it is not the same as specified in the
@@ -102,15 +107,14 @@
      * <li><b>subpackage.subpackage.Classname.methodname</b>, if looking for a
      * static method of a class in a subpackage</li>
      * </ul>
-     *
-     * @return  a MethodFunction, a ConstructorFunction or null if no function
+     * @param parameters Object[] of parameters
+     * @return a MethodFunction, a ConstructorFunction or null if no function
      * is found
      */
     public Function getFunction(
         String namespace,
         String name,
-        Object[] parameters) 
-    {
+        Object[] parameters) {
         if ((namespace == null && this.namespace != null)
             || (namespace != null && !namespace.equals(this.namespace))) {
             return null;
@@ -131,11 +135,11 @@
                 if (method != null) {
                     return new MethodFunction(method);
                 }
-                    
+
                 if (target instanceof NodeSet) {
                     target = ((NodeSet) target).getPointers();
                 }
-                
+
                 method =
                     MethodLookupUtils.lookupMethod(
                         target.getClass(),
@@ -144,7 +148,7 @@
                 if (method != null) {
                     return new MethodFunction(method);
                 }
-                
+
                 if (target instanceof Collection) {
                     Iterator iter = ((Collection) target).iterator();
                     if (iter.hasNext()) {

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -39,11 +39,11 @@
 
     /**
      * Returns the value of the object, property or collection element
-     * this pointer represents. May convert the value to one of the 
+     * this pointer represents. May convert the value to one of the
      * canonical InfoSet types: String, Number, Boolean, Set.
-     * 
+     *
      * For example, in the case of an XML element, getValue() will
-     * return the text contained by the element rather than 
+     * return the text contained by the element rather than
      * the element itself.
      * @return Object value
      */
@@ -52,8 +52,8 @@
     /**
      * Returns the raw value of the object, property or collection element
      * this pointer represents.  Never converts the object to a
-     * canonical type: returns it as is. 
-     * 
+     * canonical type: returns it as is.
+     *
      * For example, for an XML element, getNode() will
      * return the element itself rather than the text it contains.
      * @return Object node
@@ -69,10 +69,10 @@
 
     /**
      * Returns the node this pointer is based on.
-     * @return  
+     * @return
      */
     Object getRootNode();
-    
+
     /**
      * Returns a string that is a proper "canonical" XPath that corresponds to
      * this pointer.  Consider this example:
@@ -86,7 +86,7 @@
      * /departments[@name = 'HR']/employees[3]"</code>.
      */
     String asPath();
-    
+
     /**
      * Pointers are cloneable
      */

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/MethodFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/MethodFunction.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/MethodFunction.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/functions/MethodFunction.java Sun Dec 16 23:29:28 2007
@@ -28,19 +28,26 @@
 
 /**
  * An XPath extension function implemented as an individual Java method.
- * 
+ *
  * @author Dmitri Plotnikov
  * @version $Revision$ $Date$
  */
 public class MethodFunction implements Function {
 
     private Method method;
-    private static final Object EMPTY_ARRAY[] = new Object[0];
+    private static final Object[] EMPTY_ARRAY = new Object[0];
 
+    /**
+     * Create a new MethodFunction.
+     * @param method implementing Method
+     */
     public MethodFunction(Method method) {
         this.method = ValueUtils.getAccessibleMethod(method);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Object invoke(ExpressionContext context, Object[] parameters) {
         try {
             Object target;
@@ -51,7 +58,7 @@
                     parameters = EMPTY_ARRAY;
                 }
                 int pi = 0;
-                Class types[] = method.getParameterTypes();
+                Class[] types = method.getParameterTypes();
                 if (types.length >= 1
                     && ExpressionContext.class.isAssignableFrom(types[0])) {
                     pi = 1;
@@ -67,7 +74,7 @@
             }
             else {
                 int pi = 0;
-                Class types[] = method.getParameterTypes();
+                Class[] types = method.getParameterTypes();
                 if (types.length >= 1
                     && ExpressionContext.class.isAssignableFrom(types[0])) {
                     pi = 1;
@@ -96,7 +103,10 @@
                     ex);
         }
     }
-    
+
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         return method.toString();
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/EvalContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/EvalContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/EvalContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/EvalContext.java Sun Dec 16 23:29:28 2007
@@ -44,26 +44,45 @@
  * @version $Revision$ $Date$
  */
 public abstract class EvalContext implements ExpressionContext, Iterator {
+    /** parent context */
     protected EvalContext parentContext;
+
+    /** root context */
     protected RootContext rootContext;
+
+    /** position */
     protected int position = 0;
+
     private boolean startedSetIteration = false;
     private boolean done = false;
     private boolean hasPerformedIteratorStep = false;
     private Iterator pointerIterator;
 
+    /**
+     * Create a new EvalContext.
+     * @param parentContext parent context
+     */
     public EvalContext(EvalContext parentContext) {
         this.parentContext = parentContext;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Pointer getContextNodePointer() {
         return getCurrentNodePointer();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public JXPathContext getJXPathContext() {
         return getRootContext().getJXPathContext();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public int getPosition() {
         return position;
     }
@@ -77,11 +96,12 @@
     public int getDocumentOrder() {
         return parentContext != null && parentContext.isChildOrderingRequired() ? 1 : 0;
     }
-    
+
     /**
      * Even if this context has the natural ordering and therefore does
      * not require collecting and sorting all nodes prior to returning them,
      * such operation may be required for any child context.
+     * @return boolean
      */
     public boolean isChildOrderingRequired() {
         // Default behavior: if this context needs to be ordered,
@@ -91,6 +111,7 @@
 
     /**
      * Returns true if there are mode nodes matching the context's constraints.
+     * @return boolean
      */
     public boolean hasNext() {
         if (pointerIterator != null) {
@@ -107,6 +128,7 @@
 
     /**
      * Returns the next node pointer in the context
+     * @return Object
      */
     public Object next() {
         if (pointerIterator != null) {
@@ -150,12 +172,17 @@
 
     /**
      * Operation is not supported
+     * @throws UnsupportedOperationException
      */
     public void remove() {
         throw new UnsupportedOperationException(
             "JXPath iterators cannot remove nodes");
     }
 
+    /**
+     * Construct an iterator.
+     * @return whether the Iterator was constructed
+     */
     private boolean constructIterator() {
         HashSet set = new HashSet();
         ArrayList list = new ArrayList();
@@ -190,12 +217,14 @@
         case -1:
             Collections.sort(l, ReverseComparator.INSTANCE);
             break;
+        default:
         }
     }
 
     /**
      * Returns the list of all Pointers in this context for the current
      * position of the parent context.
+     * @return List
      */
     public List getContextNodeList() {
         int pos = position;
@@ -219,6 +248,7 @@
      * Returns the list of all Pointers in this context for all positions
      * of the parent contexts.  If there was an ongoing iteration over
      * this context, the method should not be called.
+     * @return NodeSet
      */
     public NodeSet getNodeSet() {
         if (position != 0) {
@@ -230,22 +260,26 @@
         BasicNodeSet set = new BasicNodeSet();
         while (nextSet()) {
             while (nextNode()) {
-                set.add((Pointer)getCurrentNodePointer().clone());
+                set.add((Pointer) getCurrentNodePointer().clone());
             }
         }
 
         return set;
     }
-    
+
     /**
-     * Typically returns the NodeSet by calling getNodeSet(), 
+     * Typically returns the NodeSet by calling getNodeSet(),
      * but will be overridden for contexts that more naturally produce
      * individual values, e.g. VariableContext
+     * @return Object
      */
     public Object getValue() {
         return getNodeSet();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public String toString() {
         Pointer ptr = getContextNodePointer();
         return ptr == null ? "Empty expression context" : "Expression context [" + getPosition()
@@ -255,6 +289,7 @@
     /**
      * Returns the root context of the path, which provides easy
      * access to variables and functions.
+     * @return RootContext
      */
     public RootContext getRootContext() {
         if (rootContext == null) {
@@ -270,6 +305,10 @@
         position = 0;
     }
 
+    /**
+     * Get the current position.
+     * @return int position.
+     */
     public int getCurrentPosition() {
         return position;
     }
@@ -277,6 +316,7 @@
     /**
      * Returns the first encountered Pointer that matches the current
      * context's criteria.
+     * @return Pointer
      */
     public Pointer getSingleNodePointer() {
         reset();
@@ -291,12 +331,14 @@
     /**
      * Returns the current context node. Undefined before the beginning
      * of the iteration.
+     * @return NodePoiner
      */
     public abstract NodePointer getCurrentNodePointer();
 
     /**
      * Returns true if there is another sets of objects to interate over.
      * Resets the current position and node.
+     * @return boolean
      */
     public boolean nextSet() {
         reset(); // Restart iteration within the set
@@ -333,6 +375,7 @@
     /**
      * Returns true if there is another object in the current set.
      * Switches the current position and node to the next object.
+     * @return boolean
      */
     public abstract boolean nextNode();
 
@@ -341,6 +384,8 @@
      * predicates to quickly get to the n'th element of the node set.
      * Returns false if the position is out of the node set range.
      * You can call it with 0 as the position argument to restart the iteration.
+     * @param position to set
+     * @return boolean
      */
     public boolean setPosition(int position) {
         this.position = position;

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -50,7 +50,7 @@
     public String toString() {
         return xpath;
     }
-    
+
     /**
      * @see CompiledExpression#getValue(JXPathContext)
      */

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextFactoryReferenceImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextFactoryReferenceImpl.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextFactoryReferenceImpl.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/JXPathContextFactoryReferenceImpl.java Sun Dec 16 23:29:28 2007
@@ -18,7 +18,6 @@
 
 import org.apache.commons.jxpath.JXPathContext;
 import org.apache.commons.jxpath.JXPathContextFactory;
-import org.apache.commons.jxpath.JXPathContextFactoryConfigurationError;
 
 /**
  * Default implementation of JXPathContextFactory.
@@ -28,14 +27,18 @@
  */
 public class JXPathContextFactoryReferenceImpl extends JXPathContextFactory {
 
+    /**
+     * Create a new JXPathContextFactoryReferenceImpl.
+     */
     public JXPathContextFactoryReferenceImpl() {
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public JXPathContext newContext(
         JXPathContext parentContext,
-        Object contextBean)
-        throws JXPathContextFactoryConfigurationError 
-    {
+        Object contextBean) {
         return new JXPathContextReferenceImpl(parentContext, contextBean);
     }
 }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/NamespaceResolver.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/NamespaceResolver.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/NamespaceResolver.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/NamespaceResolver.java Sun Dec 16 23:29:28 2007
@@ -80,7 +80,7 @@
 
     /**
      * Registers a namespace prefix.
-     * 
+     *
      * @param prefix A namespace prefix
      * @param namespaceURI A URI for that prefix
      */
@@ -92,7 +92,7 @@
         namespaceMap.put(prefix, namespaceURI);
         reverseMap = null;
     }
-    
+
     /**
      * Register a namespace for the expression context.
      * @param pointer the Pointer to set.
@@ -111,14 +111,14 @@
         }
         return pointer;
     }
-    
+
     /**
      * Given a prefix, returns a registered namespace URI. If the requested
      * prefix was not defined explicitly using the registerNamespace method,
      * JXPathContext will then check the context node to see if the prefix is
      * defined there. See
      * {@link #setNamespaceContextPointer(NodePointer) setNamespaceContextPointer}.
-     * 
+     *
      * @param prefix The namespace prefix to look up
      * @return namespace URI or null if the prefix is undefined.
      */
@@ -130,7 +130,7 @@
 
     /**
      * Given a prefix, returns an externally registered namespace URI.
-     * 
+     *
      * @param prefix The namespace prefix to look up
      * @return namespace URI or null if the prefix is undefined.
      * @since JXPath 1.3
@@ -154,7 +154,7 @@
     }
 
     /**
-     * Get the nearest prefix found that matches an externally-registered namespace. 
+     * Get the nearest prefix found that matches an externally-registered namespace.
      * @param namespaceURI
      * @return String prefix if found.
      * @since JXPath 1.3

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/Parser.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/Parser.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/Parser.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/Parser.java Sun Dec 16 23:29:28 2007
@@ -36,11 +36,13 @@
     /**
      * Parses the XPath expression. Throws a JXPathException in case
      * of a syntax error.
+     * @param expression to parse
+     * @param compiler the compiler
+     * @return parsed Object
      */
     public static Object parseExpression(
         String expression,
-        Compiler compiler) 
-    {
+        Compiler compiler) {
         synchronized (parser) {
             parser.setCompiler(compiler);
             Object expr = null;
@@ -70,6 +72,12 @@
         }
     }
 
+    /**
+     * Describe a parse position.
+     * @param expression to parse
+     * @param position parse position
+     * @return String
+     */
     private static String describePosition(String expression, int position) {
         if (position <= 0) {
             return "at the beginning of the expression";
@@ -81,6 +89,11 @@
             + addEscapes(expression.substring(0, position)) + "'";
     }
 
+    /**
+     * Add escapes to the specified String.
+     * @param string incoming String
+     * @return String
+     */
     private static String addEscapes(String string) {
         // Piggy-back on the code generated by JavaCC
         return TokenMgrError.addEscapes(string);

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java Sun Dec 16 23:29:28 2007
@@ -33,34 +33,46 @@
     private boolean includeSelf;
 
     /**
+     * Create a new AncestorContext.
      * @param parentContext represents the previous step on the path
-     * @param  includeSelf differentiates between "ancestor::" and "ancestor-
-     * or-self::" axes
+     * @param  includeSelf differentiates between "ancestor::" and
+     *                     "ancestor-or-self::" axes
      * @param nodeTest is the name of the element(s) we are looking for
      */
     public AncestorContext(
         EvalContext parentContext,
         boolean includeSelf,
-        NodeTest nodeTest) 
-    {
+        NodeTest nodeTest) {
         super(parentContext);
         this.includeSelf = includeSelf;
         this.nodeTest = nodeTest;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodePointer getCurrentNodePointer() {
         return currentNodePointer;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public int getDocumentOrder() {
         return -1;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void reset() {
         super.reset();
         setStarted = false;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean setPosition(int position) {
         if (position < getCurrentPosition()) {
             reset();
@@ -74,6 +86,9 @@
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextNode() {
         if (!setStarted) {
             setStarted = 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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -39,7 +39,7 @@
         EvalContext parentContext,
         NodeTest nodeTest,
         boolean startFromParentLocation,
-        boolean reverse) 
+        boolean reverse)
     {
         super(parentContext);
         this.nodeTest = nodeTest;

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/DescendantContext.java Sun Dec 16 23:29:28 2007
@@ -41,11 +41,11 @@
     private boolean includeSelf;
     private static final NodeTest ELEMENT_NODE_TEST =
             new NodeTypeTest(Compiler.NODE_TYPE_NODE);
-                        
+
     public DescendantContext(
             EvalContext parentContext,
             boolean includeSelf,
-            NodeTest nodeTest) 
+            NodeTest nodeTest)
     {
         super(parentContext);
         this.includeSelf = includeSelf;
@@ -124,7 +124,7 @@
                 }
             }
             else {
-                // We get here only if the name test failed 
+                // We get here only if the name test failed
                 // and the iterator ended
                 stack.pop();
             }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/InitialContext.java Sun Dec 16 23:29:28 2007
@@ -50,11 +50,11 @@
     public NodePointer getCurrentNodePointer() {
         return nodePointer;
     }
-    
+
     public Object getValue() {
         return nodePointer.getValue();
     }
-    
+
     public boolean nextNode() {
         return setPosition(position + 1);
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NamespaceContext.java Sun Dec 16 23:29:28 2007
@@ -44,16 +44,25 @@
         this.nodeTest = nodeTest;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodePointer getCurrentNodePointer() {
         return currentNodePointer;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public void reset() {
         setStarted = false;
         iterator = null;
         super.reset();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean setPosition(int position) {
         if (position < getCurrentPosition()) {
             reset();
@@ -67,6 +76,9 @@
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextNode() {
         super.setPosition(getCurrentPosition() + 1);
         if (!setStarted) {

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NodeSetContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NodeSetContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NodeSetContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/NodeSetContext.java Sun Dec 16 23:29:28 2007
@@ -30,15 +30,26 @@
     private boolean startedSet = false;
     private NodeSet nodeSet;
 
+    /**
+     * Create a new NodeSetContext.
+     * @param parentContext parent context
+     * @param nodeSet associated NodeSet
+     */
     public NodeSetContext(EvalContext parentContext, NodeSet nodeSet) {
         super(parentContext);
         this.nodeSet = nodeSet;
     }
-    
+
+    /**
+     * {@inheritDoc}
+     */
     public NodeSet getNodeSet() {
         return nodeSet;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public NodePointer getCurrentNodePointer() {
         if (position == 0) {
             if (!setPosition(1)) {
@@ -48,11 +59,17 @@
         return (NodePointer) nodeSet.getPointers().get(position - 1);
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean setPosition(int position) {
         super.setPosition(position);
         return position >= 1 && position <= nodeSet.getPointers().size();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextSet() {
         if (startedSet) {
             return false;
@@ -61,6 +78,9 @@
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean nextNode() {
         return setPosition(position + 1);
     }

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/PrecedingOrFollowingContext.java Sun Dec 16 23:29:28 2007
@@ -41,7 +41,7 @@
     public PrecedingOrFollowingContext(
         EvalContext parentContext,
         NodeTest nodeTest,
-        boolean reverse) 
+        boolean reverse)
     {
         super(parentContext);
         this.nodeTest = nodeTest;
@@ -124,7 +124,7 @@
                         }
                     }
                     else {
-                        // We get here only if the name test failed 
+                        // We get here only if the name test failed
                         // and the iterator ended
                         stack.pop();
                     }

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -56,7 +56,7 @@
                 Object pred = nameTestExpression.computeValue(parentContext);
                 String propertyName = InfoSetUtil.stringValue(pred);
 
-                // At this point it would be nice to say: 
+                // At this point it would be nice to say:
                 // dynamicPropertyPointer.setPropertyName(propertyName)
                 // and then: dynamicPropertyPointer.isActual().
                 // However some PropertyPointers, e.g. DynamicPropertyPointer

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/RootContext.java Sun Dec 16 23:29:28 2007
@@ -40,7 +40,7 @@
 
     public RootContext(
         JXPathContextReferenceImpl jxpathContext,
-        NodePointer pointer) 
+        NodePointer pointer)
     {
         super(null);
         this.jxpathContext = jxpathContext;
@@ -57,7 +57,7 @@
     public RootContext getRootContext() {
         return this;
     }
-    
+
     public EvalContext getAbsoluteRootContext() {
         return jxpathContext.getAbsoluteRootContext();
     }
@@ -65,11 +65,11 @@
     public NodePointer getCurrentNodePointer() {
         return pointer;
     }
-    
+
     public Object getValue() {
         return pointer;
     }
-    
+
     public int getCurrentPosition() {
         throw new UnsupportedOperationException();
     }
@@ -92,7 +92,7 @@
                 new RootContext(jxpathContext, null),
                 (NodeSet) constant);
         }
-                
+
         NodePointer pointer;
         if (constant instanceof NodePointer) {
             pointer = (NodePointer) constant;

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=604783&r1=604782&r2=604783&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 Dec 16 23:29:28 2007
@@ -70,10 +70,13 @@
      * and a name test.  They can also optionally have predicates
      * of type [@name=expression] or simply [expression] interpreted
      * as an index.
+     * @param context evaluation context
+     * @param root root pointer
+     * @param steps path steps
+     * @return NodePointer
      */
     public static NodePointer interpretSimpleLocationPath(
-            EvalContext context, NodePointer root, Step steps[])
-    {
+            EvalContext context, NodePointer root, Step[] steps) {
 //        PATH = createNullPointer(context, root, steps, 0).toString();  // Dbg
         NodePointer pointer = doStep(context, root, steps, 0);
 //        return valuePointer(pointer);
@@ -88,11 +91,15 @@
      * All steps must have the axis "child::" or "attribute::"
      * and a name test.  They can also optionally have predicates
      * of type [@name=...] or simply [...] interpreted as an index.
+     * @param context evaluation context
+     * @param root root pointer
+     * @param predicates predicates corresponding to <code>steps</code>
+     * @param steps path steps
+     * @return NodePointer
      */
     public static NodePointer interpretSimpleExpressionPath(
                 EvalContext context, NodePointer root,
-                Expression predicates[], Step[] steps)
-    {
+                Expression[] predicates, Step[] steps) {
 //        PATH = createNullPointerForPredicates(context, root,
 //                    steps, -1, predicates, 0).toString();  // Debugging
         NodePointer pointer =
@@ -107,11 +114,15 @@
      * find nodes that match it,
      * iterate over those nodes and
      * for each of them call doStep again for subsequent steps.
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @return NodePointer
      */
     private static NodePointer doStep(
             EvalContext context, NodePointer parent,
-            Step steps[], int currentStep)
-    {
+            Step[] steps, int currentStep) {
         if (parent == null) {
             return null;
         }
@@ -123,9 +134,9 @@
 
         // Open all containers
         parent = valuePointer(parent);
-        
+
         Step step = steps[currentStep];
-        Expression predicates[] = step.getPredicates();
+        Expression[] predicates = step.getPredicates();
 
         // Divide and conquer: the process is broken out into
         // four major use cases.
@@ -174,11 +185,15 @@
      * a perfect match, we should return the "best quality" pointer, which
      * has the longest chain of steps mapping to existing nodes and the shortes
      * tail of Null* pointers.
+     * @param context evaluation context
+     * @param parentPointer property owner pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @return NodePointer
      */
     private static NodePointer doStepNoPredicatesPropertyOwner(
                 EvalContext context, PropertyOwnerPointer parentPointer,
-                Step[] steps, int currentStep)
-    {
+                Step[] steps, int currentStep) {
         Step step = steps[currentStep];
         NodePointer childPointer =
             createChildPointerForStep(parentPointer, step);
@@ -236,11 +251,15 @@
      * a perfect match, we should return the "best quality" pointer, which
      * has the longest chain of steps mapping to existing nodes and the shortes
      * tail of Null* pointers.
+     * @param context evaluation context
+     * @param parentPointer parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @return NodePointer
      */
     private static NodePointer doStepNoPredicatesStandard(
                 EvalContext context, NodePointer parentPointer,
-                Step[] steps, int currentStep)
-    {
+                Step[] steps, int currentStep) {
         Step step = steps[currentStep];
 
         if (step.getAxis() == Compiler.AXIS_SELF) {
@@ -277,13 +296,17 @@
      * A path that starts with a property owner. The method evaluates
      * the first predicate in a special way and then forwards to
      * a general predicate processing method.
+     * @param context evaluation context
+     * @param parentPointer parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @return NodePointer
      */
     private static NodePointer doStepPredicatesPropertyOwner(
             EvalContext context, PropertyOwnerPointer parentPointer,
-            Step[] steps, int currentStep)
-    {
+            Step[] steps, int currentStep) {
         Step step = steps[currentStep];
-        Expression predicates[] = step.getPredicates();
+        Expression[] predicates = step.getPredicates();
 
         NodePointer childPointer =
             createChildPointerForStep(parentPointer, step);
@@ -306,9 +329,14 @@
             0);
     }
 
+    /**
+     * Create the child pointer for a given step.
+     * @param parentPointer parent pointer
+     * @param step associated step
+     * @return NodePointer
+     */
     private static NodePointer createChildPointerForStep(
-                PropertyOwnerPointer parentPointer, Step step)
-    {
+                PropertyOwnerPointer parentPointer, Step step) {
         int axis = step.getAxis();
         if (axis == Compiler.AXIS_CHILD || axis == Compiler.AXIS_ATTRIBUTE) {
             QName name = ((NodeNameTest) step.getNodeTest()).getNodeName();
@@ -332,13 +360,17 @@
      * A path that starts with a standard InfoSet node, e.g. a DOM Node.
      * The method evaluates the first predicate in a special way and
      * then forwards to a general predicate processing method.
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @return NodePointer
      */
     private static NodePointer doStepPredicatesStandard(
             EvalContext context, NodePointer parent,
-            Step[] steps, int currentStep)
-    {
+            Step[] steps, int currentStep) {
         Step step = steps[currentStep];
-        Expression predicates[] = step.getPredicates();
+        Expression[] predicates = step.getPredicates();
 
         int axis = step.getAxis();
         if (axis == Compiler.AXIS_SELF) {
@@ -409,12 +441,18 @@
     /**
      * Evaluates predicates and proceeds with the subsequent steps
      * of the path.
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @param predicates predicate expressions
+     * @param currentPredicate int predicate number
+     * @return NodePointer
      */
     private static NodePointer doPredicate(
                 EvalContext context, NodePointer parent,
                 Step[] steps, int currentStep,
-                Expression predicates[], int currentPredicate)
-    {
+                Expression[] predicates, int currentPredicate) {
         if (currentPredicate == predicates.length) {
             return doStep(context, parent, steps, currentStep + 1);
         }
@@ -439,11 +477,20 @@
             currentPredicate);
     }
 
+    /**
+     * Execute a NameAttributeTest predicate
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep int step number
+     * @param predicates predicates
+     * @param currentPredicate int predicate number
+     * @return NodePointer
+     */
     private static NodePointer doPredicateName(
             EvalContext context, NodePointer parent,
             Step[] steps, int currentStep,
-            Expression[] predicates, int currentPredicate)
-    {
+            Expression[] predicates, int currentPredicate) {
         Expression predicate = predicates[currentPredicate];
         String key = keyFromPredicate(context, predicate);
         NodePointer child = valuePointer(parent);
@@ -544,12 +591,18 @@
     /**
      * Called exclusively for standard InfoSet nodes, e.g. DOM nodes
      * to evaluate predicate sequences like [@name=...][@name=...][index].
+     * @param context evaluation context
+     * @param parents List of parent pointers
+     * @param steps path steps
+     * @param currentStep step number
+     * @param predicates predicates
+     * @param currentPredicate int predicate number
+     * @return NodePointer
      */
     private static NodePointer doPredicatesStandard(
                 EvalContext context, List parents,
                 Step[] steps, int currentStep,
-                Expression predicates[], int currentPredicate)
-    {
+                Expression[] predicates, int currentPredicate) {
         if (parents.size() == 0) {
             return null;
         }
@@ -604,13 +657,19 @@
 
     /**
      * Evaluate a subscript predicate: see if the node is a collection and
-     * if the index is inside the collection
+     * if the index is inside the collection.
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @param predicates predicates
+     * @param currentPredicate int predicate number
+     * @return NodePointer
      */
     private static NodePointer doPredicateIndex(
             EvalContext context, NodePointer parent,
             Step[] steps, int currentStep,
-            Expression[] predicates, int currentPredicate)
-    {
+            Expression[] predicates, int currentPredicate) {
         Expression predicate = predicates[currentPredicate];
         int index = indexFromPredicate(context, predicate);
         NodePointer pointer = parent;
@@ -637,11 +696,13 @@
     /**
      * Extract an integer from a subscript predicate. The returned index
      * starts with 0, even though the subscript starts with 1.
+     * @param context evaluation context
+     * @param predicate to evaluate
+     * @return calculated index
      */
     private static int indexFromPredicate(
         EvalContext context,
-        Expression predicate) 
-    {
+        Expression predicate) {
         Object value = predicate.computeValue(context);
         if (value instanceof EvalContext) {
             value = ((EvalContext) value).getSingleNodePointer();
@@ -662,10 +723,12 @@
     /**
      * Extracts the string value of the expression from a predicate like
      * [@name=expression].
+     * @param context evaluation context
+     * @param predicate predicate to evaluate
+     * @return String key extracted
      */
     private static String keyFromPredicate(EvalContext context,
-                Expression predicate) 
-    {
+                Expression predicate) {
         Expression expr =
             ((NameAttributeTest) predicate).getNameTestExpression();
         return InfoSetUtil.stringValue(expr.computeValue(context));
@@ -675,6 +738,8 @@
      * For a pointer that matches an actual node, returns 0.
      * For a pointer that does not match an actual node, but whose
      * parent pointer does returns -1, etc.
+     * @param pointer input pointer
+     * @return int match quality code
      */
     private static int computeQuality(NodePointer pointer) {
         int quality = PERFECT_MATCH;
@@ -688,11 +753,13 @@
     /**
      * Returns true if the pointer has an attribute called "name" and
      * its value is equal to the supplied string.
+     * @param pointer input pointer
+     * @param name name to check
+     * @return boolean
      */
     private static boolean isNameAttributeEqual(
         NodePointer pointer,
-        String name) 
-    {
+        String name) {
         NodeIterator it = pointer.attributeIterator(QNAME_NAME);
         return it != null
             && it.setPosition(1)
@@ -702,11 +769,13 @@
     /**
      * Returns true if the pointer is a collection and the index is
      * withing the bounds of the collection.
+     * @param pointer input pointer
+     * @param index to check
+     * @return boolean
      */
     private static boolean isCollectionElement(
         NodePointer pointer,
-        int index) 
-    {
+        int index) {
         return pointer.isActual()
             && (index == 0
                 || (pointer.isCollection()
@@ -717,6 +786,8 @@
     /**
      * For an intermediate pointer (e.g. PropertyPointer, ContainerPointer)
      * returns a pointer for the contained value.
+     * @param pointer input pointer
+     * @return NodePointer
      */
     private static NodePointer valuePointer(NodePointer pointer) {
         return pointer == null ? null : pointer.getValuePointer();
@@ -726,11 +797,15 @@
      * Creates a "null pointer" that
      * a) represents the requested path and
      * b) can be used for creation of missing nodes in the path.
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @return NodePointer
      */
     public static NodePointer createNullPointer(
             EvalContext context, NodePointer parent, Step[] steps,
-            int currentStep)
-    {
+            int currentStep) {
         if (currentStep == steps.length) {
             return parent;
         }
@@ -749,7 +824,7 @@
         }
         // else { it is self::node() }
 
-        Expression predicates[] = step.getPredicates();
+        Expression[] predicates = step.getPredicates();
         return createNullPointerForPredicates(
             context,
             parent,
@@ -761,12 +836,18 @@
 
     /**
      * Creates a "null pointer" that starts with predicates.
+     * @param context evaluation context
+     * @param parent parent pointer
+     * @param steps path steps
+     * @param currentStep step number
+     * @param predicates predicates
+     * @param currentPredicate int predicate number
+     * @return NodePointer
      */
     private static NodePointer createNullPointerForPredicates(
             EvalContext context, NodePointer parent,
             Step[] steps, int currentStep,
-            Expression predicates[], int currentPredicate)
-    {
+            Expression[] predicates, int currentPredicate) {
         for (int i = currentPredicate; i < predicates.length; i++) {
             Expression predicate = predicates[i];
             if (predicate instanceof NameAttributeTest) {
@@ -791,11 +872,17 @@
                     context, parent, steps, currentStep + 1);
     }
 
+    /**
+     * Get a NodeIterator.
+     * @param context evaluation context
+     * @param pointer owning pointer
+     * @param step triggering step
+     * @return NodeIterator
+     */
     private static NodeIterator getNodeIterator(
         EvalContext context,
         NodePointer pointer,
-        Step step) 
-    {
+        Step step) {
         if (step.getAxis() == Compiler.AXIS_CHILD) {
             NodeTest nodeTest = step.getNodeTest();
             QName qname = ((NodeNameTest) nodeTest).getNodeName();
@@ -817,6 +904,11 @@
             ((NodeNameTest) step.getNodeTest()).getNodeName());
     }
 
+    /**
+     * Learn whether <code>name</code> is a lang attribute.
+     * @param name to compare
+     * @return boolean
+     */
     private static boolean isLangAttribute(QName name) {
         return name.getPrefix() != null
             && name.getPrefix().equals("xml")

Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java?rev=604783&r1=604782&r2=604783&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java (original)
+++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/axes/UnionContext.java Sun Dec 16 23:29:28 2007
@@ -32,18 +32,29 @@
  * @version $Revision$ $Date$
  */
 public class UnionContext extends NodeSetContext {
-    private EvalContext contexts[];
+    private EvalContext[] contexts;
     private boolean prepared;
 
-    public UnionContext(EvalContext parentContext, EvalContext contexts[]) {
+    /**
+     * Create a new UnionContext.
+     * @param parentContext parent context
+     * @param contexts child contexts
+     */
+    public UnionContext(EvalContext parentContext, EvalContext[] contexts) {
         super(parentContext, new BasicNodeSet());
         this.contexts = contexts;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public int getDocumentOrder() {
         return contexts.length > 1 ? 1 : super.getDocumentOrder();
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean setPosition(int position) {
         if (!prepared) {
             prepared = true;



Mime
View raw message