net.sourceforge.cobertura.reporting.html
Class JavaToHtml

java.lang.Object
  extended by net.sourceforge.cobertura.reporting.html.JavaToHtml

public class JavaToHtml
extends java.lang.Object


Nested Class Summary
static class JavaToHtml.State
           
 
Field Summary
private static java.util.Collection javaKeywords
           
private static java.util.Collection javaPrimitiveLiterals
           
private static java.util.Collection javaPrimitiveTypes
           
private  int state
           
 
Constructor Summary
JavaToHtml()
           
 
Method Summary
private static java.lang.String escapeEntity(char character)
           
 java.lang.String process(java.lang.String text)
          Add HTML colorization to a block of Java code.
private  java.lang.String processLine(java.lang.String line)
          Add HTML colorization to a single line of Java code.
 void reset()
          Reset the state of this Java parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

javaKeywords

private static final java.util.Collection javaKeywords

javaPrimitiveLiterals

private static final java.util.Collection javaPrimitiveLiterals

javaPrimitiveTypes

private static final java.util.Collection javaPrimitiveTypes

state

private int state
Constructor Detail

JavaToHtml

public JavaToHtml()
Method Detail

escapeEntity

private static java.lang.String escapeEntity(char character)

process

public java.lang.String process(java.lang.String text)
Add HTML colorization to a block of Java code.

Parameters:
text - The block of Java code.
Returns:
The same block of Java code with added span tags. Newlines are preserved.

processLine

private java.lang.String processLine(java.lang.String line)
Add HTML colorization to a single line of Java code.

Parameters:
line - One line of Java code.
Returns:
The same line of Java code with added span tags.

reset

public void reset()
Reset the state of this Java parser. Call this if you have been parsing one Java file and you want to begin parsing another Java file.