You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by he...@apache.org on 2006/09/17 20:48:07 UTC
svn commit: r447111 - in
/jakarta/velocity/engine/trunk/src/java/org/apache/velocity: context/
convert/ exception/ io/ runtime/directive/ runtime/exception/
Author: henning
Date: Sun Sep 17 11:48:06 2006
New Revision: 447111
URL: http://svn.apache.org/viewvc?view=rev&rev=447111
Log:
More Javadoc Fixes
Modified:
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/Context.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextBase.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalEventContext.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalHousekeepingContext.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalWrapperContext.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/VMContext.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/convert/WebMacro.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ExtendedParseException.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/MethodInvocationException.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ResourceNotFoundException.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/VelocityException.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/io/VelocityWriter.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Directive.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Foreach.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/MacroParseException.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java
jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/Context.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/Context.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/Context.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/Context.java Sun Sep 17 11:48:06 2006
@@ -40,6 +40,7 @@
*
* @param key The name to key the provided value with.
* @param value The corresponding value.
+ * @return The old object or null if there was no old object.
*/
Object put(String key, Object value);
@@ -60,7 +61,8 @@
boolean containsKey(Object key);
/**
- * Get all the keys for the values in the context
+ * Get all the keys for the values in the context.
+ * @return All the keys for the values in the context.
*/
Object[] getKeys();
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextAdapterImpl.java Sun Sep 17 11:48:06 2006
@@ -85,6 +85,7 @@
*
* For support of internal contexts, it will create an InternalContextBase
* if need be.
+ * @param c
*/
public InternalContextAdapterImpl( Context c )
{
@@ -107,52 +108,82 @@
/* --- InternalHousekeepingContext interface methods --- */
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#pushCurrentTemplateName(java.lang.String)
+ */
public void pushCurrentTemplateName( String s )
{
icb.pushCurrentTemplateName( s );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#popCurrentTemplateName()
+ */
public void popCurrentTemplateName()
{
icb.popCurrentTemplateName();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getCurrentTemplateName()
+ */
public String getCurrentTemplateName()
{
return icb.getCurrentTemplateName();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getTemplateNameStack()
+ */
public Object[] getTemplateNameStack()
{
return icb.getTemplateNameStack();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#icacheGet(java.lang.Object)
+ */
public IntrospectionCacheData icacheGet( Object key )
{
return icb.icacheGet( key );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#icachePut(java.lang.Object, org.apache.velocity.util.introspection.IntrospectionCacheData)
+ */
public void icachePut( Object key, IntrospectionCacheData o )
{
icb.icachePut( key, o );
}
- public void setCurrentResource( Resource r )
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#setCurrentResource(org.apache.velocity.runtime.resource.Resource)
+ */
+ public void setCurrentResource( Resource r )
{
icb.setCurrentResource(r);
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getCurrentResource()
+ */
public Resource getCurrentResource()
{
return icb.getCurrentResource();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getAllowRendering()
+ */
public boolean getAllowRendering()
{
return icb.getAllowRendering();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#setAllowRendering(boolean)
+ */
public void setAllowRendering(boolean v)
{
icb.setAllowRendering(v);
@@ -161,26 +192,41 @@
/* --- Context interface methods --- */
+ /**
+ * @see org.apache.velocity.context.Context#put(java.lang.String, java.lang.Object)
+ */
public Object put(String key, Object value)
{
return context.put( key , value );
}
+ /**
+ * @see org.apache.velocity.context.Context#get(java.lang.String)
+ */
public Object get(String key)
{
return context.get( key );
}
+ /**
+ * @see org.apache.velocity.context.Context#containsKey(java.lang.Object)
+ */
public boolean containsKey(Object key)
{
return context.containsKey( key );
}
+ /**
+ * @see org.apache.velocity.context.Context#getKeys()
+ */
public Object[] getKeys()
{
return context.getKeys();
}
+ /**
+ * @see org.apache.velocity.context.Context#remove(java.lang.Object)
+ */
public Object remove(Object key)
{
return context.remove( key );
@@ -192,6 +238,7 @@
/**
* returns the user data context that
* we are wrapping
+ * @return The internal user data context.
*/
public Context getInternalUserContext()
{
@@ -203,6 +250,7 @@
* wrapping. Here, its this, but for other thing
* like VM related context contortions, it can
* be something else
+ * @return The base context.
*/
public InternalContextAdapter getBaseContext()
{
@@ -211,6 +259,9 @@
/* ----- InternalEventContext ---- */
+ /**
+ * @see org.apache.velocity.context.InternalEventContext#attachEventCartridge(org.apache.velocity.app.event.EventCartridge)
+ */
public EventCartridge attachEventCartridge( EventCartridge ec )
{
if (iec != null)
@@ -221,6 +272,9 @@
return null;
}
+ /**
+ * @see org.apache.velocity.context.InternalEventContext#getEventCartridge()
+ */
public EventCartridge getEventCartridge()
{
if ( iec != null)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextBase.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextBase.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextBase.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalContextBase.java Sun Sep 17 11:48:06 2006
@@ -140,28 +140,43 @@
introspectionCache.put( key, o );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#setCurrentResource(org.apache.velocity.runtime.resource.Resource)
+ */
public void setCurrentResource( Resource r )
{
currentResource = r;
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getCurrentResource()
+ */
public Resource getCurrentResource()
{
return currentResource;
}
- public boolean getAllowRendering()
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getAllowRendering()
+ */
+ public boolean getAllowRendering()
{
return allowRendering;
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#setAllowRendering(boolean)
+ */
public void setAllowRendering(boolean v)
{
allowRendering = v;
}
+ /**
+ * @see org.apache.velocity.context.InternalEventContext#attachEventCartridge(org.apache.velocity.app.event.EventCartridge)
+ */
public EventCartridge attachEventCartridge( EventCartridge ec )
{
EventCartridge temp = eventCartridge;
@@ -171,6 +186,9 @@
return temp;
}
+ /**
+ * @see org.apache.velocity.context.InternalEventContext#getEventCartridge()
+ */
public EventCartridge getEventCartridge()
{
return eventCartridge;
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalEventContext.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalEventContext.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalEventContext.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalEventContext.java Sun Sep 17 11:48:06 2006
@@ -30,6 +30,14 @@
*/
public interface InternalEventContext
{
+ /**
+ * @param ec
+ * @return The old EventCartridge.
+ */
public EventCartridge attachEventCartridge( EventCartridge ec);
+
+ /**
+ * @return The current EventCartridge.
+ */
public EventCartridge getEventCartridge();
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalHousekeepingContext.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalHousekeepingContext.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalHousekeepingContext.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalHousekeepingContext.java Sun Sep 17 11:48:06 2006
@@ -82,9 +82,15 @@
/**
* temporary fix to enable #include() to figure out
* current encoding.
- *
+ *
+ * @return The current resource.
*/
Resource getCurrentResource();
+
+
+ /**
+ * @param r
+ */
void setCurrentResource( Resource r );
@@ -99,6 +105,7 @@
/**
* Set whether rendering is allowed. Defaults to true but is set to
* false after a #stop directive.
+ * @param v
*/
void setAllowRendering(boolean v);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalWrapperContext.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalWrapperContext.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalWrapperContext.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/InternalWrapperContext.java Sun Sep 17 11:48:06 2006
@@ -24,10 +24,16 @@
*/
public interface InternalWrapperContext
{
- /** returns the wrapped user context */
- public Context getInternalUserContext();
+ /**
+ * Returns the wrapped user context.
+ * @return The wrapped user context.
+ */
+ Context getInternalUserContext();
- /** returns the base full context impl */
- public InternalContextAdapter getBaseContext();
-
+ /**
+ * Returns the base full context impl.
+ * @return The base full context impl.
+ *
+ */
+ InternalContextAdapter getBaseContext();
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/VMContext.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/VMContext.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/VMContext.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/context/VMContext.java Sun Sep 17 11:48:06 2006
@@ -59,6 +59,8 @@
/**
* CTOR, wraps an ICA
+ * @param inner
+ * @param rsvc
*/
public VMContext( InternalContextAdapter inner, RuntimeServices rsvc )
{
@@ -69,13 +71,17 @@
}
/**
- * return the inner / user context
+ * Return the inner / user context.
+ * @return The inner / user context.
*/
public Context getInternalUserContext()
{
return innerContext.getInternalUserContext();
}
+ /**
+ * @see org.apache.velocity.context.InternalWrapperContext#getBaseContext()
+ */
public InternalContextAdapter getBaseContext()
{
return innerContext.getBaseContext();
@@ -89,6 +95,7 @@
* dynamic ones, as they modify context rather than their own
* state
* @param vmpa VMProxyArg to add
+ * @throws MethodInvocationException
*/
public void addVMProxyArg( VMProxyArg vmpa ) throws MethodInvocationException
{
@@ -215,7 +222,7 @@
}
/**
- * not yet impl
+ * @see org.apache.velocity.context.Context#containsKey(java.lang.Object)
*/
public boolean containsKey(Object key)
{
@@ -223,7 +230,7 @@
}
/**
- * impl badly
+ * @see org.apache.velocity.context.Context#getKeys()
*/
public Object[] getKeys()
{
@@ -231,70 +238,106 @@
}
/**
- * impl badly
+ * @see org.apache.velocity.context.Context#remove(java.lang.Object)
*/
public Object remove(Object key)
{
return vmproxyhash.remove( key );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#pushCurrentTemplateName(java.lang.String)
+ */
public void pushCurrentTemplateName( String s )
{
innerContext.pushCurrentTemplateName( s );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#popCurrentTemplateName()
+ */
public void popCurrentTemplateName()
{
innerContext.popCurrentTemplateName();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getCurrentTemplateName()
+ */
public String getCurrentTemplateName()
{
return innerContext.getCurrentTemplateName();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getTemplateNameStack()
+ */
public Object[] getTemplateNameStack()
{
return innerContext.getTemplateNameStack();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#icacheGet(java.lang.Object)
+ */
public IntrospectionCacheData icacheGet( Object key )
{
return innerContext.icacheGet( key );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#icachePut(java.lang.Object, org.apache.velocity.util.introspection.IntrospectionCacheData)
+ */
public void icachePut( Object key, IntrospectionCacheData o )
{
innerContext.icachePut( key, o );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getAllowRendering()
+ */
public boolean getAllowRendering()
{
return innerContext.getAllowRendering();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#setAllowRendering(boolean)
+ */
public void setAllowRendering(boolean v)
{
innerContext.setAllowRendering(v);
}
+ /**
+ * @see org.apache.velocity.context.InternalEventContext#attachEventCartridge(org.apache.velocity.app.event.EventCartridge)
+ */
public EventCartridge attachEventCartridge( EventCartridge ec )
{
EventCartridge cartridge = innerContext.attachEventCartridge( ec );
return cartridge;
}
+ /**
+ * @see org.apache.velocity.context.InternalEventContext#getEventCartridge()
+ */
public EventCartridge getEventCartridge()
{
return innerContext.getEventCartridge();
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#setCurrentResource(org.apache.velocity.runtime.resource.Resource)
+ */
public void setCurrentResource( Resource r )
{
innerContext.setCurrentResource( r );
}
+ /**
+ * @see org.apache.velocity.context.InternalHousekeepingContext#getCurrentResource()
+ */
public Resource getCurrentResource()
{
return innerContext.getCurrentResource();
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/convert/WebMacro.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/convert/WebMacro.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/convert/WebMacro.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/convert/WebMacro.java Sun Sep 17 11:48:06 2006
@@ -38,7 +38,14 @@
*/
public class WebMacro
{
+ /**
+ *
+ */
protected static final String VM_EXT = ".vm";
+
+ /**
+ *
+ */
protected static final String WM_EXT = ".wm";
/**
@@ -106,6 +113,7 @@
/**
* Iterate through the set of find/replace regexes
* that will convert a given WM template to a VM template
+ * @param target
*/
public void convert(String target)
{
@@ -232,6 +240,8 @@
/**
* Apply find/replace regexes to our WM template
+ * @param template
+ * @return Returns the template with all regexprs applied.
*/
public String convertTemplate(String template)
{
@@ -277,6 +287,7 @@
/**
* Main hook for the conversion process.
+ * @param args
*/
public static void main(String[] args)
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ExtendedParseException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ExtendedParseException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ExtendedParseException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ExtendedParseException.java Sun Sep 17 11:48:06 2006
@@ -29,16 +29,19 @@
{
/**
* returns the Template name where this exception occured.
+ * @return The Template name where this exception occured.
*/
String getTemplateName();
/**
* returns the line number where this exception occured.
+ * @return The line number where this exception occured.
*/
int getLineNumber();
/**
* returns the column number where this exception occured.
+ * @return The column number where this exception occured.
*/
int getColumnNumber();
}
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/MethodInvocationException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/MethodInvocationException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/MethodInvocationException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/MethodInvocationException.java Sun Sep 17 11:48:06 2006
@@ -81,7 +81,7 @@
/**
* Sets the reference name that threw this exception
*
- * @param reference name of reference
+ * @param ref name of reference
*/
public void setReferenceName( String ref )
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ResourceNotFoundException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ResourceNotFoundException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ResourceNotFoundException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/ResourceNotFoundException.java Sun Sep 17 11:48:06 2006
@@ -35,6 +35,9 @@
*/
private static final long serialVersionUID = -4287732191458420347L;
+ /**
+ * @param exceptionMessage
+ */
public ResourceNotFoundException(String exceptionMessage)
{
super(exceptionMessage);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/VelocityException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/VelocityException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/VelocityException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/exception/VelocityException.java Sun Sep 17 11:48:06 2006
@@ -30,6 +30,9 @@
*/
private static final long serialVersionUID = 1251243065134956044L;
+ /**
+ * @param exceptionMessage
+ */
public VelocityException(String exceptionMessage )
{
super(exceptionMessage);
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/io/VelocityWriter.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/io/VelocityWriter.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/io/VelocityWriter.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/io/VelocityWriter.java Sun Sep 17 11:48:06 2006
@@ -98,6 +98,7 @@
*
* @param writer Writer to wrap around
* @param sz Output-buffer size, a positive integer
+ * @param autoFlush
*
* @exception IllegalArgumentException If sz is <= 0
*/
@@ -141,6 +142,7 @@
/**
* Flush the stream.
+ * @throws IOException
*
*/
public final void flush() throws IOException
@@ -154,6 +156,7 @@
/**
* Close the stream.
+ * @throws IOException
*
*/
public final void close() throws IOException {
@@ -172,6 +175,8 @@
/**
* Write a single character.
+ * @param c
+ * @throws IOException
*
*/
public final void write(int c) throws IOException
@@ -214,6 +219,7 @@
* @param cbuf A character array
* @param off Offset from which to start reading characters
* @param len Number of characters to write
+ * @throws IOException
*
*/
public final void write(char cbuf[], int off, int len)
@@ -261,6 +267,8 @@
/**
* Write an array of characters. This method cannot be inherited from the
* Writer class because it must suppress I/O exceptions.
+ * @param buf
+ * @throws IOException
*/
public final void write(char buf[]) throws IOException
{
@@ -273,6 +281,7 @@
* @param s String to be written
* @param off Offset from which to start reading characters
* @param len Number of characters to be written
+ * @throws IOException
*
*/
public final void write(String s, int off, int len) throws IOException
@@ -300,6 +309,8 @@
/**
* Write a string. This method cannot be inherited from the Writer class
* because it must suppress I/O exceptions.
+ * @param s
+ * @throws IOException
*/
public final void write(String s) throws IOException
{
@@ -311,6 +322,7 @@
/**
* resets this class so that it can be reused
+ * @param writer
*
*/
public final void recycle(Writer writer)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Directive.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Directive.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Directive.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Directive.java Sun Sep 17 11:48:06 2006
@@ -40,28 +40,47 @@
private int line = 0;
private int column = 0;
+ /**
+ *
+ */
protected RuntimeServices rsvc = null;
- /** Return the name of this directive */
+ /**
+ * Return the name of this directive.
+ * @return The name of this directive.
+ */
public abstract String getName();
- /** Get the directive type BLOCK/LINE */
+ /**
+ * Get the directive type BLOCK/LINE.
+ * @return The directive type BLOCK/LINE.
+ */
public abstract int getType();
- /** Allows the template location to be set */
+ /**
+ * Allows the template location to be set.
+ * @param line
+ * @param column
+ */
public void setLocation( int line, int column )
{
this.line = line;
this.column = column;
}
- /** for log msg purposes */
+ /**
+ * for log msg purposes
+ * @return The current line for log msg purposes.
+ */
public int getLine()
{
return line;
}
- /** for log msg purposes */
+ /**
+ * for log msg purposes
+ * @return The current column for log msg purposes.
+ */
public int getColumn()
{
return column;
@@ -69,6 +88,10 @@
/**
* How this directive is to be initialized.
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init( RuntimeServices rs, InternalContextAdapter context,
Node node)
@@ -84,6 +107,14 @@
/**
* How this directive is to be rendered
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
+ * @throws ResourceNotFoundException
+ * @throws ParseErrorException
+ * @throws MethodInvocationException
*/
public abstract boolean render( InternalContextAdapter context,
Writer writer, Node node )
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Foreach.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Foreach.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Foreach.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Foreach.java Sun Sep 17 11:48:06 2006
@@ -241,6 +241,7 @@
/**
* Return name of this directive.
+ * @return The name of this directive.
*/
public String getName()
{
@@ -249,6 +250,7 @@
/**
* Return type of this directive.
+ * @return The type of this directive.
*/
public int getType()
{
@@ -292,6 +294,10 @@
/**
* simple init - init the tree and get the elementKey from
* the AST
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
throws Exception
@@ -337,6 +343,14 @@
/**
* renders the #foreach() block
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
+ * @throws MethodInvocationException
+ * @throws ResourceNotFoundException
+ * @throws ParseErrorException
*/
public boolean render(InternalContextAdapter context,
Writer writer, Node node)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Include.java Sun Sep 17 11:48:06 2006
@@ -72,6 +72,7 @@
/**
* Return name of this directive.
+ * @return The name of this directive.
*/
public String getName()
{
@@ -80,6 +81,7 @@
/**
* Return type of this directive.
+ * @return The type of this directive.
*/
public int getType()
{
@@ -89,6 +91,10 @@
/**
* simple init - init the tree and get the elementKey from
* the AST
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init(RuntimeServices rs, InternalContextAdapter context,
Node node)
@@ -111,6 +117,13 @@
* iterates through the argument list and renders every
* argument that is appropriate. Any non appropriate
* arguments are logged, but render() continues.
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
+ * @throws MethodInvocationException
+ * @throws ResourceNotFoundException
*/
public boolean render(InternalContextAdapter context,
Writer writer, Node node)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Literal.java Sun Sep 17 11:48:06 2006
@@ -38,6 +38,7 @@
/**
* Return name of this directive.
+ * @return The name of this directive.
*/
public String getName()
{
@@ -46,6 +47,7 @@
/**
* Return type of this directive.
+ * @return The type of this directive.
*/
public int getType()
{
@@ -55,6 +57,10 @@
/**
* Store the literal rendition of a node using
* the Node.literal().
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init(RuntimeServices rs, InternalContextAdapter context,
Node node)
@@ -68,6 +74,11 @@
/**
* Throw the literal rendition of the block between
* #literal()/#end into the writer.
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
*/
public boolean render( InternalContextAdapter context,
Writer writer, Node node)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Macro.java Sun Sep 17 11:48:06 2006
@@ -57,6 +57,7 @@
/**
* Return name of this directive.
+ * @return The name of this directive.
*/
public String getName()
{
@@ -65,6 +66,7 @@
/**
* Return type of this directive.
+ * @return The type of this directive.
*/
public int getType()
{
@@ -74,6 +76,11 @@
/**
* render() doesn't do anything in the final output rendering.
* There is no output from a #macro() directive.
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
*/
public boolean render(InternalContextAdapter context,
Writer writer, Node node)
@@ -86,6 +93,9 @@
return true;
}
+ /**
+ * @see org.apache.velocity.runtime.directive.Directive#init(org.apache.velocity.runtime.RuntimeServices, org.apache.velocity.context.InternalContextAdapter, org.apache.velocity.runtime.parser.node.Node)
+ */
public void init(RuntimeServices rs, InternalContextAdapter context,
Node node)
throws Exception
@@ -110,6 +120,12 @@
* org.apache.velocity.runtime.directive.VelocimacroProxy}
* objects, and if not currently used, adds it to the macro
* Factory.
+ * @param rs
+ * @param t
+ * @param node
+ * @param sourceTemplate
+ * @throws IOException
+ * @throws ParseException
*/
public static void processAndRegister(RuntimeServices rs, Token t, Node node,
String sourceTemplate)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/MacroParseException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/MacroParseException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/MacroParseException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/MacroParseException.java Sun Sep 17 11:48:06 2006
@@ -40,6 +40,11 @@
*/
private static final long serialVersionUID = -4985224672336070689L;
+ /**
+ * @param msg
+ * @param templateName
+ * @param currentToken
+ */
public MacroParseException(final String msg, final String templateName, final Token currentToken)
{
super(msg);
@@ -49,6 +54,7 @@
/**
* returns the Template name where this exception occured.
+ * @return The Template name where this exception occured.
*/
public String getTemplateName()
{
@@ -57,6 +63,7 @@
/**
* returns the line number where this exception occured.
+ * @return The line number where this exception occured.
*/
public int getLineNumber()
{
@@ -72,6 +79,7 @@
/**
* returns the column number where this exception occured.
+ * @return The column number where this exception occured.
*/
public int getColumnNumber()
{
@@ -94,6 +102,7 @@
* 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 the current message.
*/
public String getMessage()
{
@@ -165,6 +174,9 @@
return retval.toString();
}
+ /**
+ * @param sb
+ */
protected void appendTemplateInfo(final StringBuffer sb)
{
sb.append(" at line ").append(getLineNumber())
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/Parse.java Sun Sep 17 11:48:06 2006
@@ -56,6 +56,7 @@
{
/**
* Return name of this directive.
+ * @return The name of this directive.
*/
public String getName()
{
@@ -64,6 +65,7 @@
/**
* Return type of this directive.
+ * @return The type of this directive.
*/
public int getType()
{
@@ -74,6 +76,14 @@
* iterates through the argument list and renders every
* argument that is appropriate. Any non appropriate
* arguments are logged, but render() continues.
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
+ * @throws ResourceNotFoundException
+ * @throws ParseErrorException
+ * @throws MethodInvocationException
*/
public boolean render( InternalContextAdapter context,
Writer writer, Node node)
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VMProxyArg.java Sun Sep 17 11:48:06 2006
@@ -112,6 +112,7 @@
*
* takes the reference literal we are proxying for, the literal
* the VM we are for is called with...
+ * @param rs
*
* @param contextRef reference arg in the definition of the VM, used in the VM
* @param callerRef reference used by the caller as an arg to the VM
@@ -505,7 +506,9 @@
* VMProxyArg objects, and use this contructor to avoid reparsing the
* reference args
*
- * that impl also had the VMProxyArg carry it's context
+ * that impl also had the VMProxyArg carry it's context.
+ * @param model
+ * @param c
*/
public VMProxyArg( VMProxyArg model, InternalContextAdapter c )
{
@@ -530,26 +533,41 @@
}
}
+ /**
+ * @return The caller reference.
+ */
public String getCallerReference()
{
return callerReference;
}
+ /**
+ * @return The context reference.
+ */
public String getContextReference()
{
return contextReference;
}
+ /**
+ * @return The node tree.
+ */
public SimpleNode getNodeTree()
{
return nodeTree;
}
+ /**
+ * @return The static object.
+ */
public Object getStaticObject()
{
return staticObject;
}
+ /**
+ * @return The type.
+ */
public int getType()
{
return type;
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/directive/VelocimacroProxy.java Sun Sep 17 11:48:06 2006
@@ -57,6 +57,7 @@
/**
* Return name of this Velocimacro.
+ * @return The name of this Velocimacro.
*/
public String getName()
{
@@ -66,6 +67,7 @@
/**
* Velocimacros are always LINE
* type directives.
+ * @return The type of this directive.
*/
public int getType()
{
@@ -74,6 +76,7 @@
/**
* sets the directive name of this VM
+ * @param name
*/
public void setName( String name )
{
@@ -82,6 +85,7 @@
/**
* sets the array of arguments specified in the macro definition
+ * @param arr
*/
public void setArgArray( String [] arr )
{
@@ -95,6 +99,9 @@
numMacroArgs = argArray.length - 1;
}
+ /**
+ * @param tree
+ */
public void setNodeTree( SimpleNode tree )
{
nodeTree = tree;
@@ -102,6 +109,7 @@
/**
* returns the number of ars needed for this VM
+ * @return The number of ars needed for this VM
*/
public int getNumArgs()
{
@@ -112,12 +120,16 @@
* Sets the orignal macro body. This is simply the cat of the macroArray, but the
* Macro object creates this once during parsing, and everyone shares it.
* Note : it must not be modified.
+ * @param mb
*/
public void setMacrobody( String mb )
{
macroBody = mb;
}
+ /**
+ * @param ns
+ */
public void setNamespace( String ns )
{
this.namespace = ns;
@@ -125,6 +137,12 @@
/**
* Renders the macro using the context
+ * @param context
+ * @param writer
+ * @param node
+ * @return True if the directive rendered successfully.
+ * @throws IOException
+ * @throws MethodInvocationException
*/
public boolean render( InternalContextAdapter context, Writer writer, Node node)
throws IOException, MethodInvocationException
@@ -202,6 +220,10 @@
* The major meat of VelocimacroProxy, init() checks the # of arguments, patches the
* macro body, renders the macro into an AST, and then inits the AST, so it is ready
* for quick rendering. Note that this is only AST dependant stuff. Not context.
+ * @param rs
+ * @param context
+ * @param node
+ * @throws Exception
*/
public void init( RuntimeServices rs, InternalContextAdapter context, Node node)
throws Exception
@@ -244,6 +266,9 @@
/**
* basic VM setup. Sets up the proxy args for this
* use, and parses the tree
+ * @param callArgs
+ * @param callArgTypes
+ * @return True if the proxy was setup successfully.
*/
public boolean setupMacro( String[] callArgs, int[] callArgTypes )
{
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/NodeException.java Sun Sep 17 11:48:06 2006
@@ -18,6 +18,9 @@
import org.apache.velocity.runtime.parser.node.Node;
+/**
+ *
+ */
public class NodeException extends Exception
{
/**
@@ -25,6 +28,10 @@
*/
private static final long serialVersionUID = 1214382967295242803L;
+ /**
+ * @param exceptionMessage
+ * @param node
+ */
public NodeException(String exceptionMessage, Node node)
{
super(exceptionMessage + ": " + node.literal() +
Modified: jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java?view=diff&rev=447111&r1=447110&r2=447111
==============================================================================
--- jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java (original)
+++ jakarta/velocity/engine/trunk/src/java/org/apache/velocity/runtime/exception/ReferenceException.java Sun Sep 17 11:48:06 2006
@@ -31,6 +31,10 @@
*/
private static final long serialVersionUID = 3833874766480090214L;
+ /**
+ * @param exceptionMessage
+ * @param node
+ */
public ReferenceException(String exceptionMessage, Node node)
{
super(exceptionMessage + " [line " + node.getLine() + ",column " +
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org