aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src
diff options
context:
space:
mode:
authorClaude Brisson <cbrisson@apache.org>2019-03-11 11:09:53 +0000
committerClaude Brisson <cbrisson@apache.org>2019-03-11 11:09:53 +0000
commitcff1b533e2eed743724dbb667cdffd186436e50d (patch)
tree651396cd1d10187b63bc8871d91f98ecfc8fe794 /velocity-engine-core/src
parent475102e1a631ef896f85db7f750533211b9d0b11 (diff)
downloadapache-velocity-engine-cff1b533e2eed743724dbb667cdffd186436e50d.tar.gz
[engine] javadoc and indentation fixes
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/trunk@1855206 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src')
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/Template.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java28
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java11
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java11
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java10
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/io/UnicodeInputStream.java21
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java12
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java14
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java1
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java23
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java1
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java59
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java18
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java147
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java25
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java9
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java25
-rwxr-xr-xvelocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java9
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java11
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java3
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java11
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java31
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/DeprecationAwareExtProperties.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java7
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassFieldMap.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassMap.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandler.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java2
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/TypeConversionHandler.java1
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java13
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectPublicFields.java17
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java3
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java2
62 files changed, 486 insertions, 145 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/Template.java b/velocity-engine-core/src/main/java/org/apache/velocity/Template.java
index e4f4c110..7528e88a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/Template.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/Template.java
@@ -103,7 +103,6 @@ public class Template extends Resource
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
- * @throws IOException problem reading input stream
*/
public boolean process()
throws ResourceNotFoundException, ParseErrorException
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
index dd18421e..963045b5 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/VelocityEngine.java
@@ -65,6 +65,7 @@ public class VelocityEngine implements RuntimeConstants
/**
* Construct a VelocityEngine with the initial properties defined in the file
* propsFilename
+ * @param propsFilename properties filename
*/
public VelocityEngine(String propsFilename)
{
@@ -73,6 +74,7 @@ public class VelocityEngine implements RuntimeConstants
/**
* Construct a VelocityEngine instance with the specified initial properties.
+ * @param p properties
*/
public VelocityEngine(Properties p)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java
index 4ff0bb9a..473b0c81 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventCartridge.java
@@ -269,7 +269,9 @@ public class EventCartridge
/**
* Call reference insertion handlers
- *
+ * @param context
+ * @param reference
+ * @param value
* @return value returned by handlers
* @since 2.0
*/
@@ -295,7 +297,11 @@ public class EventCartridge
/**
* Call method exception event handler
- *
+ * @param context
+ * @param claz
+ * @param method
+ * @param e exception
+ * @param info template name, line and column infos
* @return value returned by handler
* @since 2.0
*/
@@ -311,6 +317,10 @@ public class EventCartridge
/**
* Call include event handlers
*
+ * @param context
+ * @param includeResourcePath
+ * @param currentResourcePath
+ * @param directiveName
* @return include path
* @since 2.0
*/
@@ -331,6 +341,11 @@ public class EventCartridge
/**
* Call invalid reference handlers for an invalid getter
*
+ * @param context
+ * @param reference
+ * @param object
+ * @param property
+ * @param info
* @return value returned by handlers
* @since 2.0
*/
@@ -352,6 +367,10 @@ public class EventCartridge
/**
* Call invalid reference handlers for an invalid setter
*
+ * @param context
+ * @param leftreference
+ * @param rightreference
+ * @param info
* @return whether to stop further chaining in the next cartridge
* @since 2.0
*/
@@ -370,6 +389,11 @@ public class EventCartridge
/**
* Call invalid reference handlers for an invalid method call
*
+ * @param context
+ * @param reference
+ * @param object
+ * @param method
+ * @param info
* @return value returned by handlers
* @since 2.0
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java
index 071dc97a..fbe61147 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandlerUtil.java
@@ -88,6 +88,7 @@ public class EventHandlerUtil {
* Exception thrown by the method
* @param rsvc current instance of RuntimeServices
* @param context The internal context adapter.
+ * @param info exception location informations
* @return Object to return as method result
* @throws Exception
* to be wrapped and propagated to app
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java
index eb39d8a7..fcc8f663 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/app/event/implement/IncludeNotFound.java
@@ -35,14 +35,11 @@ import org.slf4j.Logger;
*
* <P>By default, the name of the replacement page is "notfound.vm", however this
* page name can be changed by setting the Velocity property
- * <code>eventhandler.include.notfound</code>, for example:
- * <code>
- * <PRE>
+ * <code>eventhandler.include.notfound</code>, for example:</p>
+ * <pre><code>
* eventhandler.include.notfound = error.vm
- * </PRE>
- * </code>
- * </p><p>
- * The name of the missing resource is put into the Velocity context, under the
+ * </code></pre>
+ * <p>The name of the missing resource is put into the Velocity context, under the
* key "missingResource", so that the "notfound" template can report the missing
* resource with a Velocity reference, like:
* <code>$missingResource</code>
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java
index 5706142e..0092f517 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/context/InternalWrapperContext.java
@@ -42,17 +42,24 @@ public interface InternalWrapperContext
InternalContextAdapter getBaseContext();
/**
- * Retrieve the specified key value pair from the given scope.
+ * Place a key value pair into the context.
+ * @param key
+ * @param value
+ * @return previous value
*/
Object put(String key, Object value);
/**
- * Place key value pair into the context of the specified scope.
+ * Retrieve the specified valuefrom the given key.
+ * @param key
+ * @return found value
*/
Object get(String key);
/**
* Tests if the key exists in the specified scope
+ * @param key
+ * @return true if key exists
*/
boolean containsKey(String key);
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java
index c38077fa..0c16bc33 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/MethodInvocationException.java
@@ -51,10 +51,12 @@ public class MethodInvocationException extends VelocityException implements Exte
* CTOR - wraps the passed in exception for
* examination later
*
- * @param message
- * @param e Throwable that we are wrapping
- * @param methodName name of method that threw the exception
- * @param templateName The name of the template where the exception occurred.
+ * @param message
+ * @param e Throwable that we are wrapping
+ * @param methodName name of method that threw the exception
+ * @param templateName The name of the template where the exception occurred
+ * @param lineNumber line number
+ * @param columnNumber column number
*/
public MethodInvocationException(final String message, final Throwable e, final String methodName, final String templateName, final int lineNumber, final int columnNumber)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java
index faba2ae1..824675c4 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ParseErrorException.java
@@ -86,6 +86,7 @@ public class ParseErrorException extends VelocityException
* Create a ParseErrorException with the given ParseException.
*
* @param pex the parsing exception
+ * @param templName
* @since 1.5
*/
public ParseErrorException(ParseException pex, String templName)
@@ -133,6 +134,7 @@ public class ParseErrorException extends VelocityException
* Create a ParseErrorException with the given ParseException.
*
* @param pex the parsing exception
+ * @param templName
* @since 1.5
*/
public ParseErrorException(VelocityException pex, String templName)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java
index f900380d..807acb02 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/exception/ResourceNotFoundException.java
@@ -39,6 +39,7 @@ public class ResourceNotFoundException extends VelocityException
private static final long serialVersionUID = -4287732191458420347L;
/**
+ * @param exceptionMessage
* @see VelocityException#VelocityException(String)
*/
public ResourceNotFoundException(final String exceptionMessage)
@@ -47,6 +48,8 @@ public class ResourceNotFoundException extends VelocityException
}
/**
+ * @param exceptionMessage
+ * @param t
* @see VelocityException#VelocityException(String, Throwable)
* @since 1.5
*/
@@ -56,6 +59,7 @@ public class ResourceNotFoundException extends VelocityException
}
/**
+ * @param t
* @see VelocityException#VelocityException(Throwable)
* @since 1.5
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/io/UnicodeInputStream.java b/velocity-engine-core/src/main/java/org/apache/velocity/io/UnicodeInputStream.java
index c2a0d20a..5ab3500e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/io/UnicodeInputStream.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/io/UnicodeInputStream.java
@@ -87,6 +87,8 @@ public class UnicodeInputStream
* Creates a new UnicodeInputStream object. Skips a BOM which defines the file encoding.
*
* @param inputStream The input stream to use for reading.
+ * @throws IllegalStateException
+ * @throws IOException
*/
public UnicodeInputStream(final InputStream inputStream)
throws IllegalStateException, IOException
@@ -99,6 +101,8 @@ public class UnicodeInputStream
*
* @param inputStream The input stream to use for reading.
* @param skipBOM If this is set to true, a BOM read from the stream is discarded. This parameter should normally be true.
+ * @throws IllegalStateException
+ * @throws IOException
*/
public UnicodeInputStream(final InputStream inputStream, boolean skipBOM)
throws IllegalStateException, IOException
@@ -145,6 +149,7 @@ public class UnicodeInputStream
* is undefined.
*
* @return The encoding of this streams contents as decided by the BOM or null if no BOM was found.
+ * @throws IOException
*/
protected String readEncoding()
throws IOException
@@ -261,6 +266,7 @@ public class UnicodeInputStream
}
/**
+ * @throws IOException
* @see java.io.InputStream#close()
*/
public void close()
@@ -270,6 +276,7 @@ public class UnicodeInputStream
}
/**
+ * @throws IOException
* @see java.io.InputStream#available()
*/
public int available()
@@ -279,6 +286,7 @@ public class UnicodeInputStream
}
/**
+ * @param readlimit
* @see java.io.InputStream#mark(int)
*/
public void mark(final int readlimit)
@@ -287,6 +295,7 @@ public class UnicodeInputStream
}
/**
+ * @return mark supported
* @see java.io.InputStream#markSupported()
*/
public boolean markSupported()
@@ -295,6 +304,7 @@ public class UnicodeInputStream
}
/**
+ * @return read char
* @see java.io.InputStream#read()
*/
public int read()
@@ -304,6 +314,8 @@ public class UnicodeInputStream
}
/**
+ * @param b buffer
+ * @return read chars count
* @see java.io.InputStream#read(byte[])
*/
public int read(final byte [] b)
@@ -313,6 +325,10 @@ public class UnicodeInputStream
}
/**
+ * @param b buffer
+ * @param off offset
+ * @param len length
+ * @return reac char
* @see java.io.InputStream#read(byte[], int, int)
*/
public int read(final byte [] b, final int off, final int len)
@@ -331,6 +347,8 @@ public class UnicodeInputStream
}
/**
+ * @param n
+ * @return skipped count
* @see java.io.InputStream#skip(long)
*/
public long skip(final long n)
@@ -342,6 +360,9 @@ public class UnicodeInputStream
/**
* Helper function to compare encodings
+ * @param left
+ * @param right
+ * @return true for same encoding
*/
public static boolean sameEncoding(String left, String right)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java b/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java
index 40817ca4..8f66008e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/io/VelocityWriter.java
@@ -103,7 +103,7 @@ public final class VelocityWriter extends Writer implements Filter
* @param sz Output-buffer size, a positive integer
* @param autoFlush
*
- * @exception IllegalArgumentException If sz is <= 0
+ * @exception IllegalArgumentException If sz is &lt;= 0
*/
public VelocityWriter(Writer writer, int sz, boolean autoFlush)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
index 8350299c..3386824d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
@@ -73,16 +73,16 @@ import java.util.Properties;
import java.util.Set;
/**
- * This is the Runtime system for Velocity. It is the
+ * <p>This is the Runtime system for Velocity. It is the
* single access point for all functionality in Velocity.
* It adheres to the mediator pattern and is the only
* structure that developers need to be familiar with
- * in order to get Velocity to perform.
+ * in order to get Velocity to perform.</p>
*
- * The Runtime will also cooperate with external
+ * <p>The Runtime will also cooperate with external
* systems, which can make all needed setProperty() calls
- * before calling init().
- *
+ * before calling init().</p>
+ * <pre>
* -----------------------------------------------------------------------
* N O T E S O N R U N T I M E I N I T I A L I Z A T I O N
* -----------------------------------------------------------------------
@@ -528,6 +528,7 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
/**
* Add all properties contained in the file fileName to the RuntimeInstance properties
+ * @param fileName
*/
public void setProperties(String fileName)
{
@@ -553,6 +554,7 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
/**
* Add all the properties in props to the RuntimeInstance properties
+ * @param props
*/
public void setProperties(Properties props)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
index 553337fe..aa99b2a5 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
@@ -182,7 +182,6 @@ public interface RuntimeServices
* @throws ParseErrorException The template could not be parsed.
* @throws MethodInvocationException A method on a context object could not be invoked.
* @throws ResourceNotFoundException A referenced resource could not be loaded.
- * @throws IOException While rendering to the writer, an I/O problem occurred.
* @since Velocity 1.6
*/
boolean evaluate(Context context, Writer out,
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
index 29164f81..71739a0c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeSingleton.java
@@ -38,16 +38,16 @@ import java.util.List;
import java.util.Properties;
/**
- * This is the Runtime system for Velocity. It is the
+ * <p>This is the Runtime system for Velocity. It is the
* single access point for all functionality in Velocity.
* It adheres to the mediator pattern and is the only
* structure that developers need to be familiar with
- * in order to get Velocity to perform.
+ * in order to get Velocity to perform.</p>
*
- * The Runtime will also cooperate with external
+ * <p>The Runtime will also cooperate with external
* systems, which can make all needed setProperty() calls
- * before calling init().
- *
+ * before calling init().</p>
+ * <pre>
* -----------------------------------------------------------------------
* N O T E S O N R U N T I M E I N I T I A L I Z A T I O N
* -----------------------------------------------------------------------
@@ -419,6 +419,7 @@ public class RuntimeSingleton implements RuntimeConstants
* @param macroArgs Array of macro arguments, containing the
* #macro() arguments and default values. the 0th is the name.
* @param definingTemplate Template containing the definition of the macro.
+ * @return true for success
*/
public static boolean addVelocimacro(String name, Node macro,
List<Macro.MacroArg> macroArgs, Template definingTemplate)
@@ -501,7 +502,7 @@ public class RuntimeSingleton implements RuntimeConstants
/**
* Directly set the ExtProperties configuration object
- *
+ * @param configuration
* @see RuntimeInstance#setConfiguration(ExtProperties)
*/
public static void setConfiguration(ExtProperties configuration)
@@ -509,7 +510,6 @@ public class RuntimeSingleton implements RuntimeConstants
ri.setConfiguration(configuration);
}
-
/**
* Return the velocity runtime configuration object.
*
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java
index 994f47d6..da20fa1f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/VelocimacroManager.java
@@ -293,6 +293,7 @@ public class VelocimacroManager
}
/**
+ * @param is
* @since 1.6
*/
public void setInlineReplacesGlobal(boolean is)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java
index 5fccdaae..72c9c13f 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Block.java
@@ -51,6 +51,7 @@ public abstract class Block extends Directive
/**
* Return type of this directive.
+ * @return type, DirectiveConstants.BLOCK or DirectiveConstants.LINE
*/
public int getType()
{
@@ -59,6 +60,9 @@ public abstract class Block extends Directive
/**
* simple init - get the key
+ * @param rs
+ * @param context
+ * @param node
*/
public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
throws TemplateInitException
@@ -74,6 +78,12 @@ public abstract class Block extends Directive
block = node.jjtGetChild(node.jjtGetNumChildren() - 1);
}
+ /**
+ * renders block directive
+ * @param context
+ * @param writer
+ * @return success status
+ */
public boolean render(InternalContextAdapter context, Writer writer)
{
preRender(context);
@@ -106,6 +116,8 @@ public abstract class Block extends Directive
* Creates a string identifying the source and location of the block
* definition, and the current template being rendered if that is
* different.
+ * @param context
+ * @return id string
*/
protected String id(InternalContextAdapter context)
{
@@ -129,6 +141,10 @@ public abstract class Block extends Directive
private Block parent;
private int depth;
+ /**
+ * @param context
+ * @param parent
+ */
public Reference(InternalContextAdapter context, Block parent)
{
this.context = context;
@@ -137,6 +153,9 @@ public abstract class Block extends Directive
/**
* Render the AST of this block into the writer using the context.
+ * @param context
+ * @param writer
+ * @return success status
*/
public boolean render(InternalContextAdapter context, Writer writer)
{
@@ -164,12 +183,16 @@ public abstract class Block extends Directive
/**
* Makes #if( $blockRef ) true without rendering, so long as we aren't beyond max depth.
+ * @return reference value as boolean
*/
public boolean getAsBoolean()
{
return depth <= parent.maxDepth;
}
+ /**
+ * @return rendered string
+ */
public String toString()
{
Writer writer = new StringBuilderWriter();
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java
index ab747df7..bc222c7d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/BlockMacro.java
@@ -81,6 +81,7 @@ public class BlockMacro extends Block
* Initializes the directive.
*
* @param rs
+ * @param macroName
* @param context
* @param node
* @throws TemplateInitException
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java
index 33320bcb..2cbf2d78 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Directive.java
@@ -85,6 +85,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable
* Allows the template location to be set.
* @param line
* @param column
+ * @param template
*/
public void setLocation(int line, int column, Template template)
{
@@ -173,6 +174,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable
* for example ParserTreeConstants.JJTWORD
* @param t token of directive
* @param templateName the name of the template this directive is referenced in.
+ * @throws ParseException
*/
public void checkArgs(ArrayList<Integer> argtypes, Token t, String templateName)
throws ParseException
@@ -199,6 +201,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable
/**
* This creates and places the scope control for this directive
* into the context (if scope provision is turned on).
+ * @param context
*/
protected void preRender(InternalContextAdapter context)
{
@@ -210,6 +213,10 @@ public abstract class Directive implements DirectiveConstants, Cloneable
}
}
+ /**
+ * @param prev
+ * @return scope
+ */
protected Scope makeScope(Object prev)
{
return new Scope(this, prev);
@@ -218,6 +225,7 @@ public abstract class Directive implements DirectiveConstants, Cloneable
/**
* This cleans up any scope control for this directive after rendering,
* assuming the scope control was turned on.
+ * @param context
*/
protected void postRender(InternalContextAdapter context)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
index 7356a3ae..ab09f7fd 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Foreach.java
@@ -153,6 +153,9 @@ public class Foreach extends Directive
* are set locally or not. So, those in favor of VELOCITY-285, can
* make that happen easily by overriding this and having it use
* context.localPut(k,v). See VELOCITY-630 for more on this.
+ * @param context
+ * @param key
+ * @param value
*/
protected void put(InternalContextAdapter context, String key, Object value)
{
@@ -161,6 +164,9 @@ public class Foreach extends Directive
/**
* Retrieve the contextual iterator.
+ * @param iterable
+ * @param node
+ * @return iterator
*/
protected Iterator getIterator(Object iterable, Node node)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
index cbd2172f..9481b05a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
@@ -118,6 +118,7 @@ public class RuntimeMacro extends Directive
* just save the values to use at the render time.
*
* @param rs runtime services
+ * @param name macro name
* @param context InternalContextAdapter
* @param node node containing the macro call
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java
index 3026a747..beedf05f 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/Scope.java
@@ -41,6 +41,10 @@ public class Scope extends AbstractMap
private Info info;
protected final Object owner;
+ /**
+ * @param owner
+ * @param previous
+ */
public Scope(Object owner, Object previous)
{
this.owner = owner;
@@ -66,11 +70,19 @@ public class Scope extends AbstractMap
return storage;
}
+ /**
+ * @return entry set
+ */
public Set entrySet()
{
return getStorage().entrySet();
}
+ /**
+ * getter
+ * @param key
+ * @return found value
+ */
@Override
public Object get(Object key)
{
@@ -82,6 +94,12 @@ public class Scope extends AbstractMap
return o;
}
+ /**
+ * setter
+ * @param key
+ * @param value
+ * @return previous value
+ */
@Override
public Object put(Object key, Object value)
{
@@ -92,6 +110,9 @@ public class Scope extends AbstractMap
* Convenience method to call put(key,val) in a template
* without worrying about what is returned/rendered by the call.
* This should ALWAYS return an empty string.
+ * @param key
+ * @param value
+ * @return empty string
*/
public String set(Object key, Object value)
{
@@ -112,6 +133,7 @@ public class Scope extends AbstractMap
* that are stacked up. This is the distance between this
* instance and the topmost instance, plus one. This value
* will never be negative or zero.
+ * @return depth
*/
protected int getDepth()
{
@@ -125,6 +147,7 @@ public class Scope extends AbstractMap
/**
* Returns the topmost parent control reference, retrieved
* by simple recursion on {@link #getParent}.
+ * @return top-most scope
*/
public Scope getTopmost()
{
@@ -138,6 +161,7 @@ public class Scope extends AbstractMap
/**
* Returns the parent control reference overridden by the placement
* of this instance in the context.
+ * @return parent scope
*/
public Scope getParent()
{
@@ -149,6 +173,7 @@ public class Scope extends AbstractMap
* of this instance in the context. If there was none (as is hoped),
* then this will return null. This never returns parent controls;
* those are returned by {@link #getParent}.
+ * @return replaced reference value, or null
*/
public Object getReplaced()
{
@@ -161,6 +186,7 @@ public class Scope extends AbstractMap
/**
* Returns info about the current scope for debugging purposes.
+ * @return template debugging infos
*/
public Info getInfo()
{
@@ -181,6 +207,11 @@ public class Scope extends AbstractMap
private Directive directive;
private Template template;
+ /**
+ * c'tor
+ * @param scope
+ * @param owner
+ */
public Info(Scope scope, Object owner)
{
if (owner instanceof Directive)
@@ -194,6 +225,10 @@ public class Scope extends AbstractMap
this.scope = scope;
}
+ /**
+ * name getter
+ * @return name
+ */
public String getName()
{
if (directive != null)
@@ -207,6 +242,10 @@ public class Scope extends AbstractMap
return null;
}
+ /**
+ * type getter
+ * @return scope type
+ */
public String getType()
{
if (directive != null)
@@ -226,11 +265,19 @@ public class Scope extends AbstractMap
return null;
}
+ /**
+ * current depth
+ * @return depth
+ */
public int getDepth()
{
return scope.getDepth();
}
+ /**
+ * template name getter
+ * @return template name
+ */
public String getTemplate()
{
if (directive != null)
@@ -244,6 +291,10 @@ public class Scope extends AbstractMap
return null;
}
+ /**
+ * line getter
+ * @return line number
+ */
public int getLine()
{
if (directive != null)
@@ -253,6 +304,10 @@ public class Scope extends AbstractMap
return 0;
}
+ /**
+ * column getter
+ * @return column number
+ */
public int getColumn()
{
if (directive != null)
@@ -262,6 +317,10 @@ public class Scope extends AbstractMap
return 0;
}
+ /**
+ * string representation getter
+ * @return string representation
+ */
public String toString()
{
StringBuilder sb = new StringBuilder();
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
index 258e4fbd..0b412dc4 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
@@ -112,6 +112,7 @@ public class VelocimacroProxy extends Directive
/**
* Return the list of macro arguments associated with this macro
+ * @return macro arguments
*/
public List<Macro.MacroArg> getMacroArgs()
{
@@ -128,7 +129,6 @@ public class VelocimacroProxy extends Directive
/**
* returns the number of ars needed for this VM
- *
* @return The number of ars needed for this VM
*/
public int getNumArgs()
@@ -138,6 +138,7 @@ public class VelocimacroProxy extends Directive
/**
* Initialize members of VelocimacroProxy. called from MacroEntry
+ * @param rs runtime services
*/
public void init(RuntimeServices rs)
{
@@ -156,6 +157,14 @@ public class VelocimacroProxy extends Directive
preserveArgumentsLiterals = rsvc.getBoolean(RuntimeConstants.VM_PRESERVE_ARGUMENTS_LITERALS, false);
}
+ /**
+ * Render the macro AST node
+ * @param context
+ * @param writer
+ * @param node
+ * @return success status
+ * @throws IOException
+ */
public boolean render(InternalContextAdapter context, Writer writer, Node node)
throws IOException
{
@@ -259,6 +268,8 @@ public class VelocimacroProxy extends Directive
/**
* Check whether the number of arguments given matches the number defined.
+ * @param node
+ * @param callArgNum
*/
protected void checkArgumentCount(Node node, int callArgNum)
{
@@ -280,6 +291,7 @@ public class VelocimacroProxy extends Directive
/**
* check that we aren't already at the max call depth and throws
* a MacroOverflowException if we are there.
+ * @param context
*/
protected void checkDepth(InternalContextAdapter context)
{
@@ -316,6 +328,10 @@ public class VelocimacroProxy extends Directive
* the argument names. Store and return an array of old and new values
* paired for each argument name, for later cleanup. Also, put literal
* representations of arguments which evaluate to null in the context.
+ * @param context
+ * @param node
+ * @param callArgNum
+ * @return macro arguments values
*/
protected Object[] handleArgValues(InternalContextAdapter context,
Node node, int callArgNum)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java
index 3445800c..de96c43f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/CharStream.java
@@ -34,81 +34,94 @@ package org.apache.velocity.runtime.parser;
* operation.
*/
-public interface CharStream {
+public interface CharStream
+{
+ /**
+ * Returns the next character from the selected input. The method
+ * of selecting the input is the responsibility of the class
+ * implementing this interface. Can throw any java.io.IOException.
+ * @return read char
+ * @throws java.io.IOException
+ */
+ char readChar() throws java.io.IOException;
- /**
- * Returns the next character from the selected input. The method
- * of selecting the input is the responsibility of the class
- * implementing this interface. Can throw any java.io.IOException.
- */
- char readChar() throws java.io.IOException;
+ /**
+ * Returns the column number of the last character for current token (being
+ * matched after the last call to BeginTOken).
+ * @return ending column number
+ */
+ int getEndColumn();
- /**
- * Returns the column number of the last character for current token (being
- * matched after the last call to BeginTOken).
- */
- int getEndColumn();
+ /**
+ * Returns the line number of the last character for current token (being
+ * matched after the last call to BeginTOken).
+ * @return ending line number
+ */
+ int getEndLine();
- /**
- * Returns the line number of the last character for current token (being
- * matched after the last call to BeginTOken).
- */
- int getEndLine();
+ /**
+ * Returns the column number of the first character for current token (being
+ * matched after the last call to BeginTOken).
+ * @return starting column number
+ */
+ int getBeginColumn();
- /**
- * Returns the column number of the first character for current token (being
- * matched after the last call to BeginTOken).
- */
- int getBeginColumn();
+ /**
+ * Returns the line number of the first character for current token (being
+ * matched after the last call to BeginTOken).
+ * @return starting line number
+ */
+ int getBeginLine();
- /**
- * Returns the line number of the first character for current token (being
- * matched after the last call to BeginTOken).
- */
- int getBeginLine();
+ /**
+ * Backs up the input stream by amount steps. Lexer calls this method if it
+ * had already read some characters, but could not use them to match a
+ * (longer) token. So, they will be used again as the prefix of the next
+ * token and it is the implemetation's responsibility to do this right.
+ * @param amount
+ */
+ void backup(int amount);
- /**
- * Backs up the input stream by amount steps. Lexer calls this method if it
- * had already read some characters, but could not use them to match a
- * (longer) token. So, they will be used again as the prefix of the next
- * token and it is the implemetation's responsibility to do this right.
- */
- void backup(int amount);
+ /**
+ * Returns the next character that marks the beginning of the next token.
+ * All characters must remain in the buffer between two successive calls
+ * to this method to implement backup correctly.
+ * @return next token start char
+ * @throws java.io.IOException
+ */
+ char BeginToken() throws java.io.IOException;
- /**
- * Returns the next character that marks the beginning of the next token.
- * All characters must remain in the buffer between two successive calls
- * to this method to implement backup correctly.
- */
- char BeginToken() throws java.io.IOException;
+ /**
+ * Returns a string made up of characters from the marked token beginning
+ * to the current buffer position. Implementations have the choice of returning
+ * anything that they want to. For example, for efficiency, one might decide
+ * to just return null, which is a valid implementation.
+ * @return token image
+ */
+ String GetImage();
- /**
- * Returns a string made up of characters from the marked token beginning
- * to the current buffer position. Implementations have the choice of returning
- * anything that they want to. For example, for efficiency, one might decide
- * to just return null, which is a valid implementation.
- */
- String GetImage();
+ /**
+ * <p>Returns an array of characters that make up the suffix of length 'len' for
+ * the currently matched token. This is used to build up the matched string
+ * for use in actions in the case of MORE. A simple and inefficient
+ * implementation of this is as follows :</p>
+ * <pre><code>
+ * {
+ * String t = GetImage();
+ * return t.substring(t.length() - len, t.length()).toCharArray();
+ * }
+ * </code></pre>
+ * @param len suffix len
+ * @return suffix
+ */
+ char[] GetSuffix(int len);
- /**
- * Returns an array of characters that make up the suffix of length 'len' for
- * the currently matched token. This is used to build up the matched string
- * for use in actions in the case of MORE. A simple and inefficient
- * implementation of this is as follows :
- *
- * {
- * String t = GetImage();
- * return t.substring(t.length() - len, t.length()).toCharArray();
- * }
- */
- char[] GetSuffix(int len);
-
- /**
- * The lexer calls this function to indicate that it is done with the stream
- * and hence implementations can free any resources held by this class.
- * Again, the body of this function can be just empty and it will not
- * affect the lexer's operation.
- */
- void Done();
+ /**
+ * The lexer calls this function to indicate that it is done with the stream
+ * and hence implementations can free any resources held by this class.
+ * Again, the body of this function can be just empty and it will not
+ * affect the lexer's operation.
+ */
+ void Done();
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java
index 7af197ba..5cc68c62 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/ParseException.java
@@ -36,7 +36,7 @@ public class ParseException extends Exception {
private static final long serialVersionUID = -309603325673449381L;
/**
- * This constructor is used by the method "generateParseException"
+ * <p>This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
* a new object of this type with the fields "currentToken",
* "expectedTokenSequences", and "tokenImage" set. The boolean
@@ -44,8 +44,13 @@ public class ParseException extends Exception {
* this constructor was used to create this object.
* This constructor calls its super class with the empty string
* to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
+ * print the error message in the form:</p>
+ * <pre>
+ * ParseException: &lt;result of getMessage&gt;
+ * </pre>
+ * @param currentTokenVal
+ * @param expectedTokenSequencesVal
+ * @param tokenImageVal
*/
public ParseException(Token currentTokenVal,
int[][] expectedTokenSequencesVal,
@@ -68,12 +73,21 @@ public class ParseException extends Exception {
* relevant information. The JavaCC generated code does not use
* these constructors.
*/
-
public ParseException() {
super();
specialConstructor = false;
}
+ /**
+ * The following constructors are for use by you for whatever
+ * purpose you can think of. Constructing the exception in this
+ * manner makes the exception behave in the normal way - i.e., as
+ * documented in the class "Throwable". The fields "errorToken",
+ * "expectedTokenSequences", and "tokenImage" do not contain
+ * relevant information. The JavaCC generated code does not use
+ * these constructors.
+ * @param message
+ */
public ParseException(String message) {
super(message);
specialConstructor = false;
@@ -116,6 +130,7 @@ public class ParseException extends Exception {
* from the parser), then this method is called during the printing
* of the final stack trace, and hence the correct error message
* gets displayed.
+ * @return message
*/
public String getMessage() {
if (!specialConstructor) {
@@ -170,6 +185,8 @@ public class ParseException extends Exception {
* Used to convert raw characters to their escaped version
* when these raw version cannot be used as part of an ASCII
* string literal.
+ * @param str raw characters
+ * @return escaped string
*/
protected String add_escapes(String str) {
StringBuilder retval = new StringBuilder();
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java
index fe2c7ca6..be511d63 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java
@@ -60,7 +60,7 @@ public class TemplateParseException
}
/**
- * This constructor is used by the method "generateParseException"
+ * <p>This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
* a new object of this type with the fields "currentToken",
* "expectedTokenSequences", and "tokenImage" set. The boolean
@@ -68,8 +68,10 @@ public class TemplateParseException
* this constructor was used to create this object.
* This constructor calls its super class with the empty string
* to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
+ * print the error message in the form:</p>
+ * <pre>
+ * ParseException: &lt;result of getMessage&gt;
+ * </pre>
* @param currentTokenVal
* @param expectedTokenSequencesVal
* @param tokenImageVal
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java
index 84ab7be9..c47a3c73 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTAndNode.java
@@ -80,9 +80,11 @@ public class ASTAndNode extends ASTLogicalOperator
/**
* logical and :
- * null && right = false
- * left && null = false
- * null && null = false
+ * <pre>
+ * null &amp;&amp; right = false
+ * left &amp;&amp; null = false
+ * null &amp;&amp; null = false
+ * </pre>
* @param context
* @return True if both sides are true.
* @throws MethodInvocationException
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java
index a0ee06a8..d65d0abc 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTComparisonNode.java
@@ -84,6 +84,9 @@ public abstract class ASTComparisonNode extends ASTBinaryOperator
/**
* Always false by default, != and == subclasses must override this.
+ * @param left
+ * @param right
+ * @return comparison result
*/
public boolean compareNull(Object left, Object right)
{
@@ -101,6 +104,12 @@ public abstract class ASTComparisonNode extends ASTBinaryOperator
return false;
}
+ /**
+ * compare numbers
+ * @param left
+ * @param right
+ * @return comparison result
+ */
public Boolean compareNumbers(Object left, Object right)
{
try
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java
index 72d6e20f..9d90ca7f 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTIndex.java
@@ -61,16 +61,29 @@ public class ASTIndex extends SimpleNode
*/
protected boolean strictRef = false;
+ /**
+ * @param i
+ */
public ASTIndex(int i)
{
super(i);
}
+ /**
+ * @param p
+ * @param i
+ */
public ASTIndex(Parser p, int i)
{
super(p, i);
}
+ /**
+ * @param context
+ * @param data
+ * @return data
+ * @throws TemplateInitException
+ */
public Object init(InternalContextAdapter context, Object data)
throws TemplateInitException
{
@@ -80,17 +93,19 @@ public class ASTIndex extends SimpleNode
return data;
}
-
-
private final static Object[] noParams = {};
private final static Class[] noTypes = {};
+
/**
* If argument is an Integer and negative, then return (o.size() - argument).
* Otherwise return the original argument. We use this to calculate the true
* index of a negative index e.g., $foo[-1]. If no size() method is found on the
* 'o' object, then we throw an VelocityException.
+ * @param argument
+ * @param o
* @param context Used to access the method cache.
* @param node ASTNode used for error reporting.
+ * @return found object
*/
public static Object adjMinusIndexArg(Object argument, Object o,
InternalContextAdapter context, SimpleNode node)
@@ -141,6 +156,12 @@ public class ASTIndex extends SimpleNode
return argument;
}
+ /**
+ * @param o
+ * @param context
+ * @return object value
+ * @throws MethodInvocationException
+ */
public Object execute(Object o, InternalContextAdapter context)
throws MethodInvocationException
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java
index 069f7df2..c47b9ad5 100755
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTMathNode.java
@@ -137,6 +137,10 @@ public abstract class ASTMathNode extends ASTBinaryOperator
* Extension hook to allow special behavior by subclasses
* If this method returns a non-null value, that is returned,
* rather than the result of the math operation.
+ * @param left
+ * @param right
+ * @param context
+ * @return special value
* @see ASTAddNode#handleSpecial
*/
protected Object handleSpecial(Object left, Object right, InternalContextAdapter context)
@@ -147,6 +151,11 @@ public abstract class ASTMathNode extends ASTBinaryOperator
/**
* Performs the math operation represented by this node.
+ * @param left
+ * @param right
+ * @param context
+ * @return computed value
+ * @see ASTAddNode#perform(Number, Number, InternalContextAdapter)
*/
public abstract Number perform(Number left, Number right, InternalContextAdapter context);
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java
index 7fdd303f..f87d3b6c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTOrNode.java
@@ -80,11 +80,12 @@ public class ASTOrNode extends ASTLogicalOperator
/**
* the logical or :
- * the rule :
- * left || null -> left
- * null || right -> right
- * null || null -> false
- * left || right -> left || right
+ * <pre>
+ * left || null -&gt; left
+ * null || right -&gt; right
+ * null || null -&gt; false
+ * left || right -&gt; left || right
+ * </pre>
* @param context
* @return The evaluation result.
* @throws MethodInvocationException
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
index c02a82a0..5727acbe 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java
@@ -95,7 +95,7 @@ public class ASTReference extends SimpleNode
/**
* Indicates if we are using modified escape behavior in strict mode.
- * mainly we allow \$abc -> to render as $abc
+ * mainly we allow \$abc -&gt; to render as $abc
*/
public boolean strictEscape = false;
@@ -640,6 +640,8 @@ public class ASTReference extends SimpleNode
/**
* Utility class to handle nulls when printing a class type
+ * @param clazz
+ * @return class name, or the string "null"
*/
public static String printClass(Class clazz)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
index d3141ca6..2b197d4e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
@@ -178,6 +178,7 @@ public class ASTStringLiteral extends SimpleNode
* that the line and column position reported reflects the error position
* within the template and not just relative to the error position within
* the string literal.
+ * @param node
*/
public void adjTokenLineNums(Node node)
{
@@ -238,6 +239,8 @@ public class ASTStringLiteral extends SimpleNode
}
/**
+ * @param string
+ * @return unescaped string
* @since 1.6
*/
public static String unescape(final String string)
@@ -271,6 +274,9 @@ public class ASTStringLiteral extends SimpleNode
/**
+ * @param visitor
+ * @param data
+ * @return rendered object
* @see org.apache.velocity.runtime.parser.node.SimpleNode#jjtAccept(org.apache.velocity.runtime.parser.node.ParserVisitor,
* java.lang.Object)
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java
index 95b2fdf7..179d03cc 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/BooleanPropertyExecutor.java
@@ -26,12 +26,12 @@ import org.slf4j.Logger;
/**
* Handles discovery and valuation of a
* boolean object property, of the
- * form public boolean is<property> when executed.
+ * form public boolean is&lt;property&gt; when executed.
*
* We do this separately as to preserve the current
- * quasi-broken semantics of get<as is property>
- * get< flip 1st char> get("property") and now followed
- * by is<Property>
+ * quasi-broken semantics of get&lt;as is property&gt;
+ * get&lt;flip 1st char&gt; get("property") and now followed
+ * by is&lt;Property&gt;
*
* @author <a href="geirm@apache.org">Geir Magnusson Jr.</a>
* @version $Id$
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java
index 08e8606d..0a36cf19 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/GetExecutor.java
@@ -71,6 +71,7 @@ public class GetExecutor extends AbstractExecutor
}
/**
+ * @param clazz
* @since 1.5
*/
protected void discover(final Class clazz)
@@ -106,6 +107,8 @@ public class GetExecutor extends AbstractExecutor
}
/**
+ * @param o
+ * @return value
* @see org.apache.velocity.runtime.parser.node.AbstractExecutor#execute(java.lang.Object)
*/
public Object execute(final Object o)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java
index 927d6434..eda542b6 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/MathUtils.java
@@ -461,7 +461,7 @@ public abstract class MathUtils
* Compare two numbers.
* @param op1
* @param op2
- * @return 1 if n1 > n2, -1 if n1 < n2 and 0 if equal.
+ * @return 1 if n1 &gt; n2, -1 if n1 &lt; n2 and 0 if equal.
*/
public static int compare (Number op1, Number op2) {
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
index 252725c0..afbee2ca 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
@@ -32,7 +32,7 @@ import org.apache.velocity.runtime.parser.Token;
public class NodeUtils
{
/**
- * Collect all the <SPECIAL_TOKEN>s that
+ * Collect all the &lt;SPECIAL_TOKEN&gt;s that
* are carried along with a token. Special
* tokens do not participate in parsing but
* can still trigger certain lexical actions.
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
index 1b59935a..59aade33 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
@@ -328,6 +328,8 @@ public class SimpleNode implements Node
/**
* Return a string that tells the current location of this node.
+ * @param context
+ * @return location
*/
protected String getLocation(InternalContextAdapter context)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java
index 3f6c8437..faf93a62 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/Resource.java
@@ -275,6 +275,7 @@ public abstract class Resource
/**
* Sets the type of this Resource (RESOURCE_TEMPLATE or RESOURCE_CONTENT)
+ * @param type RESOURCE_TEMPLATE or RESOURCE_CONTENT
* @since 1.6
*/
public void setType(int type)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
index 68644561..eb7054de 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
@@ -479,7 +479,7 @@ public class ResourceManagerImpl
*
* @param resource resource to refresh
* @param encoding character encoding of the resource to refresh.
- *
+ * @return resource
* @throws ResourceNotFoundException if template not found from current source for this Resource
* @throws ParseErrorException if template cannot be parsed due to syntax (or other) error.
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
index 853b93e8..6e9db6ff 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
@@ -499,6 +499,7 @@ public class DataSourceResourceLoader extends ResourceLoader
* @param tableName table to fetch from
* @param keyColumn column whose value should match templateName
* @return PreparedStatement
+ * @throws SQLException
*/
protected PreparedStatement prepareStatement(
final Connection conn,
@@ -531,6 +532,11 @@ public class DataSourceResourceLoader extends ResourceLoader
/**
* Gets a reader from a result set's column
+ * @param resultSet
+ * @param column
+ * @param encoding
+ * @return reader
+ * @throws SQLException
*/
protected Reader getReader(ResultSet resultSet, String column, String encoding)
throws SQLException
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java
index b7b34236..f112a397 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarHolder.java
@@ -51,6 +51,7 @@ public class JarHolder
/**
* @param rs
* @param urlpath
+ * @param log
*/
public JarHolder( RuntimeServices rs, String urlpath, Logger log )
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
index bd36f712..f7ae8f2d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
@@ -45,17 +45,16 @@ import java.util.Map;
* The configuration of the JarResourceLoader is straightforward -
* You simply add the JarResourceLoader to the configuration via
* </p>
- * <p><pre>
+ * <pre><code>
* resource.loaders = jar
* resource.loader.jar.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader
* resource.loader.jar.path = list of JAR &lt;URL&gt;s
- * </pre></p>
+ * </code></pre>
*
- * <p> So for example, if you had a jar file on your local filesystem, you could simply do
- * <pre>
+ * <p> So for example, if you had a jar file on your local filesystem, you could simply do</p>
+ * <pre><code>
* resource.loader.jar.path = jar:file:/opt/myfiles/jar1.jar
- * </pre>
- * </p>
+ * </code></pre>
* <p> Note that jar specification for the <code>.path</code> configuration property
* conforms to the same rules for the java.net.JarUrlConnection class.
* </p>
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java
index e2fc7b43..9a2d5643 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/ResourceLoader.java
@@ -142,6 +142,7 @@ public abstract class ResourceLoader
* to create a template.
*
* @param source
+ * @param encoding
* @return The reader for the requested resource.
* @throws ResourceNotFoundException
* @since 2.0
@@ -277,7 +278,8 @@ public abstract class ResourceLoader
* @param rawStream The raw input stream.
* @param encoding The asked encoding.
* @return found reader
- * @throws IOException, UnsupportedEncodingException
+ * @throws IOException
+ * @throws UnsupportedEncodingException
* @since 2.0
*/
protected Reader buildReader(InputStream rawStream, String encoding)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
index 9603f826..98c47934 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
@@ -75,17 +75,17 @@ import java.util.Map;
* <pre><code>
* StringResourceRepository repo = StringResourceLoader.getRepository("foo");
* </code></pre>
- * and add string resources to the repo just as in the previous example.
+ * <p>and add string resources to the repo just as in the previous example.
* </p>
* <p>If you have concerns about memory leaks or for whatever reason do not wish
* to have your string repository stored statically as a class member, then you
* should set 'resource.loader.string.repository.static = false' in your properties.
* This will tell the resource loader that the string repository should be stored
- * in the Velocity application attributes. To retrieve the repository, do:
+ * in the Velocity application attributes. To retrieve the repository, do:</p>
* <pre><code>
* StringResourceRepository repo = velocityEngine.getApplicationAttribute("foo");
* </code></pre>
- * If you did not specify a name for the repository, then it will be stored under the
+ * <p>If you did not specify a name for the repository, then it will be stored under the
* class name of the repository implementation class (for which the default is
* 'org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl').
* Incidentally, this is also true for the default statically stored repository.
@@ -98,13 +98,13 @@ import java.util.Map;
* repo.magicallyAddSomeStringResources();
* StringResourceLoader.setRepository("foo", repo);
* </code></pre>
- * Or for a non-static repository:
+ * <p>Or for a non-static repository:</p>
* <pre><code>
* StringResourceRepository repo = new MyStringResourceRepository();
* repo.magicallyAddSomeStringResources();
* velocityEngine.setApplicationAttribute("foo", repo);
* </code></pre>
- * Then, assuming the 'resource.loader.string.repository.name' property is
+ * <p>Then, assuming the 'resource.loader.string.repository.name' property is
* set to 'some.name', the StringResourceLoader will use that already created
* repository, rather than creating a new one.
* </p>
@@ -157,6 +157,7 @@ public class StringResourceLoader extends ResourceLoader
/**
* Returns a reference to the default static repository.
+ * @return default static repository
*/
public static StringResourceRepository getRepository()
{
@@ -166,6 +167,8 @@ public class StringResourceLoader extends ResourceLoader
/**
* Returns a reference to the repository stored statically under the
* specified name.
+ * @param name
+ * @return named repository
* @since 1.6
*/
public static StringResourceRepository getRepository(String name)
@@ -176,6 +179,8 @@ public class StringResourceLoader extends ResourceLoader
/**
* Sets the specified {@link StringResourceRepository} in static storage
* under the specified name.
+ * @param name
+ * @param repo
* @since 1.6
*/
public static void setRepository(String name, StringResourceRepository repo)
@@ -186,6 +191,8 @@ public class StringResourceLoader extends ResourceLoader
/**
* Removes the {@link StringResourceRepository} stored under the specified
* name.
+ * @param name
+ * @return removed repository
* @since 1.6
*/
public static StringResourceRepository removeRepository(String name)
@@ -203,11 +210,14 @@ public class StringResourceLoader extends ResourceLoader
}
- // the repository used internally by this resource loader
+ /**
+ * the repository used internally by this resource loader
+ */
protected StringResourceRepository repository;
/**
+ * @param configuration
* @see ResourceLoader#init(org.apache.velocity.util.ExtProperties)
*/
public void init(final ExtProperties configuration)
@@ -278,6 +288,9 @@ public class StringResourceLoader extends ResourceLoader
}
/**
+ * @param className
+ * @param encoding
+ * @return created repository
* @since 1.6
*/
public StringResourceRepository createRepository(final String className,
@@ -318,6 +331,8 @@ public class StringResourceLoader extends ResourceLoader
/**
* Overrides superclass for better performance.
+ * @param name resource name
+ * @return whether resource exists
* @since 1.6
*/
public boolean resourceExists(final String name)
@@ -379,6 +394,8 @@ public class StringResourceLoader extends ResourceLoader
}
/**
+ * @param resource
+ * @return whether resource was modified
* @see ResourceLoader#isSourceModified(org.apache.velocity.runtime.resource.Resource)
*/
public boolean isSourceModified(final Resource resource)
@@ -397,6 +414,8 @@ public class StringResourceLoader extends ResourceLoader
}
/**
+ * @param resource
+ * @return last modified timestamp
* @see ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource)
*/
public long getLastModified(final Resource resource)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
index f60e4c59..f5eac4a5 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
@@ -48,6 +48,7 @@ public class URLResourceLoader extends ResourceLoader
private int timeout = -1;
/**
+ * @param configuration
* @see ResourceLoader#init(org.apache.velocity.util.ExtProperties)
*/
public void init(ExtProperties configuration)
@@ -200,6 +201,7 @@ public class URLResourceLoader extends ResourceLoader
/**
* Returns the current, custom timeout setting. If negative, there is no custom timeout.
+ * @return timeout
* @since 1.6
*/
public int getTimeout()
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java
index ffb4d25e..e0887eb6 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/resource/util/StringResource.java
@@ -42,6 +42,7 @@ public final class StringResource
/**
* convenience constructor; sets body to 'body' and sets lastModified to now
* @param body
+ * @param encoding
*/
public StringResource(final String body, final String encoding)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/DeprecationAwareExtProperties.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/DeprecationAwareExtProperties.java
index 5b0c79bd..24b9584b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/DeprecationAwareExtProperties.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/DeprecationAwareExtProperties.java
@@ -49,6 +49,8 @@ public class DeprecationAwareExtProperties extends Hashtable<String, Object>
/**
* Emit a warning in the log for adeprecated property name
+ * @param oldName old property name
+ * @param newName new property name
*/
protected void warnDeprecated(String oldName, String newName)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java
index da755197..8fbc559b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/DuckType.java
@@ -30,7 +30,7 @@ import java.util.Map;
import static org.apache.velocity.runtime.parser.node.MathUtils.isZero;
/**
- * Support for getAs<Type>() convention for rendering (String), evaluating (Boolean)
+ * Support for getAs&lt;java.lang.reflect.Type&gt;() convention for rendering (String), evaluating (Boolean)
* or doing math with (Number) references.
*
* @author Nathan Bubna
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
index 8ae3484c..ed169460 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
@@ -97,9 +97,9 @@ import java.util.Vector;
* </li>
* </ul>
*
- * <p>Here is an example of a valid extended properties file:
+ * <p>Here is an example of a valid extended properties file:</p>
*
- * <p><pre>
+ * <pre><code>
* # lines starting with # are comments
*
* # This is the simplest property
@@ -118,7 +118,7 @@ import java.util.Vector;
*
* # commas may be escaped in tokens
* commas.escaped = Hi\, what'up?
- * </pre>
+ * </code></pre>
*
* <p><b>NOTE</b>: this class has <b>not</b> been written for
* performance nor low memory usage. In fact, it's way slower than it
@@ -566,6 +566,7 @@ public class ExtProperties extends DeprecationAwareExtProperties
/**
* Indicate to client code whether property
* resources have been initialized or not.
+ * @return initialization status
*/
public boolean isInitialized()
{
@@ -1134,6 +1135,7 @@ public class ExtProperties extends DeprecationAwareExtProperties
* configuration key.
*
* @param key The configuration key.
+ * @param defaults default values
* @return The associated properties if key is found.
* @throws ClassCastException is thrown if the key maps to an
* object that is not a String/List.
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
index 60847b5a..62e86dbf 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/StringUtils.java
@@ -38,6 +38,8 @@ public class StringUtils
* Creates a string that formats the template filename with line number
* and column of the given Directive. We use this routine to provide a consistent format for displaying
* file errors.
+ * @param directive currrent directive
+ * @return formatted string
*/
public static String formatFileString(Directive directive)
{
@@ -48,6 +50,8 @@ public class StringUtils
* Creates a string that formats the template filename with line number
* and column of the given Node. We use this routine to provide a consistent format for displaying
* file errors.
+ * @param node current node
+ * @return formatted string
*/
public static String formatFileString(Node node)
{
@@ -58,6 +62,8 @@ public class StringUtils
* Simply creates a string that formats the template filename with line number
* and column. We use this routine to provide a consistent format for displaying
* file errors.
+ * @param info template name, line and column infos
+ * @return formatted string
*/
public static String formatFileString(Info info)
{
@@ -71,6 +77,7 @@ public class StringUtils
* @param template File name of template, can be null
* @param linenum Line number within the file
* @param colnum Column number withing the file at linenum
+ * @return formatted string
*/
public static String formatFileString(String template, int linenum, int colnum)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassFieldMap.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassFieldMap.java
index 0081cfe0..3847d806 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassFieldMap.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassFieldMap.java
@@ -61,6 +61,7 @@ public class ClassFieldMap
/**
* Standard constructor
* @param clazz The class for which this ClassMap gets constructed.
+ * @param log logger
*/
public ClassFieldMap(final Class clazz, final Logger log)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassMap.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassMap.java
index 262315e3..b29a3ac1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassMap.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ClassMap.java
@@ -60,6 +60,7 @@ public class ClassMap
/**
* Standard constructor
* @param clazz The class for which this ClassMap gets constructed.
+ * @param log logger
*/
public ClassMap(final Class clazz, final Logger log)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandler.java
index d38bc7a7..5f5a2b43 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/ConversionHandler.java
@@ -40,6 +40,7 @@ public interface ConversionHandler
*
* @param formal expected formal type
* @param actual provided argument type
+ * @param possibleVarArg whether var arg is possible here
* @return null if no conversion is needed, or the appropriate Converter object
* @since 2.0
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java
index 654a66b6..6b7eb5d8 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorBase.java
@@ -64,6 +64,8 @@ public abstract class IntrospectorBase
/**
* C'tor.
+ * @param log logger
+ * @param conversionHandler conversion handler
*/
protected IntrospectorBase(final Logger log, final TypeConversionHandler conversionHandler)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java
index ae59f15a..16d30ee1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/IntrospectorCache.java
@@ -72,6 +72,8 @@ public final class IntrospectorCache
/**
* C'tor
+ * @param log logger.
+ * @param conversionHandler conversion handler
*/
public IntrospectorCache(final Logger log, final TypeConversionHandler conversionHandler)
{
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
index a2130ee9..6f91581e 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/LinkingUberspector.java
@@ -41,6 +41,8 @@ public class LinkingUberspector extends AbstractChainableUberspector
/**
* Constructor that takes the two uberspectors to link
+ * @param left left uberspector
+ * @param right right uberspector
*/
public LinkingUberspector(Uberspect left,Uberspect right) {
leftUberspect = left;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java
index 47789bdc..2725809d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/SecureIntrospectorControl.java
@@ -22,7 +22,7 @@ package org.apache.velocity.util.introspection;
/**
* Interface used to determine which methods are allowed to be executed.
*
- * @author <a href="Will Glass-Husain">wglass@forio.com</a>
+ * @author <a href="mailto:wglass@forio.com">Will Glass-Husain</a>
* @version $Id$
* @since 1.5
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/TypeConversionHandler.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/TypeConversionHandler.java
index 0df26147..6eb04954 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/TypeConversionHandler.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/TypeConversionHandler.java
@@ -38,6 +38,7 @@ public interface TypeConversionHandler
* Check to see if the conversion can be done using an explicit conversion
* @param formal expected formal type
* @param actual provided argument type
+ * @param possibleVarArg whether var arg is possible
* @return null if no conversion is needed, or the appropriate Converter object
* @since 2.1
*/
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java
index 03127892..769029c9 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectImpl.java
@@ -471,6 +471,8 @@ public class UberspectImpl implements Uberspect, RuntimeServicesAware
}
/**
+ * @param method
+ * @param wrapArray
* @since 1.6
*/
public VelMethodImpl(Method method, boolean wrapArray)
@@ -479,6 +481,9 @@ public class UberspectImpl implements Uberspect, RuntimeServicesAware
}
/**
+ * @param method
+ * @param wrapArray
+ * @param converters
* @since 2.0
*/
public VelMethodImpl(Method method, boolean wrapArray, Converter[] converters)
@@ -494,6 +499,9 @@ public class UberspectImpl implements Uberspect, RuntimeServicesAware
}
/**
+ * @param o
+ * @param actual
+ * @return invocation result
* @see VelMethod#invoke(java.lang.Object, java.lang.Object[])
*/
public Object invoke(Object o, Object[] actual)
@@ -535,6 +543,11 @@ public class UberspectImpl implements Uberspect, RuntimeServicesAware
* Offers an extension point for subclasses (in alternate Uberspects)
* to alter the invocation after any array wrapping or varargs handling
* has already been completed.
+ * @param o target object
+ * @param actual arguments
+ * @return invocation result
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
* @since 1.6
*/
protected Object doInvoke(Object o, Object[] actual)
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectPublicFields.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectPublicFields.java
index a441799e..8eb5cbff 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectPublicFields.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/UberspectPublicFields.java
@@ -64,7 +64,6 @@ public class UberspectPublicFields implements Uberspect, RuntimeServicesAware
* @param identifier
* @param i
* @return A Velocity Getter Method.
- * @throws Exception
*/
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
{
@@ -87,7 +86,6 @@ public class UberspectPublicFields implements Uberspect, RuntimeServicesAware
* @param arg
* @param i
* @return A Velocity Setter method.
- * @throws Exception
*/
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
{
@@ -103,16 +101,31 @@ public class UberspectPublicFields implements Uberspect, RuntimeServicesAware
return (executor.isAlive()) ? new VelSetterImpl(executor) : null;
}
+ /**
+ * @param obj
+ * @param info
+ * @return iterator
+ */
public Iterator getIterator(Object obj, Info info)
{
return null;
}
+ /**
+ * @param obj
+ * @param method
+ * @param args
+ * @param info
+ * @return method wrapper
+ */
public VelMethod getMethod(Object obj, String method, Object[] args, Info info)
{
return null;
}
+ /**
+ * @param rs RuntimeServices object assigned during initialization
+ */
public void setRuntimeServices(RuntimeServices rs)
{
log = rs.getLog("rendering");
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java
index 50318416..14e2a2a8 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelMethod.java
@@ -39,7 +39,8 @@ public interface VelMethod
* @param o
* @param params
* @return The resulting object.
- * @throws IllegalAccessException, InvocationTargetException
+ * @throws IllegalAccessException
+ * @throws InvocationTargetException
*/
Object invoke(Object o, Object[] params)
throws IllegalAccessException, InvocationTargetException;
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java
index 342f094f..6891b515 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/util/introspection/VelPropertySet.java
@@ -36,7 +36,7 @@ public interface VelPropertySet
* @param o Object on which the method will be called with the arg
* @param arg value to be set
* @return the value returned from the set operation (impl specific)
- * @throws Exception
+ * @throws Exception
*/
Object invoke(Object o, Object arg) throws Exception;