java.lang.Cloneablepublic class Tstamp extends Task
| Modifier and Type | Class | Description |
|---|---|---|
class |
Tstamp.CustomFormat |
This nested element that allows a property to be set
to the current date and time in a given format.
|
static class |
Tstamp.Unit |
set of valid units to use for time offsets.
|
description, location, project| Constructor | Description |
|---|---|
Tstamp() |
| Modifier and Type | Method | Description |
|---|---|---|
Tstamp.CustomFormat |
createFormat() |
create a custom format with the current prefix.
|
void |
execute() |
create the timestamps.
|
protected java.util.Date |
getNow() |
Return the
Date instance to use as base for DSTAMP, TSTAMP and TODAY. |
protected java.util.Optional<java.util.Date> |
getNow(java.lang.String propertyName,
java.util.function.Function<java.lang.String,java.util.Date> map,
java.util.function.BiFunction<java.lang.String,java.lang.String,java.lang.String> log) |
Checks and returns a Date if the specified property is set.
|
void |
setPrefix(java.lang.String prefix) |
Set a prefix for the properties.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, getDescription, getLocation, getProject, setDescription, setLocation, setProjectbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypepublic void setPrefix(java.lang.String prefix)
prefix - the prefix to use.public void execute()
throws BuildException
execute in class TaskBuildException - on error.public Tstamp.CustomFormat createFormat()
protected java.util.Date getNow()
Date instance to use as base for DSTAMP, TSTAMP and TODAY.protected java.util.Optional<java.util.Date> getNow(java.lang.String propertyName,
java.util.function.Function<java.lang.String,java.util.Date> map,
java.util.function.BiFunction<java.lang.String,java.lang.String,java.lang.String> log)
propertyName - name of the property to checkmap - conversion of the property value as string to Datelog - supplier of the log message containing the property name and value if
the conversion fails