| Modifier and Type | Class and Description |
|---|---|
| public class | Tstamp.CustomFormat
This nested element that allows a property to be set to the current date and time in a given format. |
| public static class | Tstamp.Unit
set of valid units to use for time offsets. |
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private static final String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Tstamp. | |
| public void | |
| protected Date | |
| protected Optional | Returns: Optional containing the Date or nullname of the property to check propertyName, Function<String, Date> conversion of the property value as string to Date map, BiFunction<String, String, String> supplier of the log message containing the property name and value if
the conversion fails log)Checks and returns a Date if the specified property is set. |
| public void | |
| private void | setProperty(String name, String value)
helper that encapsulates prefix logic and property setting policy (i.e. we use setNewProperty instead of setProperty). |
| customFormats | back to summary |
|---|---|
| private List<Tstamp. | |
| ENV_SOURCE_DATE_EPOCH | back to summary |
|---|---|
| private static final String ENV_SOURCE_DATE_EPOCH | |
| prefix | back to summary |
|---|---|
| private String prefix | |
| Tstamp | back to summary |
|---|---|
| public Tstamp() | |
| createFormat | back to summary |
|---|---|
| public Tstamp. create a custom format with the current prefix.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. create the timestamps. Custom ones are done before the standard ones, to get their retaliation in early.
| |
| getNow | back to summary |
|---|---|
| protected Date getNow() Return the
| |
| getNow | back to summary |
|---|---|
| protected Optional Checks and returns a Date if the specified property is set. | |
| setPrefix | back to summary |
|---|---|
| public void setPrefix(String prefix) Set a prefix for the properties. If the prefix does not end with a "." one is automatically added.
| |
| setProperty | back to summary |
|---|---|
| private void setProperty(String name, String value) helper that encapsulates prefix logic and property setting policy (i.e. we use setNewProperty instead of setProperty). | |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private int | |
| private String | |
| private int | |
| private String | |
| private String | |
| private TimeZone | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setProperty(String
the name of the property. propertyName)The property to receive the date/time string in the given pattern |
| public void | |
| public void | |
| public void |
| country | back to summary |
|---|---|
| private String country | |
| field | back to summary |
|---|---|
| private int field | |
| language | back to summary |
|---|---|
| private String language | |
| offset | back to summary |
|---|---|
| private int offset | |
| pattern | back to summary |
|---|---|
| private String pattern | |
| propertyName | back to summary |
|---|---|
| private String propertyName | |
| timeZone | back to summary |
|---|---|
| private TimeZone timeZone | |
| variant | back to summary |
|---|---|
| private String variant | |
| CustomFormat | back to summary |
|---|---|
| public CustomFormat() | |
| execute | back to summary |
|---|---|
| public void execute(Project project, Date date, Location location) validate parameter and execute the format. | |
| setLocale | back to summary |
|---|---|
| public void setLocale(String locale) 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.
| |
| setOffset | back to summary |
|---|---|
| public void setOffset(int offset) The numeric offset to the current time.
| |
| setPattern | back to summary |
|---|---|
| public void setPattern(String pattern) The date/time pattern to be used. The values are as defined by the Java SimpleDateFormat class.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String propertyName) The property to receive the date/time string in the given pattern
| |
| setTimezone | back to summary |
|---|---|
| public void setTimezone(String id) The timezone to use for displaying time. The values are as defined by the Java TimeZone class.
| |
| setUnit | back to summary |
|---|---|
| public void setUnit(String unit)
Deprecated 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. Set the unit type (using String).
| |
| setUnit | back to summary |
|---|---|
| public void setUnit(Tstamp. The unit of the offset to be applied to the current time. Valid Values are
| |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String[] | |
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public String[] | Returns: the value values.Implements abstract org. |
| calendarFields | back to summary |
|---|---|
| private Map<String, Integer> calendarFields | |
| DAY | back to summary |
|---|---|
| private static final String DAY | |
| HOUR | back to summary |
|---|---|
| private static final String HOUR | |
| MILLISECOND | back to summary |
|---|---|
| private static final String MILLISECOND | |
| MINUTE | back to summary |
|---|---|
| private static final String MINUTE | |
| MONTH | back to summary |
|---|---|
| private static final String MONTH | |
| SECOND | back to summary |
|---|---|
| private static final String SECOND | |
| UNITS | back to summary |
|---|---|
| private static final String[] UNITS | |
| WEEK | back to summary |
|---|---|
| private static final String WEEK | |
| YEAR | back to summary |
|---|---|
| private static final String YEAR | |
| Unit | back to summary |
|---|---|
| public Unit() Constructor for Unit enumerated type. | |
| getCalendarField | back to summary |
|---|---|
| public int getCalendarField() Convert the value to int unit value.
| |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. Get the valid values. | |