|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.statcvs.input.Builder
Helps building the CvsContent
from a CVS
log. The Builder is fed by some CVS history data source, for
example a CVS log parser. The CvsContent can be retrieved
using the createCvsContent()
method.
The class also takes care of the creation of Author and Directory objects and makes sure that there's only one of these for each author name and path. It also provides LOC count services.
Constructor Summary | |
Builder(RepositoryFileManager repositoryFileManager,
FilePatternMatcher includePattern,
FilePatternMatcher excludePattern)
Creates a new Builder |
Method Summary | |
void |
buildFile(String filename,
boolean isBinary,
boolean isInAttic)
Starts building a new file. |
void |
buildModule(String moduleName)
Starts building the module. |
void |
buildRevision(RevisionData data)
Adds a revision to the current file. |
CvsContent |
createCvsContent()
Returns a CvsContent object of all files. |
Set |
getAtticFileNames()
Returns the Set of filenames that are "in the attic". |
Author |
getAuthor(String name)
returns the Author of the given name or creates it if it does not yet exist. |
Directory |
getDirectory(String filename)
Returns the Directory of the given filename or creates it if it does not yet exist. |
int |
getLOC(String filename)
|
String |
getProjectName()
|
boolean |
matchesPatterns(String filename)
Matches a filename against the include and exclude patterns. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Builder(RepositoryFileManager repositoryFileManager, FilePatternMatcher includePattern, FilePatternMatcher excludePattern)
repositoryFileManager
- the RepositoryFileManager
that
can be used to retrieve LOC counts for
the files that this builder will createincludePattern
- a list of Ant-style wildcard patterns, seperated
by : or ;excludePattern
- a list of Ant-style wildcard patterns, seperated
by : or ;Method Detail |
public void buildModule(String moduleName)
buildModule
in interface CvsLogBuilder
moduleName
- name of the modulepublic void buildFile(String filename, boolean isBinary, boolean isInAttic)
buildFile
in interface CvsLogBuilder
filename
- the file's name with path, for example "path/file.txt"isBinary
- true if it's a binary fileisInAttic
- true if the file is dead on the main branchpublic void buildRevision(RevisionData data)
buildRevision
in interface CvsLogBuilder
data
- the revisionpublic CvsContent createCvsContent() throws EmptyRepositoryException
EmptyRepositoryException
- if no adequate files were found in the
log.public String getProjectName()
public Set getAtticFileNames()
public Author getAuthor(String name)
name
- the author's name
public Directory getDirectory(String filename)
filename
- the name and path of a file, for example "src/Main.java"
public int getLOC(String filename) throws NoLineCountException
NoLineCountException
public boolean matchesPatterns(String filename)
filename
- a filename
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |