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 Alternator Utility class for easily alternating over values in a list.AlternatorTool Deprecated. use CSS3 nth-child(even/odd) selectors or #if($foreach.index % 2)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> CollectionTool CollectionTool allows a user to sort a collection (or array, iterator, etc) on any arbitrary set of properties exposed by the objects contained within the collection, and to generate arrays by splitting strings.CollectionTool.PropertiesComparator Does all of the comparisonsComparisonDateTool Tool for comparingDateandCalendarvalues in Velocity templates.ContextTool Tool for convenient access toContextdata and meta-data.ConversionTool Deprecated. use NumberTool for numbers and booleans formatting/parsing, DateTool for date/time formatting/parsing, or CollectionTool for toStrings().DateTool Tool for working withDateandCalendarin Velocity templates.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.FormatConfig Implements common logic and constants for tools which allow their default format to be configured.ImportSupport Provides methods to import arbitrary local or remote resources as strings, generic version.ImportSupport.SafeClosingHttpURLConnectionReader ImportTool General-purpose text-importing tool for templates.JsonContent Container for *either* an array *or* an objectJsonTool Tool which can parse a JSON file.LinkTool The LinkTool provides many methods to work with URIs and can help you:LocaleConfig Implements common logic and constants for tools which allow their defaultLocaleto be configured.LogTool This tool is used to log from within templates.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.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 Deprecated. use CollectionTool sort methodsValueParser Utility class for easy parsing of String values held in a Map.XmlTool Tool for reading/navigating XML files, with XPath expressions support.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.