public abstract class Version
extends java.lang.Object
RevisionDate
,
RevisionNumber
,
SimpleDateFormat
修飾子とタイプ | フィールドと説明 |
---|---|
static java.lang.String |
SVN_DATE_FORMAT
Date format used by Subversions "Date" keyword.
|
コンストラクタと説明 |
---|
Version() |
修飾子とタイプ | メソッドと説明 |
---|---|
static java.util.Date |
getDate(java.lang.Class klass)
Parses the given class for its
RevisionDate annotation. |
static java.lang.Integer |
getRevision(java.lang.Class klass)
Parses the given class for its
RevisionNumber annotation. |
static java.lang.String |
stringFromSvnString(java.lang.String keyword)
Parses the given
String to remove the leading "$", keyword name,
and colons. |
public static final java.lang.String SVN_DATE_FORMAT
SimpleDateFormat
in order to parse
RevisionDate
values.public static java.lang.Integer getRevision(java.lang.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 java.util.Date getDate(java.lang.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 java.lang.String stringFromSvnString(java.lang.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.