程序包 org.apache.velocity.tools.generic
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
-
类说明Utility class for easily alternating over values in a list.已过时。use CSS3 nth-child(even/odd) selectors or #if($foreach.index % 2)This tool is meant to simplify reflective lookup of information about a
Classand itsFields,Methods, andConstructors.ClassTool.CallableSub<T extends ClassTool.CallableSub>A simplified wrapping interface for inspecting features of aConstructorin an inspected Class.A simplified wrapping interface for inspecting features of aFieldin an inspected Class.A simplified wrapping interface for inspecting features of aMethodin an inspected Class.ClassTool.Sub<T extends ClassTool.Sub>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.Does all of the comparisonsTool for convenient access toContextdata and meta-data.已过时。use NumberTool for numbers formatting/parsing, DateTool for date/time formatting/parsing, or CollectionTool for toStrings().Provides general utility methods for controlling the display of references.Measures the dimensions of the string given to its constructor.Tool for working with escaping in Velocity templates.This is a simple tools class to allow easy access to static fields in a class, such as string constants from within a template.Holds aMapof results for a particular class.Implements common logic and constants for tools which allow their default format to be configured.Provides methods to import arbitrary local or remote resources as strings, generic version.General-purpose text-importing tool for templates.Container for *either* an array *or* an objectTool which can parse a JSON file.The LinkTool provides many methods to work with URIs and can help you:Implements common logic and constants for tools which allow their defaultLocaleto be configured.This tool is used to log from within templates.A convenience tool to use with #foreach loops.Represents an automatic action taken by aLoopTool.ManagedIteratorwhen aLoopTool.Conditionis satisfied by the subsequent element.Composition class which associates anLoopTool.ActionandLoopTool.Conditionfor aLoopTool.ManagedIterator.Base condition class for conditions (assumption here is that conditions are all comparative.Represents a function into which aLoopTool.ManagedIteratorcan pass it's next element to see if anLoopTool.Actionshould be taken.Simple condition that checks elements in the iterator for equality to a specified Object.Simple wrapper to make it easy to keep an arbitray Iterator in sync with aLoopTool.ManagedIterator.NOTE: This tools is considered "alpha" quality due to lack of testing and a generally unpolished API.Tool for performing math in Velocity.Tool for working withNumberin Velocity templates.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.Tool for accessing ResourceBundles and formatting messages therein.Implements common logic and constants for tools which automatically locks down thepublic void configure(Map params)method after it is called once.已过时。use CollectionTool sort methodsUtility class for easy parsing of String values held in a Map.Tool for reading/navigating XML files, with XPath expressions support.Iterator implementation that wraps a Node list iterator to return new XmlTool instances for each item in the wrapped iterator.s