net.sourceforge.cobertura.reporting.html

Class JavaToHtml


public class JavaToHtml
extends java.lang.Object

Nested Class Summary

static class
JavaToHtml.State

Field Summary

private static Collection
javaKeywords
private static Collection
javaPrimitiveLiterals
private static Collection
javaPrimitiveTypes
private int
state

Method Summary

private static String
escapeEntity(char character)
String
process(String text)
Add HTML colorization to a block of Java code.
private String
processLine(String line)
Add HTML colorization to a single line of Java code.
void
reset()
Reset the state of this Java parser.

Field Details

javaKeywords

private static final Collection javaKeywords

javaPrimitiveLiterals

private static final Collection javaPrimitiveLiterals

javaPrimitiveTypes

private static final Collection javaPrimitiveTypes

state

private int state

Method Details

escapeEntity

private static String escapeEntity(char character)

process

public String process(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 String processLine(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.