You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2001/03/19 18:18:12 UTC
cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node ASTAddNode.java ASTAndNode.java ASTBlock.java ASTDirective.java ASTDivNode.java ASTEQNode.java ASTElseIfStatement.java ASTExpression.java ASTGENode.java ASTGTNode.java ASTIfStatement.java ASTIntegerRange.java ASTLENode.java ASTLTNode.java ASTModNode.java ASTMulNode.java ASTNENode.java ASTNotNode.java ASTObjectArray.java ASTOrNode.java ASTSetDirective.java ASTSubtractNode.java
geirm 01/03/19 09:18:12
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTAddNode.java ASTAndNode.java ASTBlock.java
ASTDirective.java ASTDivNode.java ASTEQNode.java
ASTElseIfStatement.java ASTExpression.java
ASTGENode.java ASTGTNode.java ASTIfStatement.java
ASTIntegerRange.java ASTLENode.java ASTLTNode.java
ASTModNode.java ASTMulNode.java ASTNENode.java
ASTNotNode.java ASTObjectArray.java ASTOrNode.java
ASTSetDirective.java ASTSubtractNode.java
Log:
Minor changes to suppor the new signatures of evaluate(), render(), etc...
Little doc changes as well - nothing functional
Revision Changes Path
1.4 +7 -6 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java
Index: ASTAddNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAddNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTAddNode.java 2001/01/03 05:23:22 1.3
+++ ASTAddNode.java 2001/03/19 17:17:43 1.4
@@ -1,9 +1,9 @@
-/* Generated By:JJTree: Do not edit this line. ASTAddNode.java */
+package org.apache.velocity.runtime.parser.node;
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +25,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -63,15 +63,15 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTAddNode.java,v 1.3 2001/01/03 05:23:22 geirm Exp $
+ * @version $Id: ASTAddNode.java,v 1.4 2001/03/19 17:17:43 geirm Exp $
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.Runtime;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTAddNode extends SimpleNode
{
public ASTAddNode(int id)
@@ -96,6 +96,7 @@
* @return Integer object with value, or null
*/
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
/*
* get the two addends
1.4 +10 -10 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java
Index: ASTAndNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTAndNode.java 2001/01/03 05:23:22 1.3
+++ ASTAndNode.java 2001/03/19 17:17:44 1.4
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTAndNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,6 +55,9 @@
* <http://www.apache.org/>.
*/
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
/**
* Please look at the Parser.jjt file which is
@@ -60,14 +65,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTAndNode.java,v 1.3 2001/01/03 05:23:22 geirm Exp $
-*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import org.apache.velocity.context.InternalContextAdapter;
-import org.apache.velocity.runtime.parser.Parser;
-
+ * @version $Id: ASTAndNode.java,v 1.4 2001/03/19 17:17:44 geirm Exp $
+ */
public class ASTAndNode extends SimpleNode
{
public ASTAndNode(int id)
@@ -93,6 +92,7 @@
* null && null = false
*/
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
Node left = jjtGetChild(0);
Node right = jjtGetChild(1);
1.4 +6 -5 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java
Index: ASTBlock.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTBlock.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTBlock.java 2001/01/03 05:24:12 1.3
+++ ASTBlock.java 2001/03/19 17:17:44 1.4
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTBlock.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,13 +55,12 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import java.io.Writer;
import java.io.IOException;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
public class ASTBlock extends SimpleNode
{
@@ -80,7 +81,7 @@
}
public boolean render( InternalContextAdapter context, Writer writer)
- throws IOException
+ throws IOException, MethodInvocationException
{
int i, k = jjtGetNumChildren();
1.16 +17 -17 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
Index: ASTDirective.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ASTDirective.java 2001/02/14 22:24:05 1.15
+++ ASTDirective.java 2001/03/19 17:17:44 1.16
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTDirective.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,6 +56,16 @@
* <http://www.apache.org/>.
*/
+import java.io.Writer;
+import java.io.IOException;
+
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.directive.Directive;
+import org.apache.velocity.runtime.directive.Parse;
+import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.runtime.Runtime;
+
+import org.apache.velocity.exception.MethodInvocationException;
/**
* This class is responsible for handling the pluggable
@@ -64,20 +76,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTDirective.java,v 1.15 2001/02/14 22:24:05 geirm Exp $
-*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import java.io.Writer;
-import java.io.IOException;
-
-import org.apache.velocity.context.InternalContextAdapter;
-import org.apache.velocity.runtime.directive.Directive;
-import org.apache.velocity.runtime.directive.Parse;
-import org.apache.velocity.runtime.parser.Parser;
-import org.apache.velocity.runtime.Runtime;
-
+ * @version $Id: ASTDirective.java,v 1.16 2001/03/19 17:17:44 geirm Exp $
+ */
public class ASTDirective extends SimpleNode
{
private Directive directive;
@@ -140,7 +140,7 @@
}
public boolean render( InternalContextAdapter context, Writer writer)
- throws IOException
+ throws IOException,MethodInvocationException
{
/*
* normal processing
1.4 +12 -11 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java
Index: ASTDivNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTDivNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTDivNode.java 2001/01/03 05:24:59 1.3
+++ ASTDivNode.java 2001/03/19 17:17:45 1.4
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTDivNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,6 +56,11 @@
* <http://www.apache.org/>.
*/
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.Runtime;
+import org.apache.velocity.runtime.parser.Parser;
+
+import org.apache.velocity.exception.MethodInvocationException;
/**
* Handles integer division of nodes
@@ -63,15 +70,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTDivNode.java,v 1.3 2001/01/03 05:24:59 geirm Exp $
-*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import org.apache.velocity.context.InternalContextAdapter;
-import org.apache.velocity.runtime.Runtime;
-import org.apache.velocity.runtime.parser.Parser;
-
+ * @version $Id: ASTDivNode.java,v 1.4 2001/03/19 17:17:45 geirm Exp $
+ */
public class ASTDivNode extends SimpleNode
{
public ASTDivNode(int id)
@@ -96,6 +96,7 @@
* @return Integer(value) or null
*/
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
/*
* get the two args
1.5 +6 -3 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java
Index: ASTEQNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTEQNode.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ASTEQNode.java 2001/03/06 12:56:21 1.4
+++ ASTEQNode.java 2001/03/19 17:17:45 1.5
@@ -1,3 +1,5 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTEQNode.java */
/*
* The Apache Software License, Version 1.1
@@ -53,12 +55,12 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
import org.apache.velocity.runtime.Runtime;
+import org.apache.velocity.exception.MethodInvocationException;
+
/**
* Handles the equivalence operator
*
@@ -67,7 +69,7 @@
* This operator requires that the LHS and RHS are both of the
* same Class.
*
- * @version $Id: ASTEQNode.java,v 1.4 2001/03/06 12:56:21 geirm Exp $
+ * @version $Id: ASTEQNode.java,v 1.5 2001/03/19 17:17:45 geirm Exp $
*/
public class ASTEQNode extends SimpleNode
{
@@ -104,6 +106,7 @@
* if either LHS or RHS is null
*/
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
Object left = jjtGetChild(0).value(context);
Object right = jjtGetChild(1).value(context);
1.7 +13 -13 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java
Index: ASTElseIfStatement.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTElseIfStatement.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ASTElseIfStatement.java 2001/01/03 05:25:17 1.6
+++ ASTElseIfStatement.java 2001/03/19 17:17:46 1.7
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTElseIfStatement.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,6 +56,12 @@
* <http://www.apache.org/>.
*/
+import java.io.Writer;
+import java.io.IOException;
+
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
/**
* This class is responsible for handling the ElseIf VTL control statement.
@@ -63,17 +71,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTElseIfStatement.java,v 1.6 2001/01/03 05:25:17 geirm Exp $
+ * @version $Id: ASTElseIfStatement.java,v 1.7 2001/03/19 17:17:46 geirm Exp $
*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import java.io.Writer;
-import java.io.IOException;
-
-import org.apache.velocity.context.InternalContextAdapter;
-import org.apache.velocity.runtime.parser.*;
-
public class ASTElseIfStatement extends SimpleNode
{
public ASTElseIfStatement(int id)
@@ -101,6 +100,7 @@
* itself.
*/
public boolean evaluate ( InternalContextAdapter context)
+ throws MethodInvocationException
{
return jjtGetChild(0).evaluate(context);
}
@@ -109,7 +109,7 @@
* renders the block
*/
public boolean render( InternalContextAdapter context, Writer writer)
- throws IOException
+ throws IOException,MethodInvocationException
{
return jjtGetChild(1).render( context, writer );
}
1.3 +8 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTExpression.java
Index: ASTExpression.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTExpression.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTExpression.java 2001/01/03 05:25:18 1.2
+++ ASTExpression.java 2001/03/19 17:17:47 1.3
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTExpression.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,11 +55,11 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTExpression extends SimpleNode
{
public ASTExpression(int id)
@@ -77,11 +79,13 @@
}
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
return jjtGetChild(0).evaluate(context);
}
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
return jjtGetChild(0).value(context);
}
1.3 +6 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTGENode.java
Index: ASTGENode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTGENode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTGENode.java 2001/01/03 05:27:37 1.2
+++ ASTGENode.java 2001/03/19 17:17:47 1.3
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTGENode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,10 +55,9 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
public class ASTGENode extends SimpleNode
{
@@ -77,6 +78,7 @@
}
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
if (((Integer)jjtGetChild(0).value(context)).intValue() >=
((Integer)jjtGetChild(1).value(context)).intValue())
1.3 +6 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java
Index: ASTGTNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTGTNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTGTNode.java 2001/01/03 05:27:37 1.2
+++ ASTGTNode.java 2001/03/19 17:17:48 1.3
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTGTNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,10 +55,9 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
public class ASTGTNode extends SimpleNode
{
@@ -77,6 +78,7 @@
}
public boolean evaluate(InternalContextAdapter context)
+ throws MethodInvocationException
{
if (((Integer)jjtGetChild(0).value(context)).intValue() >
((Integer)jjtGetChild(1).value(context)).intValue())
1.7 +7 -5 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java
Index: ASTIfStatement.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTIfStatement.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ASTIfStatement.java 2001/01/03 05:25:51 1.6
+++ ASTIfStatement.java 2001/03/19 17:17:48 1.7
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTIfStatement.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -60,16 +62,16 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTIfStatement.java,v 1.6 2001/01/03 05:25:51 geirm Exp $
+ * @version $Id: ASTIfStatement.java,v 1.7 2001/03/19 17:17:48 geirm Exp $
*/
-package org.apache.velocity.runtime.parser.node;
import java.io.Writer;
import java.io.IOException;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
public class ASTIfStatement extends SimpleNode
{
@@ -90,7 +92,7 @@
}
public boolean render( InternalContextAdapter context, Writer writer)
- throws IOException
+ throws IOException,MethodInvocationException
{
/*
* Check if the #if(expression) construct evaluates to true:
1.3 +8 -5 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java
Index: ASTIntegerRange.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTIntegerRange.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTIntegerRange.java 2001/01/03 05:25:51 1.2
+++ ASTIntegerRange.java 2001/03/19 17:17:49 1.3
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTIntegerRange.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -61,17 +63,17 @@
* what controls the generation of this class.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTIntegerRange.java,v 1.2 2001/01/03 05:25:51 geirm Exp $
+ * @version $Id: ASTIntegerRange.java,v 1.3 2001/03/19 17:17:49 geirm Exp $
*/
-package org.apache.velocity.runtime.parser.node;
-
import java.util.ArrayList;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.Runtime;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTIntegerRange extends SimpleNode {
public ASTIntegerRange(int id)
@@ -98,6 +100,7 @@
* @return Object array of Integers
*/
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
/*
* get the two range ends
1.3 +7 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTLENode.java
Index: ASTLENode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTLENode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTLENode.java 2001/01/03 05:26:17 1.2
+++ ASTLENode.java 2001/03/19 17:17:49 1.3
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTLENode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,11 +55,11 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTLENode extends SimpleNode
{
public ASTLENode(int id)
@@ -77,6 +79,7 @@
}
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
if (((Integer)jjtGetChild(0).value(context)).intValue() <=
((Integer)jjtGetChild(1).value(context)).intValue())
1.3 +7 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java
Index: ASTLTNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTLTNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTLTNode.java 2001/01/03 05:26:17 1.2
+++ ASTLTNode.java 2001/03/19 17:17:50 1.3
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTLTNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,11 +55,11 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTLTNode extends SimpleNode
{
public ASTLTNode(int id)
@@ -77,6 +79,7 @@
}
public boolean evaluate(InternalContextAdapter context)
+ throws MethodInvocationException
{
if (((Integer)jjtGetChild(0).value(context)).intValue() <
((Integer)jjtGetChild(1).value(context)).intValue())
1.4 +8 -6 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTModNode.java
Index: ASTModNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTModNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTModNode.java 2001/01/03 05:26:27 1.3
+++ ASTModNode.java 2001/03/19 17:17:50 1.4
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTModNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -62,15 +64,14 @@
* what controls the generation of this class.
*
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTModNode.java,v 1.3 2001/01/03 05:26:27 geirm Exp $
+ * @version $Id: ASTModNode.java,v 1.4 2001/03/19 17:17:50 geirm Exp $
*/
-
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.Runtime;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTModNode extends SimpleNode
{
public ASTModNode(int id)
@@ -90,6 +91,7 @@
}
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
/*
* get the two args
1.4 +11 -10 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java
Index: ASTMulNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTMulNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTMulNode.java 2001/01/03 05:26:27 1.3
+++ ASTMulNode.java 2001/03/19 17:17:51 1.4
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTMulNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,6 +55,11 @@
* <http://www.apache.org/>.
*/
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.Runtime;
+import org.apache.velocity.runtime.parser.Parser;
+
+import org.apache.velocity.exception.MethodInvocationException;
/**
* Handles integer multiplication
@@ -62,15 +69,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTMulNode.java,v 1.3 2001/01/03 05:26:27 geirm Exp $
+ * @version $Id: ASTMulNode.java,v 1.4 2001/03/19 17:17:51 geirm Exp $
*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import org.apache.velocity.context.InternalContextAdapter;
-import org.apache.velocity.runtime.Runtime;
-import org.apache.velocity.runtime.parser.Parser;
-
public class ASTMulNode extends SimpleNode
{
public ASTMulNode(int id)
@@ -94,6 +94,7 @@
* or if either arg is not an integer
*/
public Object value( InternalContextAdapter context )
+ throws MethodInvocationException
{
/*
* get the two args
1.3 +7 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTNENode.java
Index: ASTNENode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTNENode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTNENode.java 2001/01/03 05:26:44 1.2
+++ ASTNENode.java 2001/03/19 17:17:51 1.3
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTNENode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,11 +56,11 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTNENode extends SimpleNode
{
public ASTNENode(int id)
@@ -78,6 +80,7 @@
}
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
if (jjtGetChild(0).value(context) instanceof Boolean &&
((Boolean)jjtGetChild(0).value(context)).booleanValue() !=
1.3 +7 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java
Index: ASTNotNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTNotNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTNotNode.java 2001/01/03 05:26:44 1.2
+++ ASTNotNode.java 2001/03/19 17:17:52 1.3
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTNotNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,11 +56,11 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTNotNode extends SimpleNode
{
public ASTNotNode(int id)
@@ -78,6 +80,7 @@
}
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
if (jjtGetChild(0).evaluate(context))
return false;
1.4 +7 -4 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java
Index: ASTObjectArray.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTObjectArray.java 2001/01/24 14:59:40 1.3
+++ ASTObjectArray.java 2001/03/19 17:17:52 1.4
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTObjectArray.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,13 +55,13 @@
* <http://www.apache.org/>.
*/
-package org.apache.velocity.runtime.parser.node;
-
import java.util.ArrayList;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.exception.MethodInvocationException;
+
public class ASTObjectArray extends SimpleNode
{
public ASTObjectArray(int id)
@@ -80,6 +82,7 @@
}
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
int size = jjtGetNumChildren();
1.4 +10 -9 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java
Index: ASTOrNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTOrNode.java 2001/01/03 05:27:37 1.3
+++ ASTOrNode.java 2001/03/19 17:17:53 1.4
@@ -1,8 +1,10 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTOrNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +26,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -53,6 +55,10 @@
* <http://www.apache.org/>.
*/
+import org.apache.velocity.runtime.parser.Parser;
+import org.apache.velocity.context.InternalContextAdapter;
+
+import org.apache.velocity.exception.MethodInvocationException;
/**
* Please look at the Parser.jjt file which is
@@ -60,14 +66,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTOrNode.java,v 1.3 2001/01/03 05:27:37 geirm Exp $
+ * @version $Id: ASTOrNode.java,v 1.4 2001/03/19 17:17:53 geirm Exp $
*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import org.apache.velocity.runtime.parser.Parser;
-import org.apache.velocity.context.InternalContextAdapter;
-
public class ASTOrNode extends SimpleNode
{
public ASTOrNode(int id)
@@ -95,6 +95,7 @@
* left || right -> left || right
*/
public boolean evaluate( InternalContextAdapter context)
+ throws MethodInvocationException
{
Node left = jjtGetChild(0);
Node right = jjtGetChild(1);
1.14 +14 -13 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java
Index: ASTSetDirective.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSetDirective.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ASTSetDirective.java 2001/01/29 06:06:27 1.13
+++ ASTSetDirective.java 2001/03/19 17:17:53 1.14
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTSetDirective.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,16 +56,6 @@
* <http://www.apache.org/>.
*/
-/**
- * Node for the #set directive
- *
- * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
- * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTSetDirective.java,v 1.13 2001/01/29 06:06:27 geirm Exp $
- */
-
-package org.apache.velocity.runtime.parser.node;
-
import java.io.IOException;
import java.io.Writer;
@@ -73,6 +65,15 @@
import org.apache.velocity.runtime.parser.Parser;
import org.apache.velocity.runtime.parser.Token;
+import org.apache.velocity.exception.MethodInvocationException;
+
+/**
+ * Node for the #set directive
+ *
+ * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
+ * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
+ * @version $Id: ASTSetDirective.java,v 1.14 2001/03/19 17:17:53 geirm Exp $
+ */
public class ASTSetDirective extends SimpleNode
{
private Node right;
@@ -118,7 +119,7 @@
* puts the value of the RHS into the context under the key of the LHS
*/
public boolean render( InternalContextAdapter context, Writer writer)
- throws IOException
+ throws IOException, MethodInvocationException
{
/*
* get the RHS node, and it's value
1.4 +12 -11 jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java
Index: ASTSubtractNode.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTSubtractNode.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTSubtractNode.java 2001/01/03 05:27:04 1.3
+++ ASTSubtractNode.java 2001/03/19 17:17:54 1.4
@@ -1,9 +1,11 @@
+package org.apache.velocity.runtime.parser.node;
+
/* Generated By:JJTree: Do not edit this line. ASTSubtractNode.java */
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,7 +27,7 @@
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ * 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
@@ -54,6 +56,11 @@
* <http://www.apache.org/>.
*/
+import org.apache.velocity.context.InternalContextAdapter;
+import org.apache.velocity.runtime.Runtime;
+import org.apache.velocity.runtime.parser.Parser;
+
+import org.apache.velocity.exception.MethodInvocationException;
/**
* Handles integer subtraction of nodes (in #set() )
@@ -63,15 +70,8 @@
*
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: ASTSubtractNode.java,v 1.3 2001/01/03 05:27:04 geirm Exp $
-*/
-
-package org.apache.velocity.runtime.parser.node;
-
-import org.apache.velocity.context.InternalContextAdapter;
-import org.apache.velocity.runtime.Runtime;
-import org.apache.velocity.runtime.parser.Parser;
-
+ * @version $Id: ASTSubtractNode.java,v 1.4 2001/03/19 17:17:54 geirm Exp $
+ */
public class ASTSubtractNode extends SimpleNode
{
public ASTSubtractNode(int id)
@@ -96,6 +96,7 @@
* @return Integer(value) or null
*/
public Object value( InternalContextAdapter context)
+ throws MethodInvocationException
{
/*
* get the two args