Cari di Apache Ant 
    Apache Ant User Manual
Daftar Isi
(Sebelumnya) PropertyFilePvcs (Berikutnya)
Apache Ant Tasks

PropertyHelper

PropertyHelper

Description

This task is provided for the purpose of allowing the user to(a) install a different PropertyHelper at runtime, or(b) (hopefully more often) install one or more PropertyHelper Delegates into thePropertyHelper active on the current Project. This is somewhat advanced Apache Ant usage andassumes a working familiarity with the modern Ant APIs. See the description of Ant'sProperty Helper for more information.Since Ant 1.8.0

Parameters specified as nested elements

PropertyHelper

You may specify exactly one configured org.apache.tools.ant.PropertyHelper instance.

PropertyHelper.Delegate

You may specify, either in conjunction with a new PropertyHelper or not, one ormore configured implementations of the org.apache.tools.ant.PropertyHelper.Delegateinterface. A deeper understanding of the API is required here, however, as Delegateis a marker interface only: the nested arguments must implement a Delegatesubinterface in order to do anything meaningful.

delegate

A generic <delegate> element which can use project referencesis also provided:

Parameters
Attribute Description Required
refid The id of a PropertyHelper.Delegate to install. Yes

Examples

Install a completely different PropertyHelper implementation (assuming MyPropertyHelper extends PropertyHelper):

<componentdef classname="org.example.MyPropertyHelper"  name="mypropertyhelper"/><propertyhelper>  <mypropertyhelper/></propertyhelper>

Add a new PropertyEvaluator delegate (assuming MyPropertyEvaluator implements PropertyHelper.PropertyEvaluator). Note that PropertyHelper uses the configured delegates in LIFO order. I.e. the delegate added by this task will be consulted before any previously defined delegate and in particular before the built-in ones.

<componentdef classname="org.example.MyPropertyEvaluator"  name="mypropertyevaluator"/><propertyhelper>  <mypropertyevaluator/></propertyhelper>

Add a new PropertyEvaluator delegate using the refid syntax:

<typedef classname="org.example.MyPropertyEvaluator" name="mypropertyevaluator"/><mypropertyevaluator id="evaluator"/><propertyhelper>  <delegate refid="evaluator"/></propertyhelper>
(Sebelumnya) PropertyFilePvcs (Berikutnya)