hudson.plugins.tasks.util
Class ContextHashCode

java.lang.Object
  extended by hudson.plugins.tasks.util.ContextHashCode

public class ContextHashCode
extends java.lang.Object

Creates a hash code from the source code of the warning line and the surrounding context.

Author:
Ulli Hafner

Constructor Summary
ContextHashCode()
           
 
Method Summary
 int create(java.lang.String fileName, int line, java.lang.String encoding)
          Creates a hash code from the source code of the warning line and the surrounding context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextHashCode

public ContextHashCode()
Method Detail

create

public int create(java.lang.String fileName,
                  int line,
                  java.lang.String encoding)
           throws java.io.IOException
Creates a hash code from the source code of the warning line and the surrounding context.

Parameters:
fileName - the absolute path of the file to read
line - the line of the warning
encoding - the encoding of the file, if null or empty then the default encoding of the platform is used
Returns:
a has code of the source code
Throws:
java.io.IOException - if the contents of the file could not be read


Copyright © 2009. All Rights Reserved.