org.sonar.colorizer
Class HtmlCodeBuilder

java.lang.Object
  extended by org.sonar.colorizer.HtmlCodeBuilder
All Implemented Interfaces:
Appendable

public class HtmlCodeBuilder
extends Object
implements Appendable


Constructor Summary
HtmlCodeBuilder()
           
 
Method Summary
 Appendable append(char c)
           
 Appendable append(CharSequence csq)
           
 Appendable append(CharSequence csq, int start, int end)
           
 void appendWithoutTransforming(String htmlTag)
           
 StringBuilder getColorizedCode()
           
 Object getVariable(Object key)
          Get a stateful variable.
 Object getVariable(Object key, Object defaultValue)
          Get a stateful variable.
 Map getVariables()
          All stateful variables
 void setVariable(Object key, Object value)
          Save a stateful variable.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlCodeBuilder

public HtmlCodeBuilder()
Method Detail

append

public Appendable append(CharSequence csq)
Specified by:
append in interface Appendable

append

public Appendable append(char c)
Specified by:
append in interface Appendable

append

public Appendable append(CharSequence csq,
                         int start,
                         int end)
Specified by:
append in interface Appendable

appendWithoutTransforming

public void appendWithoutTransforming(String htmlTag)

toString

public String toString()
Overrides:
toString in class Object

getColorizedCode

public StringBuilder getColorizedCode()

setVariable

public void setVariable(Object key,
                        Object value)
Save a stateful variable.

Parameters:
key - can NOT be null
value - can be null

getVariable

public Object getVariable(Object key)
Get a stateful variable. Return null if not found.


getVariable

public Object getVariable(Object key,
                          Object defaultValue)
Get a stateful variable. Return the default value if not found.


getVariables

public Map getVariables()
All stateful variables



Copyright © 2009-2012 SonarSource. All Rights Reserved.