Author: byron
Date: Wed Feb 18 05:10:28 2009
New Revision: 745381
URL: http://svn.apache.org/viewvc?rev=745381&view=rev
Log:
Fix javadoc errors
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroManager.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Directive.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Macro.java
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeInstance.java
Wed Feb 18 05:10:28 2009
@@ -1609,8 +1609,8 @@
*
* @param name Name of velocimacro
* @param macro root AST node of the parsed macro
- * @param argArray Array of strings, containing the
- * #macro() arguments. the 0th is the name.
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @param sourceTemplate
*
* @since Velocity 1.6
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeServices.java
Wed Feb 18 05:10:28 2009
@@ -368,8 +368,8 @@
*
* @param name Name of velocimacro
* @param macro root AST node of the parsed macro
- * @param argArray Array of strings, containing the
- * #macro() arguments. the 0th is the name.
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @param sourceTemplate
*
* @since Velocity 1.6
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/RuntimeSingleton.java
Wed Feb 18 05:10:28 2009
@@ -420,12 +420,12 @@
*
* @param name Name of a new velocimacro.
* @param macro root AST node of the parsed macro
- * @param argArray Array of strings, containing the
- * #macro() arguments. the 0th argument is the
name.
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @param sourceTemplate The template from which the macro is requested.
* @return boolean True if added, false if rejected for some
* reason (either parameters or permission settings)
- * @see RuntimeInstance#addVelocimacro(String, Node, String[], String)
+ * @see RuntimeInstance#addVelocimacro(String, Node, List, String)
* @since 1.6
*/
public static boolean addVelocimacro(String name, Node macro,
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroFactory.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
Wed Feb 18 05:10:28 2009
@@ -325,7 +325,8 @@
*
* @param name Name of the Macro to add.
* @param macroBody String representation of the macro.
- * @param argArray Macro arguments. First element is the macro name.
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @param sourceTemplate Source template from which the macro gets
registered.
*
* @return true if Macro was registered successfully.
@@ -406,7 +407,8 @@
*
* @param name Name of the Macro to add.
* @param macroBody root node of the parsed macro AST
- * @param argArray Name of the macro arguments. First element is the macro
name.
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @param sourceTemplate Source template from which the macro gets
registered.
* @return true if Macro was registered successfully.
* @since 1.6
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroManager.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroManager.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroManager.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/VelocimacroManager.java
Wed Feb 18 05:10:28 2009
@@ -93,7 +93,8 @@
*
* @param vmName Name of the new VelociMacro.
* @param macroBody String representation of the macro body.
- * @param argArray Array of macro parameters, first parameter is the macro
name.
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @param namespace The namespace/template from which this macro has been
loaded.
* @return Whether everything went okay.
*/
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Directive.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Directive.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Directive.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Directive.java
Wed Feb 18 05:10:28 2009
@@ -139,8 +139,8 @@
* errors in IDEs.
* @param argtypes type, Array of argument types of each argument to the
directive
* for example ParserTreeConstants.JJTWORD
- * @param t, token of directive
- * @param templateName, the name of the template this directive is
referenced in.
+ * @param t token of directive
+ * @param templateName the name of the template this directive is
referenced in.
*/
public void checkArgs(ArrayList<Integer> argtypes, Token t, String
templateName)
throws ParseException
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Macro.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Macro.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Macro.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/Macro.java
Wed Feb 18 05:10:28 2009
@@ -229,14 +229,33 @@
return macroArgs;
}
+
+ /**
+ * MacroArgs holds the information for a single argument in a
+ * macro definition. The arguments for a macro are passed around as a
+ * list of these objects.
+ */
+ public static class MacroArg
+ {
+ /**
+ * Name of the argument with '$' stripped off
+ */
+ public String name = null;
+
+ /**
+ * If the argument was given a default value, then this contains
+ * the base of the AST tree of the value. Otherwise it is null.
+ */
+ public Node defaultVal = null;
+ }
/**
* For debugging purposes. Formats the arguments from
* <code>argArray</code> and appends them to <code>buf</code>.
*
* @param buf A StringBuffer. If null, a new StringBuffer is allocated.
- * @param argArray The Macro arguments to format
- *
+ * @param macroArgs Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
* @return A StringBuffer containing the formatted arguments. If a
StringBuffer
* has passed in as buf, this method returns it.
* @since 1.5
@@ -258,13 +277,6 @@
}
ret.append(" )");
return ret;
- }
-
-
- public static class MacroArg
- {
- public String name = null;
- public Node defaultVal = null;
- }
+ }
}
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?rev=745381&r1=745380&r2=745381&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
Wed Feb 18 05:10:28 2009
@@ -27,7 +27,6 @@
import org.apache.velocity.context.ProxyVMContext;
import org.apache.velocity.exception.MacroOverflowException;
import org.apache.velocity.exception.MethodInvocationException;
-import org.apache.velocity.exception.TemplateInitException;
import org.apache.velocity.exception.VelocityException;
import org.apache.velocity.runtime.Renderable;
import org.apache.velocity.runtime.RuntimeConstants;
@@ -87,8 +86,8 @@
/**
* sets the array of arguments specified in the macro definition
- *
- * @param arr
+ * @param args Array of macro arguments, containing the
+ * #macro() arguments and default values. the 0th is the name.
*/
public void setMacroArgs(List<Macro.MacroArg> args)
{