|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.analysis.core.AbstractAnnotationParser
public abstract class AbstractAnnotationParser
A base class for parsers that work on files and produce annotations.
| Constructor Summary | |
|---|---|
protected |
AbstractAnnotationParser(String defaultEncoding)
Creates a new instance of AbstractAnnotationParser. |
| Method Summary | |
|---|---|
protected int |
createContextHashCode(String fileName,
int line)
Creates a hash code from the source code of the warning line and the surrounding context. |
protected String |
getDefaultEncoding()
Returns the default encoding to be used when reading and parsing files. |
protected Collection<FileAnnotation> |
intern(Collection<FileAnnotation> annotations)
Let FileAnnotations share some of their internal data structure
to reduce memory footprint. |
Collection<FileAnnotation> |
parse(File file,
String moduleName)
Returns the annotations found in the specified file. |
abstract Collection<FileAnnotation> |
parse(InputStream file,
String moduleName)
Returns the annotations found in the specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractAnnotationParser(String defaultEncoding)
AbstractAnnotationParser.
defaultEncoding - the default encoding to be used when reading and parsing files| Method Detail |
|---|
protected final String getDefaultEncoding()
public Collection<FileAnnotation> parse(File file,
String moduleName)
throws InvocationTargetException
parse in interface AnnotationParserfile - the file to parsemoduleName - name of the maven module
InvocationTargetException - if the file could not be parsed (wrap your exception in this exception)protected Collection<FileAnnotation> intern(Collection<FileAnnotation> annotations)
FileAnnotations share some of their internal data structure
to reduce memory footprint.
annotations - the annotations to compress
public abstract Collection<FileAnnotation> parse(InputStream file,
String moduleName)
throws InvocationTargetException
file - the file to parsemoduleName - name of the maven module
InvocationTargetException - if the file could not be parsed (wrap your exception in this exception)
protected int createContextHashCode(String fileName,
int line)
throws IOException
fileName - the absolute path of the file to readline - the line of the warning
IOException - if the contents of the file could not be read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||