You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2006/04/29 18:51:40 UTC

svn commit: r398206 - in /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser: ASTMethod.java ASTModNode.java ASTMulNode.java

Author: dion
Date: Sat Apr 29 09:51:38 2006
New Revision: 398206

URL: http://svn.apache.org/viewcvs?rev=398206&view=rev
Log:
Checkstyle

Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTModNode.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMulNode.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java?rev=398206&r1=398205&r2=398206&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java (original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java Sat Apr 29 09:51:38 2006
@@ -31,22 +31,39 @@
     /** dummy velocity info. */
     private static final Info DUMMY = new Info("", 1, 1);
 
+    /**
+     * Create the node given an id.
+     * 
+     * @param id node id.
+     */
     public ASTMethod(int id) {
         super(id);
     }
 
+    /**
+     * Create a node with the given parser and id.
+     * 
+     * @param p a parser.
+     * @param id node id.
+     */
     public ASTMethod(Parser p, int id) {
         super(p, id);
     }
 
-    /** Accept the visitor. * */
+    /** {@inheritDoc} */
     public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }
 
     /**
-     * returns the value of itself applied to the object. We assume that an
-     * identifier can be gotten via a get(String)
+     * evaluate a method invocation upon a base object.
+     * 
+     * foo.bar(2)
+     * 
+     * @param jc the {@link JexlContext} to evaluate against.
+     * @param obj The object to have the method invoked.
+     * @return the value of the method invocation.
+     * @throws Exception on any error
      */
     public Object execute(Object obj, JexlContext jc) throws Exception {
         String methodName = ((ASTIdentifier) jjtGetChild(0)).val;
@@ -103,6 +120,8 @@
      * will fail, but a call to substring(int,int) with an int and a short will
      * succeed.
      * 
+     * @param original the original number.
+     * @return a value of the smallest type the original number will fit into.
      * @since 1.1
      */
     private Number narrow(Number original) {

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTModNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTModNode.java?rev=398206&r1=398205&r2=398206&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTModNode.java (original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTModNode.java Sat Apr 29 09:51:38 2006
@@ -26,19 +26,31 @@
  * @version $Id$
  */
 public class ASTModNode extends SimpleNode {
+    /**
+     * Create the node given an id.
+     * 
+     * @param id node id.
+     */
     public ASTModNode(int id) {
         super(id);
     }
 
+    /**
+     * Create a node with the given parser and id.
+     * 
+     * @param p a parser.
+     * @param id node id.
+     */
     public ASTModNode(Parser p, int id) {
         super(p, id);
     }
 
-    /** Accept the visitor. * */
+    /** {@inheritDoc} */
     public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }
 
+    /** {@inheritDoc} */
     public Object value(JexlContext jc) throws Exception {
         Object left = ((SimpleNode) jjtGetChild(0)).value(jc);
         Object right = ((SimpleNode) jjtGetChild(1)).value(jc);

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMulNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMulNode.java?rev=398206&r1=398205&r2=398206&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMulNode.java (original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMulNode.java Sat Apr 29 09:51:38 2006
@@ -26,19 +26,31 @@
  * @version $Id$
  */
 public class ASTMulNode extends SimpleNode {
+    /**
+     * Create the node given an id.
+     * 
+     * @param id node id.
+     */
     public ASTMulNode(int id) {
         super(id);
     }
 
+    /**
+     * Create a node with the given parser and id.
+     * 
+     * @param p a parser.
+     * @param id node id.
+     */
     public ASTMulNode(Parser p, int id) {
         super(p, id);
     }
 
-    /** Accept the visitor. * */
+    /** {@inheritDoc} */
     public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }
 
+    /** {@inheritDoc} */
     public Object value(JexlContext context) throws Exception {
         Object left = ((SimpleNode) jjtGetChild(0)).value(context);
         Object right = ((SimpleNode) jjtGetChild(1)).value(context);



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