Package org.apache.velocity.tools.generic
Contains a collection of reusable, general-purpose "tools" for Velocity.
These tools are independent of the VelocityView classes and may be used
in any context.
Package Specification
Related Documentation
-
Interface Summary Interface Description LoopTool.Condition Represents a function into which aLoopTool.ManagedIteratorcan pass it's next element to see if anLoopTool.Actionshould be taken. -
Class Summary Class Description AbstractLockConfig Deprecated. UseSafeConfiginsteadAlternator Utility class for easily alternating over values in a list.AlternatorTool Simple tool to provide easy in-template instantiation ofAlternators from varying "list" types or individual arguments.ClassTool This tool is meant to simplify reflective lookup of information about aClassand itsFields,Methods, andConstructors.ClassTool.CallableSub<T extends ClassTool.CallableSub> ClassTool.ConstructorSub A simplified wrapping interface for inspecting features of aConstructorin an inspected Class.ClassTool.FieldSub A simplified wrapping interface for inspecting features of aFieldin an inspected Class.ClassTool.MethodSub A simplified wrapping interface for inspecting features of aMethodin an inspected Class.ClassTool.Sub<T extends ClassTool.Sub> ComparisonDateTool ContextTool Tool for convenient access toContextdata and meta-data.ConversionTool Utility class for easy conversion of String values to richer types.DateTool DisplayTool Provides general utility methods for controlling the display of references.DisplayTool.Measurements Measures the dimensions of the string given to its constructor.EscapeTool Tool for working with escaping in Velocity templates.FieldTool This is a simple tools class to allow easy access to static fields in a class, such as string constants from within a template.FieldTool.FieldToolSub Holds aMapof results for a particular class.FieldTool.MutableField FormatConfig Implements common logic and constants for tools which allow their default format to be configured.IteratorTool Deprecated. UseLoopToolinsteadLinkTool The LinkTool provides many methods to work with URIs and can help you: construct full URIs (opaque, absolute or relative) encode and decode URLs (part or whole) retrieve path info for the current request and more..ListTool Deprecated. LocaleConfig Implements common logic and constants for tools which allow their defaultLocaleto be configured.LoopTool A convenience tool to use with #foreach loops.LoopTool.ActionCondition Composition class which associates anLoopTool.ActionandLoopTool.Conditionfor aLoopTool.ManagedIterator.LoopTool.Comparison Base condition class for conditions (assumption here is that conditions are all comparative.LoopTool.Equals Simple condition that checks elements in the iterator for equality to a specified Object.LoopTool.ManagedIterator Iterator implementation that wraps a standardIteratorand allows it to be prematurely stopped, skipped ahead, and associated with a name for advanced nested loop control.LoopTool.SyncedIterator Simple wrapper to make it easy to keep an arbitray Iterator in sync with aLoopTool.ManagedIterator.MarkupTool NOTE: This tools is considered "alpha" quality due to lack of testing and a generally unpolished API.MarkupTool.Tag MathTool Tool for performing math in Velocity.NumberTool Tool for working withNumberin Velocity templates.RenderTool This tool exposes methods to evaluate the given strings as VTL (Velocity Template Language) using either a pre-configured context or one you provide directly.ResourceTool Tool for accessing ResourceBundles and formatting messages therein.SafeConfig Implements common logic and constants for tools which automatically locks down thepublic void configure(Map params)method after it is called once.SortTool SortTool allows a user to sort a collection (or array, iterator, etc) on any arbitary set of properties exposed by the objects contained within the collection.SortTool.PropertiesComparator Does all of the comparisonsValueParser Utility class for easy parsing of String values held in a Map.XmlTool Tool for reading/navigating XML files.XmlTool.NodeIterator Iterator implementation that wraps a Node list iterator to return new XmlTool instances for each item in the wrapped iterator.s -
Enum Summary Enum Description LoopTool.Action Represents an automatic action taken by aLoopTool.ManagedIteratorwhen aLoopTool.Conditionis satisfied by the subsequent element.