Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.cvslib

pack-priv Class ChangeLogParser

extends Object
Class Inheritance
Imports
java.text.ParseException, .SimpleDateFormat, java.util.ArrayList, .Collections, .Date, .Hashtable, .List, .Locale, .Map, .StringTokenizer, .TimeZone, org.apache.tools.ant.taskdefs.AbstractCvsTask, .AbstractCvsTask.Module

A class used to parse the output of the CVS log command.

Field Summary

Modifier and TypeField and Description
private String
private String
private final SimpleDateFormat
cvs1129InputDate

New formatter used to parse CVS date/timestamp.

private String
private final Map<String, CVSEntry>
entries

rcs entries

private String
private static final int
private static final int
private static final int
private static final int
private static final int
private final SimpleDateFormat
inputDate

input format for dates read in from cvs log

private final int[]
private final String[]
private String
private final boolean
private String
private int

Constructor Summary

AccessConstructor and Description
public
public
ChangeLogParser(boolean remote, String packageName, List<AbstractCvsTask.Module> modules)

Method Summary

Modifier and TypeMethod and Description
public CVSEntry[]

Returns:

a list of rcs entries as an array
getEntrySetAsArray
()

Get a list of rcs entries as an array.

private Date

Returns:

the date object or null if unknown date format
parseDate
(final String
the string holding date
date
)

Parse date out from expected format.

private void
processComment(final String
the line
line
)

Process a line while in "GET_COMMENT" state.

private void
processDate(final String
the line to process
line
)

Process a line while in "DATE" state.

private void
processFile(final String
the line to process
line
)

Process a line while in "GET_FILE" state.

private void
processGetPreviousRevision(final String
the line to process
line
)

Process a line while in "GET_PREVIOUS_REVISION" state.

private void
processRevision(final String
the line to process
line
)

Process a line while in "REVISION" state.

public void
reset()

Reset all internal attributes except status.

private void
saveEntry()

Utility method that saves the current entry.

public void
stdout(final String
the line to process
line
)

Receive notification about the process writing to standard output.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authorback to summary
private String author
commentback to summary
private String comment
cvs1129InputDateback to summary
private final SimpleDateFormat cvs1129InputDate

New formatter used to parse CVS date/timestamp.

dateback to summary
private String date
entriesback to summary
private final Map<String, CVSEntry> entries

rcs entries

fileback to summary
private String file
GET_COMMENTback to summary
private static final int GET_COMMENT
GET_DATEback to summary
private static final int GET_DATE
GET_FILEback to summary
private static final int GET_FILE
GET_PREVIOUS_REVback to summary
private static final int GET_PREVIOUS_REV
GET_REVISIONback to summary
private static final int GET_REVISION
inputDateback to summary
private final SimpleDateFormat inputDate

input format for dates read in from cvs log

moduleNameLengthsback to summary
private final int[] moduleNameLengths
moduleNamesback to summary
private final String[] moduleNames
previousRevisionback to summary
private String previousRevision
remoteback to summary
private final boolean remote
revisionback to summary
private String revision
statusback to summary
private int status

Constructor Detail

ChangeLogParserback to summary
public ChangeLogParser()
ChangeLogParserback to summary
public ChangeLogParser(boolean remote, String packageName, List<AbstractCvsTask.Module> modules)

Method Detail

getEntrySetAsArrayback to summary
public CVSEntry[] getEntrySetAsArray()

Get a list of rcs entries as an array.

Returns:CVSEntry[]

a list of rcs entries as an array

parseDateback to summary
private Date parseDate(final String date)

Parse date out from expected format.

Parameters
date:String

the string holding date

Returns:Date

the date object or null if unknown date format

processCommentback to summary
private void processComment(final String line)

Process a line while in "GET_COMMENT" state.

Parameters
line:String

the line

processDateback to summary
private void processDate(final String line)

Process a line while in "DATE" state.

Parameters
line:String

the line to process

processFileback to summary
private void processFile(final String line)

Process a line while in "GET_FILE" state.

Parameters
line:String

the line to process

processGetPreviousRevisionback to summary
private void processGetPreviousRevision(final String line)

Process a line while in "GET_PREVIOUS_REVISION" state.

Parameters
line:String

the line to process

processRevisionback to summary
private void processRevision(final String line)

Process a line while in "REVISION" state.

Parameters
line:String

the line to process

resetback to summary
public void reset()

Reset all internal attributes except status.

saveEntryback to summary
private void saveEntry()

Utility method that saves the current entry.

stdoutback to summary
public void stdout(final String line)

Receive notification about the process writing to standard output.

Parameters
line:String

the line to process