Commits

Anonymous committed 8e40ca0

update javadocs, add cache tests

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/parameter-binder@2013e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (13)

core/src/main/java/com/opensymphony/xwork2/parameters/accessor/ParametersCollectionPropertyAccessor.java

 
 
 /**
- * @author Gabe
+ * Implementation similar to XWorkCollectionPropertyAccessor, but does not depend on OGNL
  */
 public class ParametersCollectionPropertyAccessor implements ParametersPropertyAccessor {
 

core/src/main/java/com/opensymphony/xwork2/parameters/accessor/ParametersCompoundRootAccessor.java

 
 
 /**
- * A stack that is able to call methods on objects in the stack.
- *
- * @author $Author: rainerh $
- * @author Rainer Hermanns
- * @version $Revision: 1836 $
+ * Implementation similar to CompundRootAccessor, but does not depend on OGNL 
  */
 public class ParametersCompoundRootAccessor implements ParametersPropertyAccessor {
 

core/src/main/java/com/opensymphony/xwork2/parameters/accessor/ParametersListPropertyAccessor.java

 import java.util.List;
 import java.util.Map;
 
-
+/**
+ * Implementation similar to XWorkListPropertyAccessor, but does not depend on OGNL
+ */
 public class ParametersListPropertyAccessor implements ParametersPropertyAccessor {
 
     private XWorkCollectionPropertyAccessor _sAcc = new XWorkCollectionPropertyAccessor();

core/src/main/java/com/opensymphony/xwork2/parameters/accessor/ParametersMapPropertyAccessor.java

 /*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
  */
 package com.opensymphony.xwork2.parameters.accessor;
 

core/src/main/java/com/opensymphony/xwork2/parameters/accessor/ParametersObjectPropertyAccessor.java

+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.xwork2.parameters.accessor;
 
 
 
 import java.util.Map;
 
-
+/**
+ * Implementation similar to XWorkObjectPropertyAccessor, but does not depend on OGNL
+ */
 public class ParametersObjectPropertyAccessor implements ParametersPropertyAccessor {
     protected AccessorBytecodeUtil accessorBytecodeUtil;
 

core/src/main/java/com/opensymphony/xwork2/parameters/accessor/ParametersPropertyAccessor.java

+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.xwork2.parameters.accessor;
 
 import java.util.Map;
 
+/**
+ * This interface is implemented by accessors in this package, which do not depend
+ * on OGNL and throw Exception (instead of OgnlException)
+ */
 public interface ParametersPropertyAccessor {
     Object getProperty(Map context, Object lastObject, Object name) throws Exception;
 

core/src/main/java/com/opensymphony/xwork2/parameters/bytecode/AccessorBytecodeUtil.java

 /*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
  */
 package com.opensymphony.xwork2.parameters.bytecode;
 
 public class AccessorBytecodeUtil implements Opcodes {
     private static int counter;
 
-    protected final Map<Key, Setter> settersCache = new HashMap<Key, Setter>();
-    protected final Map<Key, Getter> gettersCache = new HashMap<Key, Getter>();
+    final Map<Key, Setter> settersCache = new HashMap<Key, Setter>();
+    final Map<Key, Getter> gettersCache = new HashMap<Key, Getter>();
 
     protected final String SETTER_INTERFACE = toPathName(Setter.class.getName());
     protected final String GETTER_INTERFACE = toPathName(Getter.class.getName());

core/src/main/java/com/opensymphony/xwork2/parameters/bytecode/Getter.java

+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.xwork2.parameters.bytecode;
 
 /**

core/src/main/java/com/opensymphony/xwork2/parameters/bytecode/Setter.java

+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.xwork2.parameters.bytecode;
 
 /**

core/src/main/java/com/opensymphony/xwork2/parameters/parameters.html

+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+<TITLE>BNF for parameters.jj</TITLE>
+</HEAD>
+<BODY>
+<H1 ALIGN=CENTER>BNF for parameters.jj</H1>
+<H2 ALIGN=CENTER>TOKENS</H2>
+<TABLE>
+ <!-- Token -->
+ <TR>
+  <TD>
+   <PRE>
+&lt;DEFAULT&gt; SKIP : {
+" "
+| "\t"
+| "\n"
+| "\r"
+}
+
+   </PRE>
+  </TD>
+ </TR>
+ <!-- Token -->
+ <TR>
+  <TD>
+   <PRE>
+&lt;DEFAULT&gt; TOKEN : {
+&lt;INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])*&gt;
+| &lt;FLOATING_POINT_LITERAL: (["0"-"9"])+ "." (["0"-"9"])* (&lt;EXPONENT&gt;)? | "." (["0"-"9"])+ (&lt;EXPONENT&gt;)? | (["0"-"9"])+ &lt;EXPONENT&gt;&gt;
+| &lt;#EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+&gt;
+| &lt;STRING_LITERAL: "\"" (~["\"","\\"] | "\\" ["\\","\""])* "\"" | "\'" (~["\'","\\"] | "\\" ["\\","\'"])* "\'"&gt;
+| &lt;BADLY_ESCAPED_STRING_LITERAL: "\"" (~["\"","\\"])* "\\" ~["\\","\""] | "\'" (~["\'","\\"])* "\\" ~["\\","\'"]&gt;
+| &lt;TRUE: "true"&gt;
+| &lt;FALSE: "false"&gt;
+| &lt;DOT: "."&gt;
+| &lt;LPAREN: "("&gt;
+| &lt;RPAREN: ")"&gt;
+| &lt;LBRACKET: "["&gt;
+| &lt;RBRACKET: "]"&gt;
+| &lt;IDENTIFIER: &lt;LETTER&gt; (&lt;LETTER&gt; | &lt;DIGIT&gt;)*&gt;
+| &lt;#LETTER: ["$","A"-"Z","_","a"-"z","\u00c0"-"\u00d6","\u00d8"-"\u00f6","\u00f8"-"\u00ff","\u0100"-"\u1fff","\u3040"-"\u318f","\u3300"-"\u337f","\u3400"-"\u3d2d","\u4e00"-"\u9fff","\uf900"-"\ufaff"]&gt;
+| &lt;#DIGIT: ["0"-"9","\u0660"-"\u0669","\u06f0"-"\u06f9","\u0966"-"\u096f","\u09e6"-"\u09ef","\u0a66"-"\u0a6f","\u0ae6"-"\u0aef","\u0b66"-"\u0b6f","\u0be7"-"\u0bef","\u0c66"-"\u0c6f","\u0ce6"-"\u0cef","\u0d66"-"\u0d6f","\u0e50"-"\u0e59","\u0ed0"-"\u0ed9","\u1040"-"\u1049"]&gt;
+}
+
+   </PRE>
+  </TD>
+ </TR>
+</TABLE>
+<H2 ALIGN=CENTER>NON-TERMINALS</H2>
+<TABLE>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod1">expression</A></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod2">subexpression</A> ( &lt;DOT&gt; <A HREF="#prod2">subexpression</A> )*</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod2">subexpression</A></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod3">collectionExpression</A></TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod4">indexedExpression</A></TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LBRACKET&gt; &lt;STRING_LITERAL&gt; &lt;RBRACKET&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod3">collectionExpression</A></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; &lt;LPAREN&gt; <A HREF="#prod5">value</A> &lt;RPAREN&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod4">indexedExpression</A></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; &lt;LBRACKET&gt; <A HREF="#prod5">value</A> &lt;RBRACKET&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod5">value</A></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;STRING_LITERAL&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;INTEGER_LITERAL&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;FLOATING_POINT_LITERAL&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;TRUE&gt;</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;FALSE&gt;</TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>

core/src/test/java/com/opensymphony/xwork2/parameters/PerformanceTest.java

+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.xwork2.parameters;
 
 import com.opensymphony.xwork2.SimpleAction;

core/src/test/java/com/opensymphony/xwork2/parameters/XWorkParametersBinderTest.java

 /*
- * $Id$
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
  */
 package com.opensymphony.xwork2.parameters;
 

core/src/test/java/com/opensymphony/xwork2/parameters/bytecode/AccessorBytecodeUtilTest.java

+/*
+ * Copyright (c) 2002-2006 by OpenSymphony
+ * All rights reserved.
+ */
 package com.opensymphony.xwork2.parameters.bytecode;
 
 import com.opensymphony.xwork2.XWorkTestCase;