com.atlassian.renderer.v2.macro.code.formatter
Class AbstractFormatter
java.lang.Object
com.atlassian.renderer.v2.macro.code.formatter.AbstractFormatter
- All Implemented Interfaces:
- SourceCodeFormatter
- Direct Known Subclasses:
- ActionScriptFormatter, JavaFormatter, JavaScriptFormatter, NoneFormatter, SqlFormatter, XmlFormatter
public abstract class AbstractFormatter
- extends Object
- implements SourceCodeFormatter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QUOTES
public static final String QUOTES
- See Also:
- Constant Field Values
LINE_COMMENTS
public static final String LINE_COMMENTS
- See Also:
- Constant Field Values
QUOTES_REPLACEMENT
public static final String QUOTES_REPLACEMENT
- See Also:
- Constant Field Values
COMMENTS_REPLACEMENT
public static final String COMMENTS_REPLACEMENT
- See Also:
- Constant Field Values
KEYWORD_REPLACEMENT
public static final String KEYWORD_REPLACEMENT
- See Also:
- Constant Field Values
OBJECT_REPLACEMENT
public static final String OBJECT_REPLACEMENT
- See Also:
- Constant Field Values
replacers
protected List replacers
AbstractFormatter
public AbstractFormatter()
addReplacement
protected void addReplacement(String pattern,
String replacement)
format
public String format(String code,
String language)
- Description copied from interface:
SourceCodeFormatter
- Convert source code into HTML.
- Specified by:
format
in interface SourceCodeFormatter
- Parameters:
code
- the source code as a stringlanguage
- the programming language that it is believed this code is written in
- Returns:
- the source code formatted as HTML
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.