hudson.plugins.violations
Class TypeDescriptor

java.lang.Object
  extended by hudson.plugins.violations.TypeDescriptor
Direct Known Subclasses:
CheckstyleDescriptor, CodenarcDescriptor, CPDDescriptor, CppLintDescriptor, CssLintDescriptor, FindBugsDescriptor, FxCopDescriptor, GendarmeDescriptor, JcReportDescriptor, JsLintDescriptor, Pep8Descriptor, PerlCriticDescriptor, PMDDescriptor, PyLintDescriptor, SimianDescriptor, StyleCopDescriptor

public abstract class TypeDescriptor
extends java.lang.Object

A descriptor for a violation type. This contains a name and an parser class for the violation type. The types are (currently) also contains in the class as a static - TYPES.


Field Summary
static java.util.TreeMap<java.lang.String,TypeDescriptor> TYPES
          The map of types to type descriptors.
 
Constructor Summary
protected TypeDescriptor(java.lang.String name)
          Create a type descriptor for a type.
 
Method Summary
static void addDescriptor(TypeDescriptor t)
          Add a violations type descriptor.
abstract  ViolationsParser createParser()
          Get a new parser for the type.
 java.lang.String getDetailForSource(java.lang.String source)
          Get a detailed description of a violation source.
 java.util.List<java.lang.String> getMavenTargets()
          Get a list of target xml files to look for for this particular type.
 java.lang.String getName()
          Get the name of the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPES

public static final java.util.TreeMap<java.lang.String,TypeDescriptor> TYPES
The map of types to type descriptors.

Constructor Detail

TypeDescriptor

protected TypeDescriptor(java.lang.String name)
Create a type descriptor for a type.

Parameters:
name - the name of the type.
Method Detail

getName

public java.lang.String getName()
Get the name of the type.

Returns:
the type name.

createParser

public abstract ViolationsParser createParser()
Get a new parser for the type.

Returns:
a new parser object.

addDescriptor

public static void addDescriptor(TypeDescriptor t)
Add a violations type descriptor.

Parameters:
t - the violations type descriptor to add.

getDetailForSource

public java.lang.String getDetailForSource(java.lang.String source)
Get a detailed description of a violation source.

Parameters:
source - the code name for the violation.
Returns:
a detailed description, if available, null otherwise.

getMavenTargets

public java.util.List<java.lang.String> getMavenTargets()
Get a list of target xml files to look for for this particular type.

Returns:
a list filenames to look for in the target target directory.


Copyright © 2004-2012. All Rights Reserved.