|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.objectweb.fractal.adl.timestamp.Timestamp
public class Timestamp
Allows to attach timestamp information to AST nodes.
| Field Summary | |
|---|---|
static java.lang.String |
TIMESTAMP_DECORATION
the name of the decoration used to attache timestamp values. |
| Constructor Summary | |
|---|---|
Timestamp()
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
static long |
getTimestamp(Node node)
Returns the value of the attached timestamp or zero if the
given node has no attached timestamp. |
int |
hashCode()
|
static boolean |
isNodeMoreRecentThan(Node node,
java.io.File file)
Returns true if and only if the given node has an attached
timestamp and is greater than the timestamp of the given file, or the node
has no attached timestamp, or the file does not exist. |
static boolean |
isNodeMoreRecentThan(Node node,
long timestamp)
Returns true if and only if the given node has an attached
timestamp and is greater than the given timestamp, or the node has no
attached timestamp, or the given timestamp is null. |
java.lang.Object |
mergeDecoration(java.lang.Object overridingDecoration)
|
static void |
setTimestamp(Node node,
java.io.File file)
Attaches the timestamp of the given file to the given node. |
static void |
setTimestamp(Node node,
long timestamp)
Attaches the given timestamp to the given node. |
static void |
setTimestamp(Node node,
java.net.URL url)
Attaches the timestamp of the file denoted by the given URL to the given node. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String TIMESTAMP_DECORATION
| Constructor Detail |
|---|
public Timestamp()
| Method Detail |
|---|
public java.lang.Object mergeDecoration(java.lang.Object overridingDecoration)
throws MergeException
mergeDecoration in interface MergeableDecorationMergeException
public static void setTimestamp(Node node,
long timestamp)
node - the node to which the timestamp will be attached.timestamp - the timestamp value;
public static void setTimestamp(Node node,
java.io.File file)
node - the node to which the timestamp will be attached.file - a filesetTimestamp(Node, long)
public static void setTimestamp(Node node,
java.net.URL url)
node - the node to which the timestamp will be attached.url - a URL.setTimestamp(Node, long)public static long getTimestamp(Node node)
zero if the
given node has no attached timestamp.
node - a node.
zero.
public static boolean isNodeMoreRecentThan(Node node,
long timestamp)
true if and only if the given node has an attached
timestamp and is greater than the given timestamp, or the node has no
attached timestamp, or the given timestamp is null.
node - a node.timestamp - the timestamp to be compared.
true if and only if the given node has an attached
timestamp and is greater than the given timestamp, or the node has
no attached timestamp.
public static boolean isNodeMoreRecentThan(Node node,
java.io.File file)
true if and only if the given node has an attached
timestamp and is greater than the timestamp of the given file, or the node
has no attached timestamp, or the file does not exist.
node - a node.file - a file.
true if and only if the given node has an attached
timestamp and is greater than the given timestamp, or the node has
no attached timestamp.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||