commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r397437 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/resolver/FlatResolver.java
Date Thu, 27 Apr 2006 06:34:26 GMT
Author: rahul
Date: Wed Apr 26 23:34:25 2006
New Revision: 397437

URL: http://svn.apache.org/viewcvs?rev=397437&view=rev
Log:
Conform to checkstyle, add missing Javadocs. No functional change.


Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/resolver/FlatResolver.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/resolver/FlatResolver.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/resolver/FlatResolver.java?rev=397437&r1=397436&r2=397437&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/resolver/FlatResolver.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/resolver/FlatResolver.java
Wed Apr 26 23:34:25 2006
@@ -15,36 +15,40 @@
  *  @author <a href="mailto:geirm@adeptra.com">Geir Magnusson Jr.</a>
  *  @version $Id$
  */
-public class FlatResolver implements JexlExprResolver
-{
+public class FlatResolver implements JexlExprResolver {
     /**
-     *  flag to return NO_VALUE on null from context
+     *  Flag to return NO_VALUE on null from context.
      *  this allows jexl to try to evaluate
      */
     protected boolean noValOnNull = true;
 
     /**
-     * default CTOR
+     * Default CTOR.
      */
-    public FlatResolver()
-    {
+    public FlatResolver() {
     }
 
     /**
      *  CTOR that lets you override the default behavior of
-     *  noValOnNull, which is true (jexl gets a shot after if null)
+     *  noValOnNull, which is true. (jexl gets a shot after if null)
+     *
+     *  @param noValOnNull Whether NO_VALUE will be returned instead of null.
      */
-    public FlatResolver(boolean noValOnNull)
-    {
+    public FlatResolver(boolean noValOnNull) {
         this.noValOnNull = noValOnNull;
     }
 
-    public Object evaluate(JexlContext context, String expression)
-    {
+    /**
+     *  Try to resolve expression as-is.
+     *
+     *  @param context The context for resolution.
+     *  @param expression The flat expression.
+     *  @return The resolved value.
+     */
+    public Object evaluate(JexlContext context, String expression) {
         Object val = context.getVars().get(expression);
 
-        if (val == null && noValOnNull)
-        {
+        if (val == null && noValOnNull) {
             return JexlExprResolver.NO_VALUE;
         }
 



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


Mime
View raw message