????

Your IP : 216.73.216.152


Current Path : /opt/ant/manual/api/org/apache/tools/ant/taskdefs/
Upload File :
Current File : //opt/ant/manual/api/org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Tue May 22 06:24:53 CEST 2012 -->
<title>Tstamp.CustomFormat (Apache Ant API)</title>
<meta name="date" content="2012-05-22">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Tstamp.CustomFormat (Apache Ant API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.html" title="class in org.apache.tools.ant.taskdefs"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.Unit.html" title="class in org.apache.tools.ant.taskdefs"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html" target="_top">Frames</a></li>
<li><a href="Tstamp.CustomFormat.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.tools.ant.taskdefs</div>
<h2 title="Class Tstamp.CustomFormat" class="title">Class Tstamp.CustomFormat</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.taskdefs.Tstamp.CustomFormat</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.html" title="class in org.apache.tools.ant.taskdefs">Tstamp</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Tstamp.CustomFormat</span>
extends java.lang.Object</pre>
<div class="block">This nested element that allows a property to be set
 to the current date and time in a given format.
 The date/time patterns are as defined in the
 Java SimpleDateFormat class.
 The format element also allows offsets to be applied to
 the time to generate different time values.</div>
<dl><dt><span class="strong">To do:</span></dt>
  <dd>consider refactoring out into a re-usable element.</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#Tstamp.CustomFormat()">Tstamp.CustomFormat</a></strong>()</code>
<div class="block">Create a format</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#execute(org.apache.tools.ant.Project, java.util.Date, org.apache.tools.ant.Location)">execute</a></strong>(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;project,
       java.util.Date&nbsp;date,
       <a href="../../../../../org/apache/tools/ant/Location.html" title="class in org.apache.tools.ant">Location</a>&nbsp;location)</code>
<div class="block">validate parameter and execute the format.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setLocale(java.lang.String)">setLocale</a></strong>(java.lang.String&nbsp;locale)</code>
<div class="block">The locale used to create date/time string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setOffset(int)">setOffset</a></strong>(int&nbsp;offset)</code>
<div class="block">The numeric offset to the current time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setPattern(java.lang.String)">setPattern</a></strong>(java.lang.String&nbsp;pattern)</code>
<div class="block">The date/time pattern to be used.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setProperty(java.lang.String)">setProperty</a></strong>(java.lang.String&nbsp;propertyName)</code>
<div class="block">The property to receive the date/time string in the given pattern</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setTimezone(java.lang.String)">setTimezone</a></strong>(java.lang.String&nbsp;id)</code>
<div class="block">The timezone to use for displaying time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setUnit(java.lang.String)">setUnit</a></strong>(java.lang.String&nbsp;unit)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>since 1.5.x.
             setUnit(String) is deprecated and is replaced with
             setUnit(Tstamp.Unit) to make Ant's
             Introspection mechanism do the work and also to
             encapsulate operations on the unit in its own
             class.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html#setUnit(org.apache.tools.ant.taskdefs.Tstamp.Unit)">setUnit</a></strong>(<a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.Unit.html" title="class in org.apache.tools.ant.taskdefs">Tstamp.Unit</a>&nbsp;unit)</code>
<div class="block">The unit of the offset to be applied to the current time.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Tstamp.CustomFormat()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Tstamp.CustomFormat</h4>
<pre>public&nbsp;Tstamp.CustomFormat()</pre>
<div class="block">Create a format</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="setProperty(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setProperty</h4>
<pre>public&nbsp;void&nbsp;setProperty(java.lang.String&nbsp;propertyName)</pre>
<div class="block">The property to receive the date/time string in the given pattern</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - the name of the property.</dd></dl>
</li>
</ul>
<a name="setPattern(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPattern</h4>
<pre>public&nbsp;void&nbsp;setPattern(java.lang.String&nbsp;pattern)</pre>
<div class="block">The date/time pattern to be used. The values are as
 defined by the Java SimpleDateFormat class.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pattern</code> - the pattern to use.</dd><dt><span class="strong">See Also:</span></dt><dd><code>SimpleDateFormat</code></dd></dl>
</li>
</ul>
<a name="setLocale(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLocale</h4>
<pre>public&nbsp;void&nbsp;setLocale(java.lang.String&nbsp;locale)</pre>
<div class="block">The locale used to create date/time string.
 The general form is "language, country, variant" but
 either variant or variant and country may be omitted.
 For more information please refer to documentation
 for the java.util.Locale  class.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>locale</code> - the locale to use.</dd><dt><span class="strong">See Also:</span></dt><dd><code>Locale</code></dd></dl>
</li>
</ul>
<a name="setTimezone(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTimezone</h4>
<pre>public&nbsp;void&nbsp;setTimezone(java.lang.String&nbsp;id)</pre>
<div class="block">The timezone to use for displaying time.
 The values are as defined by the Java TimeZone class.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>id</code> - the timezone value.</dd><dt><span class="strong">See Also:</span></dt><dd><code>TimeZone</code></dd></dl>
</li>
</ul>
<a name="setOffset(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOffset</h4>
<pre>public&nbsp;void&nbsp;setOffset(int&nbsp;offset)</pre>
<div class="block">The numeric offset to the current time.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>offset</code> - the offset to use.</dd></dl>
</li>
</ul>
<a name="setUnit(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUnit</h4>
<pre>public&nbsp;void&nbsp;setUnit(java.lang.String&nbsp;unit)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>since 1.5.x.
             setUnit(String) is deprecated and is replaced with
             setUnit(Tstamp.Unit) to make Ant's
             Introspection mechanism do the work and also to
             encapsulate operations on the unit in its own
             class.</i></div>
<div class="block">Set the unit type (using String).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>unit</code> - the unit to use.</dd></dl>
</li>
</ul>
<a name="setUnit(org.apache.tools.ant.taskdefs.Tstamp.Unit)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUnit</h4>
<pre>public&nbsp;void&nbsp;setUnit(<a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.Unit.html" title="class in org.apache.tools.ant.taskdefs">Tstamp.Unit</a>&nbsp;unit)</pre>
<div class="block">The unit of the offset to be applied to the current time.
 Valid Values are
 <ul>
    <li>millisecond</li>
    <li>second</li>
    <li>minute</li>
    <li>hour</li>
    <li>day</li>
    <li>week</li>
    <li>month</li>
    <li>year</li>
 </ul>
 The default unit is day.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>unit</code> - the unit to use.</dd></dl>
</li>
</ul>
<a name="execute(org.apache.tools.ant.Project, java.util.Date, org.apache.tools.ant.Location)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>execute</h4>
<pre>public&nbsp;void&nbsp;execute(<a href="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;project,
           java.util.Date&nbsp;date,
           <a href="../../../../../org/apache/tools/ant/Location.html" title="class in org.apache.tools.ant">Location</a>&nbsp;location)</pre>
<div class="block">validate parameter and execute the format.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>project</code> - project to set property in.</dd><dd><code>date</code> - date to use as a starting point.</dd><dd><code>location</code> - line in file (for errors)</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.html" title="class in org.apache.tools.ant.taskdefs"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/tools/ant/taskdefs/Tstamp.Unit.html" title="class in org.apache.tools.ant.taskdefs"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/tools/ant/taskdefs/Tstamp.CustomFormat.html" target="_top">Frames</a></li>
<li><a href="Tstamp.CustomFormat.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>