|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.violations.parse.ViolationsDOMParser
public abstract class ViolationsDOMParser
| Constructor Summary | |
|---|---|
ViolationsDOMParser()
|
|
| Method Summary | |
|---|---|
String |
checkNotBlank(Element el,
String attribute)
Get an attribute. |
protected abstract void |
execute()
|
protected String |
fixAbsolutePath(String abs)
Fix an absolute path. |
Document |
getDocument()
Get the parsed document. |
protected FullFileModel |
getFileModel(String absoluteName)
Get the full file model object for an absolute name. |
protected FullFileModel |
getFileModel(String name,
File sourceFile)
Get the full file model for a particular relative name and source file. |
int |
getInt(Element el,
String attribute)
Get an int from an attribute. |
protected FullBuildModel |
getModel()
Get the build model. |
protected File |
getProjectPath()
Get the project path. |
protected String[] |
getSourcePaths()
Get the source paths. |
void |
parse(FullBuildModel model,
File projectPath,
String fileName,
String[] sourcePaths)
Parse a violations file. |
protected String |
resolveName(String absoluteName)
Resolve an absolute name agaist the project path. |
void |
setModel(FullBuildModel model)
Set the build model. |
void |
setProjectPath(File projectPath)
Set the project path. |
void |
setSourcePaths(String[] sourcePaths)
Set the source paths attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ViolationsDOMParser()
| Method Detail |
|---|
public Document getDocument()
public void parse(FullBuildModel model,
File projectPath,
String fileName,
String[] sourcePaths)
throws IOException
ViolationsParser
parse in interface ViolationsParsermodel - 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
IOException - if there is an error.
protected abstract void execute()
throws IOException,
Exception
IOException
Exceptionpublic void setModel(FullBuildModel model)
model - the model.protected FullBuildModel getModel()
public void setProjectPath(File projectPath)
projectPath - the project path.protected File getProjectPath()
public void setSourcePaths(String[] sourcePaths)
sourcePaths - the value to useprotected String[] getSourcePaths()
protected FullFileModel getFileModel(String name,
File sourceFile)
name - the relative file name.sourceFile - the source file for the file.
protected FullFileModel getFileModel(String absoluteName)
absoluteName - the absolute name of the file.
protected String fixAbsolutePath(String abs)
throws IOException
abs - the absolute name.
IOException - if there is a problem.protected String resolveName(String absoluteName)
absoluteName - the absolute name.
public int getInt(Element el,
String attribute)
public String checkNotBlank(Element el,
String attribute)
throws Exception
Exception - if the attribute is not there or is blank.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||