com.thalesgroup.hudson.plugins.cppcheck
Class CppcheckSource

java.lang.Object
  extended by com.thalesgroup.hudson.plugins.cppcheck.CppcheckSource
All Implemented Interfaces:
java.io.Serializable

public class CppcheckSource
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected static int SOURCE_GENERATOR_OFFSET
          Offset of the source code generator.
 
Constructor Summary
CppcheckSource(hudson.model.AbstractBuild<?,?> owner, CppcheckWorkspaceFile cppcheckWorkspaceFile)
          Creates a new instance of this source code object.
 
Method Summary
 CppcheckWorkspaceFile getCppcheckWorkspaceFile()
          Returns the abstract Cppcheck workspace file.
 java.lang.String getSourceCode()
          Retrieve the source code for the cppcheck source file.
 java.lang.String highlightSource(java.io.InputStream file)
          Highlights the specified source and returns the result as an HTML string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCE_GENERATOR_OFFSET

protected static final int SOURCE_GENERATOR_OFFSET
Offset of the source code generator. After this line the actual source file lines start.

See Also:
Constant Field Values
Constructor Detail

CppcheckSource

public CppcheckSource(hudson.model.AbstractBuild<?,?> owner,
                      CppcheckWorkspaceFile cppcheckWorkspaceFile)
Creates a new instance of this source code object.

Parameters:
owner - the current build as owner of this object
cppcheckWorkspaceFile - the abstract workspace file
Method Detail

highlightSource

public final java.lang.String highlightSource(java.io.InputStream file)
                                       throws java.io.IOException
Highlights the specified source and returns the result as an HTML string.

Parameters:
file - the source file to highlight
Returns:
the source as an HTML string
Throws:
java.io.IOException

getSourceCode

public java.lang.String getSourceCode()
Retrieve the source code for the cppcheck source file.

Returns:
the source code content as a String object

getCppcheckWorkspaceFile

public CppcheckWorkspaceFile getCppcheckWorkspaceFile()
Returns the abstract Cppcheck workspace file.

Returns:
the workspace file


Copyright © 2010. All Rights Reserved.