|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jrcs.rcs.KeywordsFormat
final class KeywordsFormat
Formatter for the RCS keywords. It is intended as an helper class to replace the use of gnu.regexp. This class is NOT threadsafe.
Field Summary | |
---|---|
(package private) java.text.Format |
Author_FORMAT
|
private Pattern |
AUTHOR_RE
|
(package private) java.text.Format |
Date_FORMAT
|
private Pattern |
DATE_RE
|
(package private) java.text.Format |
Header_FORMAT
|
private Pattern |
HEADER_RE
|
(package private) java.text.Format |
Id_FORMAT
|
private Pattern |
ID_RE
|
(package private) java.text.Format |
Locker_FORMAT
|
private Pattern |
LOCKER_RE
|
private Perl5Matcher |
matcher
the matcher used for replacement |
(package private) java.text.Format |
RCSFile_FORMAT
|
private Pattern |
RCSFILE_RE
|
(package private) java.text.Format |
Revision_FORMAT
|
private Pattern |
REVISION_RE
|
(package private) java.text.Format |
Source_FORMAT
|
private Pattern |
SOURCE_RE
|
(package private) java.text.Format |
State_FORMAT
|
private Pattern |
STATE_RE
|
private StringSubstitution |
subst
the substitution instance to be reused |
Constructor Summary | |
---|---|
KeywordsFormat()
|
Method Summary | |
---|---|
(package private) java.lang.String |
reset(java.lang.String text)
Reinitialize all RCS keywords match. |
private java.lang.String |
substitute(java.lang.String input,
Pattern pattern,
java.lang.String substitution)
Helper method for substitution that will substitute all matches of a given pattern. |
(package private) java.lang.String |
update(java.lang.String text,
java.lang.Object[] revisionInfo)
update the given text made of RCS keywords with the appropriate revision info. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final java.text.Format Header_FORMAT
final java.text.Format Id_FORMAT
final java.text.Format RCSFile_FORMAT
final java.text.Format Revision_FORMAT
final java.text.Format Date_FORMAT
final java.text.Format Author_FORMAT
final java.text.Format State_FORMAT
final java.text.Format Locker_FORMAT
final java.text.Format Source_FORMAT
private final Pattern ID_RE
private final Pattern HEADER_RE
private final Pattern SOURCE_RE
private final Pattern RCSFILE_RE
private final Pattern REVISION_RE
private final Pattern DATE_RE
private final Pattern AUTHOR_RE
private final Pattern STATE_RE
private final Pattern LOCKER_RE
private final StringSubstitution subst
private final Perl5Matcher matcher
Constructor Detail |
---|
KeywordsFormat()
Method Detail |
---|
java.lang.String update(java.lang.String text, java.lang.Object[] revisionInfo)
text
- the input text containing the RCS keywords.revisionInfo
- the revision information.
java.lang.String reset(java.lang.String text)
text
- the text to look for RCS keywords.
private final java.lang.String substitute(java.lang.String input, Pattern pattern, java.lang.String substitution)
input
- the text to look for substitutions.pattern
- the pattern to replace in the input text.substitution
- the string to use as a replacement for the pattern.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |