|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.system.Version
public abstract class Version
static utililty for checking Omero classes for revision number and date.
RevisionDate
,
RevisionNumber
,
SimpleDateFormat
Field Summary | |
---|---|
static String |
SVN_DATE_FORMAT
Date format used by Subversions "Date" keyword. |
Constructor Summary | |
---|---|
Version()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SVN_DATE_FORMAT
SimpleDateFormat
in order to parse
RevisionDate
values.
Constructor Detail |
---|
public Version()
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.