|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hudson.plugins.violations.parse.AbstractParser hudson.plugins.violations.parse.AbstractTypeParser
public abstract class AbstractTypeParser
An abstract xml parsing class for parsing violation configuration files using an XML pull parser.
Constructor Summary | |
---|---|
AbstractTypeParser()
|
Method Summary | |
---|---|
protected java.lang.String |
fixAbsolutePath(java.lang.String abs)
Fix an absolute path. |
protected FullFileModel |
getFileModel(java.lang.String absoluteName)
Get the full file model object for an absolute name. |
protected FullFileModel |
getFileModel(java.lang.String name,
java.io.File sourceFile)
Get the full file model for a particular relative name and source file. |
protected FullBuildModel |
getModel()
Get the build model. |
protected java.io.File |
getProjectPath()
Get the project path. |
protected java.lang.String[] |
getSourcePaths()
Get the source paths. |
void |
parse(FullBuildModel model,
java.io.File projectPath,
java.lang.String fileName,
java.lang.String[] sourcePaths)
Parse a violations file. |
protected java.lang.String |
resolveName(java.lang.String absoluteName)
Resolve an absolute name agaist the project path. |
void |
setModel(FullBuildModel model)
Set the build model. |
void |
setProjectPath(java.io.File projectPath)
Set the project path. |
void |
setSourcePaths(java.lang.String[] sourcePaths)
Set the source paths attribute. |
Methods inherited from class hudson.plugins.violations.parse.AbstractParser |
---|
checkEvent, checkGetAttribute, checkGetInt, checkGetLong, checkNextEvent, checkNotBlank, endElement, execute, expectNextTag, expectStartTag, getInt, getNextText, getParser, getSibTag, getString, setParser, skipTag, skipToTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTypeParser()
Method Detail |
---|
public void parse(FullBuildModel model, java.io.File projectPath, java.lang.String fileName, java.lang.String[] sourcePaths) throws java.io.IOException
parse
in interface ViolationsParser
model
- the model to store the violations in.projectPath
- the project path used for resolving paths.fileName
- the name of the violations file to parse
(relative to the projectPath).sourcePaths
- a list of source paths to resolve classes against
java.io.IOException
- if there is an error.public void setModel(FullBuildModel model)
model
- the model.protected FullBuildModel getModel()
public void setProjectPath(java.io.File projectPath)
projectPath
- the project path.protected java.io.File getProjectPath()
public void setSourcePaths(java.lang.String[] sourcePaths)
sourcePaths
- the value to useprotected java.lang.String[] getSourcePaths()
protected FullFileModel getFileModel(java.lang.String name, java.io.File sourceFile)
name
- the relative file name.sourceFile
- the source file for the file.
protected FullFileModel getFileModel(java.lang.String absoluteName)
absoluteName
- the absolute name of the file.
protected java.lang.String fixAbsolutePath(java.lang.String abs) throws java.io.IOException
abs
- the absolute name.
java.io.IOException
- if there is a problem.protected java.lang.String resolveName(java.lang.String absoluteName)
absoluteName
- the absolute name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |