You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2005/02/11 13:22:13 UTC

svn commit: r153389 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java

Author: skitching
Date: Fri Feb 11 04:22:11 2005
New Revision: 153389

URL: http://svn.apache.org/viewcvs?view=rev&rev=153389
Log:
New class used by CallMethodAction and CallParam actions to store parameter values.
This is much nicer than the old object[] approach.

Added:
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java   (with props)

Added: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java?view=auto&rev=153389
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java (added)
+++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java Fri Feb 11 04:22:11 2005
@@ -0,0 +1,44 @@
+/* $Id$
+ *
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.commons.digester2.actions;
+
+import org.apache.commons.logging.Log;
+
+/**
+ * Represents a set of parameters to a method. Instances of this class
+ * are created when a CallMethodAction fires, and populated when
+ * CallParam....Action instances fire. The values are then extracted in
+ * order to be passed to the target method.
+ */
+
+public class Parameters {
+    private Object[] values;
+    
+    public Parameters(int size) {
+        values = new Object[size];
+    }
+    
+    public void put(int index, Object obj) {
+        values[index] = obj;
+    }
+    
+    public Object[] getValues() {
+        return values;
+    }
+}

Propchange: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/Parameters.java
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org