# All Classes and Interfaces

Class
Description
AbstractChainableUberspector
Default implementation of a `chainable uberspector` that forwards all calls to the wrapped uberspector (when that is possible).
AbstractContext
This class is the abstract base class for all conventional Velocity Context implementations.
AbstractExecutor
Abstract class that is used to execute an arbitrary method that is in introspected.
ArrayIterator
An Iterator wrapper for an Object[].
ArrayListWrapper
A class that wraps an array with a List interface.
ASTAddNode
Handles number addition of nodes.
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTAndNode
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTAssignment
ASTBinaryOperator
ASTBlock
ASTComment
Represents all comments...
ASTComparisonNode
Numeric comparison support
ASTDirective
This class is responsible for handling the pluggable directives in VTL.
ASTDirectiveAssign
ASTDivNode
Handles number division of nodes
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTElseIfStatement
This class is responsible for handling the ElseIf VTL control statement.
ASTElseStatement
This class is responsible for handling the Else VTL control statement.
ASTEQNode
Handles `arg1 == arg2` This operator requires that the LHS and RHS are both of the same Class, both numbers or both coerce-able to strings.
ASTEscape
This class is responsible for handling Escapes in VTL.
ASTEscapedDirective
This class is responsible for handling EscapedDirectives in VTL.
ASTExpression
ASTFalse
ASTFloatingPointLiteral
Handles floating point numbers.
ASTGENode
Handles arg1 >= arg2
ASTGTNode
Handles arg1 > arg2
ASTIdentifier
ASTIdentifier.java Method support for identifiers : $foo mainly used by ASTReference Introspection is now moved to 'just in time' or at render / execution time.
ASTIfStatement
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTIncludeStatement
ASTIndex
This node is responsible for the bracket notation at the end of a reference, e.g., $foo[1]
ASTIntegerLiteral
Handles integer numbers.
ASTIntegerRange
handles the range 'operator' [ n ..
ASTIntegerRange.IntegerRange
ASTLENode
Handles arg1 <= arg2
ASTLogicalOperator
ASTLTNode
Handles arg1 < arg2
ASTMap
AST Node for creating a map / dictionary.
ASTMathNode
Helps handle math
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTMethod
ASTMethod.java Method support for references : $foo.method() NOTE : introspection is now done at render time.
ASTMethod.MethodCacheKey
Internal class used as key for method cache.
ASTModNode
Handles modulus division
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTMulNode
Handles multiplication
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTNegateNode
ASTNENode
Handles `arg1 != arg2` by negating evaluation of ASTEQNode
ASTNotNode
ASTObjectArray
ASTOrNode
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTParameters
ASTprocess
ASTReference
This class is responsible for handling the references in VTL ($foo).
ASTSetDirective
Node for the #set directive
ASTStringLiteral
ASTStringLiteral support.
ASTSubtractNode
Handles subtraction of nodes (in #set() )
Please look at the Parser.jjt file which is what controls the generation of this class.
ASTText
ASTTextblock
This node holds the "Textblock" data which should not be interpreted by Velocity.
ASTTrue
ASTVariable
ASTWord
BaseVisitor
This is the base class for all visitors.
Block
Directive that puts an unrendered AST block in the context under the specified key, postponing rendering until the reference is used and rendered.
Block.Reference
actual class placed in the context, holds the context being used for the render, as well as the parent (which already holds everything else we need).
BlockMacro
BlockMacro directive is used to invoke Velocity macros with normal parameters and a macro body.
BooleanPropertyExecutor
Handles discovery and valuation of a boolean object property, of the form public boolean is<property> when executed.
Break
Break directive used for interrupting scopes.
ChainableUberspector
Interface that marks uberspectors as chainable, meaning that multiple uberspectors can be combined in a chain (using the Decorator pattern).
ChainedInternalContextAdapter
This is an abstract internal-use-only context implementation to be used as a subclass for other internal-use-only contexts that wrap other internal-use-only contexts.
CharStream
This interface describes a character stream that maintains line and column number positions of the characters.
ClassFieldMap
A cache of introspection information for a specific class instance.
ClassMap
A cache of introspection information for a specific class instance.
ClasspathResourceLoader
ClasspathResourceLoader is a simple loader that will load templates from the classpath.
ClassUtils
Simple utility functions for manipulating classes and resources from the classloader.
ContentResource
This class represent a general text resource that may have been retrieved from any number of possible sources.
Context
Interface describing the application data context.
ContextAware
Event handlers implementing this interface will automatically have the method setContext called before each event.
ConversionHandler
Deprecated.
use `TypeConversionHandler`
Converter<T>
Converts a value to type T
DatabaseObjectsFactory
Factory for creating connections and prepared statements
DataSourceResourceLoader
This is a simple template file loader that loads templates from a DataSource instead of plain files.
DefaultDatabaseObjectsFactory
Database objects factory which will obtain a new connection from the data source and prepare needed statements at each call
Define
Directive that puts an unrendered AST block in the context under the specified key, postponing rendering until the reference is used and rendered.
DeprecatedCheckUberspector
Chainable Uberspector that checks for deprecated method calls.
DeprecatedRuntimeConstants
Deprecated.
DeprecationAwareExtProperties
Deprecated.
it will disappear along with deprecated key names in 3.0.
Directive
Base class for all directives used in Velocity.
DirectiveConstants
Base class for all directives used in Velocity.
DuckType
Support for getAs<java.lang.reflect.Type>() convention for rendering (String), evaluating (Boolean) or doing math with (Number) references.
DuckType.Types
EnumerationIterator
An Iterator wrapper for an Enumeration.
EscapeHtmlReference
Deprecated.
impractical use
EscapeJavaScriptReference
Deprecated.
impractical use
EscapeReference
Base class for escaping references.
EscapeSqlReference
Escapes the characters in a String to be suitable to pass to an SQL query.
EscapeXmlReference
Deprecated.
impractical use
Evaluate
Evaluates the directive argument as a VTL string, using the existing context.
EventCartridge
Stores the event handlers.
EventHandler
Base interface for all event handlers
EventHandlerUtil
Calls on request all registered event handlers for a particular event.
ExtendedParseException
All Exceptions that can provide additional information about the place where the error happened (template name, column and line number) can implement this interface and the ParseErrorException will then be able to deal with this information.
ExtProperties
This class extends normal Java properties by adding the possibility to use the same key many times concatenating the value strings instead of overwriting them.
FieldMethodizer
This is a small utility class allow easy access to static fields in a class, such as string constants.
FileResourceLoader
A loader for templates stored on the file system.
Filter
Velocity will call the writeReference method on any Writer that implements this interface when rendering references within a template.
For
The #for directive provides the behavior of the #foreach directive but also provides an 'index' keyword that allows the user to define an optional index variable that tracks the loop iterations.
Foreach
Foreach directive used for moving through arrays, or objects that provide an Iterator.
ForeachScope
This represents scoping and metadata for #foreach, adding index, count, hasNext, isFirst and isLast info.
GetExecutor
Executor that simply tries to execute a get(key) operation.
Include
Pluggable directive that handles the #include() statement in VTL.
IncludeEventHandler
Event handler for include type directives (e.g.
IncludeNotFound
Simple event handler that checks to see if an included page is available.
IncludeRelativePath
Event handler that looks for included files relative to the path of the current template.
IndentationFixer
Helper class to fix indentation in structured mode.
Info
Little class to carry in info such as template name, line and column for information error reporting from the uberspector implementations
InputBase
Base class for directives which do input operations (e.g.
InternalContextAdapter
interface to bring all necessary internal and user contexts together.
InternalContextAdapterImpl
This adapter class is the container for all context types for internal use.
InternalEventContext
Interface for event support.
InternalWrapperContext
interface for internal context wrapping functionality
IntrospectionCacheData
Holds information for node-local context data introspection information.
IntrospectionUtils
Introspector
This basic function of this class is to return a Method object for a particular class given the name of a method and the parameters to the method in the form of an Object[] The first time the Introspector sees a class it creates a class method map for the class in question.
IntrospectorBase
Lookup a a Method object for a particular class given the name of a method and its parameters.
IntrospectorCache
This is the internal introspector cache implementation.
InvalidReferenceEventHandler
Event handler called when an invalid reference is encountered.
InvalidReferenceInfo
Convenience class to use when reporting out invalid syntax with line, column, and template name.
JarHolder
A small wrapper around a Jar
JarResourceLoader
ResourceLoader to load templates from multiple Jar files.
JJTParserState
JJTStandardParserState
LinkingUberspector
When the introspector.uberspect.class configuration property contains several uberspector class names, it means those uberspectors will be chained.
LogContext
Track location in template files during rendering by populating the slf4j MDC tags `file`, `line` and `column`.
Macro
Macro implements the macro definition directive of VTL.
Macro.MacroArg
MacroArgs holds the information for a single argument in a macro definition.
MacroOverflowException
Application-level exception thrown when macro calls within macro calls exceeds the maximum allowed depth.
MacroParseException
Exception to indicate problem happened while constructing #macro() For internal use in parser - not to be passed to app level
MapGetExecutor
GetExecutor that is smart about Maps.
MapSetExecutor
SetExecutor that is smart about Maps.
MathException
Separate exception class to distinguish math problems.
MathUtils
Utility-class for all arithmetic-operations.
All operations (+ - / *) return a Number which type is the type of the bigger argument.
Example:
`add ( Integer.valueOf(10), Integer.valueOf(1))` will return an `Integer`-Object with the value 11
`add ( Long.valueOf(10), Integer.valueOf(1))` will return an `Long`-Object with the value 11
`add ( Integer.valueOf(10), Float.valueOf(1))` will return an `Float`-Object with the value 11
Overflow checking:
For integral values (byte, short, int) there is an implicit overflow correction (the next "bigger" type will be returned).
MethodExceptionEventHandler
Event handler called when a method throws an exception.
MethodInvocationException
Application-level exception thrown when a reference method is invoked and an exception is thrown.
MethodMap
MethodMap.AmbiguousException
Simple distinguishable exception, used when we run across ambiguous overloading.
Node
This file describes the interface between the Velocity code and the JavaCC generated code.
NodeUtils
Utilities for dealing with the AST node structure.
NodeViewMode
This class is simply a visitor implementation that traverses the AST, produced by the Velocity parsing process, and creates a visual structure of the AST.
Parse
Pluggable directive that handles the `#parse()` statement in VTL.
ParseErrorException
Application-level exception thrown when a resource of any type has a syntax or other error which prevents it from being parsed.
ParseException
This exception is thrown when parse errors are encountered.
Parser
ParserConfiguration
Class gathering configured replacement characters for a specific parser class.
ParserPool
Provides instances of parsers as needed.
ParserPoolImpl
This wraps the original parser SimplePool class.
PrintExceptions
Simple event handler that renders method exceptions in the page rather than throwing the exception.
PropertyExecutor
Returned the value of object property when executed.
PublicFieldExecutor
Returns the value of a public field when executed.
PutExecutor
Executor that simply tries to execute a put(key, value) operation.
ReferenceInsertionEventHandler
Reference 'Stream insertion' event handler.
Renderable
This interface characterize objects other than ASTNodes that can be rendered to a writer using a context.
ReportInvalidReferences
Use this event handler to flag invalid references.
Resource
This class represent a general text resource that may have been retrieved from any number of possible sources.
ResourceCache
Interface that defines the shape of a pluggable resource cache for the included ResourceManager
ResourceCacheImpl
Default implementation of the resource cache for the default ResourceManager.
ResourceFactory
Class responsible for instantiating `Resource` objects, given name and type.
ResourceLoader
This is abstract class the all text resource loaders should extend.
ResourceLoaderFactory
Factory to grab a template loader.
ResourceManager
Class to manage the text resource for the Velocity Runtime.
ResourceManagerImpl
Class to manage the text resource for the Velocity Runtime.
ResourceNotFoundException
Application-level exception thrown when a resource of any type isn't found by the Velocity engine.
RuntimeConstants
This class defines the keys that are used in the velocity.properties file so that they can be referenced as a constant within Java code.
RuntimeConstants.SpaceGobbling
Space gobbling modes
RuntimeInstance
This is the Runtime system for Velocity.
RuntimeMacro
This class acts as a proxy for potential macros.
RuntimeServices
Interface for internal runtime services that are needed by the various components w/in Velocity.
RuntimeServicesAware
Use this interface to automatically have the method setRuntimeServices called at initialization.
RuntimeSingleton
This is the Runtime system for Velocity.
Scope
This handles context scoping and metadata for directives.
Scope.Info
Class to encapsulate and provide access to info about the current scope for debugging.
SecureIntrospectorControl
Interface used to determine which methods are allowed to be executed.
SecureIntrospectorImpl
Prevent "dangerous" classloader/reflection related calls.
SecureUberspector
Use a custom introspector that prevents classloader related method calls.
SetExecutor
Abstract class that is used to execute an arbitrary method that is in introspected.
SetPropertyExecutor
Executor for looking up property names in the passed in class This will try to find a set<foo>(key, value) method
SetPublicFieldExecutor
Executor for setting public fields in objects
SimpleNode
SimplePool
Simple object pool.
StandardParser
This class is responsible for parsing a Velocity template.
StandardParserConstants
Token literal values and constants.
StandardParserDefaultVisitor
StandardParserTokenManager
Token Manager.
StandardParserTreeConstants
StandardParserVisitor
Stop
This class implements the #stop directive which allows a user to stop the merging and rendering process.
StopCommand
Stop command for directive Control objects.
StringBuilderWriter
`Writer` implementation that outputs to a `StringBuilder`.
StringResource
Wrapper for Strings containing templates, allowing to add additional meta data like timestamps.
StringResourceLoader
Resource loader that works with Strings.
StringResourceRepository
A StringResourceRepository functions as a central repository for Velocity templates stored in Strings.
StringResourceRepositoryImpl
Default implementation of StringResourceRepository.
StringUtils
This class provides some methods for dynamically invoking methods in objects, and some string manipulation and formatting methods.
Template
This class is used for controlling all template operations.
TemplateBoolean
Any object in the context which implements TemplateBoolean will use the getAsBoolean() method for #if( $ref ) calls.
TemplateInitException
Exception generated to indicate parse errors caught during directive initialization (e.g.
TemplateNumber
Any object in the context which implements TemplateNumber will be treated as a number for the purposes of arithmetic operations and comparison.
TemplateParseException
This is an extension of the ParseException, which also takes a template name.
TemplateString
Any object in the context which implements TemplateString will use the getAsString() method for rendering and empty-checks instead of toString().
Token
Describes the input token stream.
TokenMgrError
Token Manager Error.
TypeConversionHandler
A conversion handler adds admissible conversions between Java types whenever Velocity introspection has to map VTL methods and property accessors to Java methods.
TypeConversionHandlerImpl
A conversion handler adds admissible conversions between Java types whenever Velocity introspection has to map VTL methods and property accessors to Java methods.
Uberspect
'Federated' introspection/reflection interface to allow the introspection behavior in Velocity to be customized.
UberspectImpl
Implementation of Uberspect to provide the default introspective functionality of Velocity
UberspectImpl.VelGetterImpl
UberspectImpl.VelMethodImpl
Implementation of VelMethod
UberspectImpl.VelSetterImpl
UberspectPublicFields
Implementation of Uberspect to additionally provide access to public fields.
UnicodeInputStream
This is an input stream that is unicode BOM aware.
URLResourceLoader
This is a simple URL-based loader.
VelMethod
Method used for regular method invocation $foo.bar()
VelocimacroFactory
VelocimacroFactory.java manages the set of VMs in a running Velocity engine.
VelocimacroManager
Manages VMs in namespaces.
VelocimacroProxy
VelocimacroProxy.java a proxy Directive-derived object to fit with the current directive system
Velocity
This class provides services to the application developer, such as: Simple Velocity Runtime engine initialization methods.
VelocityCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
VelocityContext
General purpose implementation of the application Context interface for general application use.
VelocityEngine
This class provides a separate new-able instance of the Velocity template engine.
VelocityEngineVersion
VelocityException
Base class for Velocity runtime exceptions thrown to the application layer.
VelocityWriter
Implementation of a fast Writer.
VelPropertyGet
Interface defining a 'getter'.
VelPropertySet
Interface used for setting values that appear to be properties in Velocity.