net.sourceforge.cobertura.reporting.html

Class JavaToHtml

public class JavaToHtml extends Object

Nested Class Summary
abstract static classJavaToHtml.State
Field Summary
static CollectionjavaKeywords
static CollectionjavaPrimitiveLiterals
static CollectionjavaPrimitiveTypes
intstate
Method Summary
static StringescapeEntity(char character)
Stringprocess(String text)
Add HTML colorization to a block of Java code.
StringprocessLine(String line)
Add HTML colorization to a single line of Java code.
voidreset()
Reset the state of this Java parser.

Field Detail

javaKeywords

private static final Collection javaKeywords

javaPrimitiveLiterals

private static final Collection javaPrimitiveLiterals

javaPrimitiveTypes

private static final Collection javaPrimitiveTypes

state

private int state

Method Detail

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.