net.sourceforge.cobertura.reporting.html
Class JavaToHtml
java.lang.Object
net.sourceforge.cobertura.reporting.html.JavaToHtml
public class JavaToHtml
- extends java.lang.Object
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 |
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
JavaToHtml
public JavaToHtml()
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.