Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
23 years ago | |
---|---|---|
.. | ||
docs/manual | 23 years ago | |
src/main/org/apache/tools/ant | 23 years ago | |
README | 23 years ago |
Ant Filter Readers
==================
Usecase:
========
* Usage of filtering has become a common pattern in
Ant's tasks. Filtering is being performed one way or
another in tasks like <copy>, <move>, <fixcrlf>,
<loadfile>, etc.
* There is no generic way to add custom filters
currently to these tasks. User has to either extend
the task to add custom filter processing or add
more attributes as needed to the task itself.
* If user is provided with a pluggable filtering
mechanism, changes to built-in tasks can be mininized,
while at the same time providing increased flexibility
to the user.
Design:
======
* FilterReaderSet is a collection of 'AntFilterReader's
* Each AntFilterReader encloses the custom class representing
the actual java.io.FilterReader and contains configuration
parameters that may be used by the custom class if it
implements the org.apache.tools.ant.types.Parameterizable
interface.
* Custom filter readers can be created easily even
without using any of Ant's API - all one needs to
do to create a custom filter is to extend
java.io.FilterReader.
* If the extended class also implements Parameterizable,
operation parameters can be made available to the
custom filter.
* Each FilterReader is piped through the other, if any, in
the chain, in the order of declaration.
Example:
=======
<loadfile srcFile="foo" property="bar">
<filterreaderset>
<filterreader classname="org.apache.tools.ant.filters.StripLineComments">
<param name="cpp.comment" value="//"/>
<param name="oracle.comment" value="REM"/>
<param name="dbms.comment" value="--"/>
</filterreader>
<filterreader classname="org.apache.tools.ant.filters.StripLineBreaks"/>
</filterreaderset>
</loadfile>
The above example loads the contents of the file foo,
filters out the lines that begin with //, REM and --,
removes line breaks and then stores the result in
the property named bar.
No Description
Java HTML XSLT GAP Shell other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》