public abstract class Version extends Object
RevisionDate
,
RevisionNumber
,
SimpleDateFormat
Modifier and Type | Field and Description |
---|---|
static String |
SVN_DATE_FORMAT
Date format used by Subversions "Date" keyword.
|
Constructor and Description |
---|
Version() |
Modifier and Type | Method and Description |
---|---|
static Date |
getDate(Class klass)
Parses the given class for its
RevisionDate annotation. |
static Integer |
getRevision(Class klass)
Parses the given class for its
RevisionNumber annotation. |
static String |
stringFromSvnString(String keyword)
Parses the given
String to remove the leading "$", keyword name,
and colons. |
public static final String SVN_DATE_FORMAT
SimpleDateFormat
in order to parse
RevisionDate
values.public static Integer getRevision(Class klass)
RevisionNumber
annotation. A null
class argument is tolerated and returns a null Integer
.
Otherwise, the String
contained in RevisionNumber.value()
will be parsed as an Integer after processing by
stringFromSvnString(String)
if possible. Otherwise a null is
returned.RevisionNumber.value()
public static Date getDate(Class klass)
RevisionDate
annotation. A null
class argument is tolerated and returns a null Date
. Otherwise,
the String
contained in RevisionDate.value()
will be
parsed as an Date after processing by
stringFromSvnString(String)
and a SimpleDateFormat
configured with SVN_DATE_FORMAT
if possible. Otherwise a null is
returned.RevisionDate.value()
public static String stringFromSvnString(String keyword)
String
to remove the leading "$", keyword name,
and colons. This assumes that Subversion keywords are formatted such that
the first space and the last space in the String, directly surround the
value of interest. If this does not hold or if the argument is null, a
null is returned.
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.