public abstract class AbstractFormatter extends Object implements SourceCodeFormatter
| Modifier and Type | Field and Description |
|---|---|
static String |
BQUOTES |
static String |
C_COMMENTS |
static String |
CLASS |
static String |
COMMENTS_REPLACEMENT |
static String |
DASH_COMMENTS |
static String |
DQUOTES |
static String |
HASH_COMMENTS |
static String |
KEYWORD_REPLACEMENT |
static String |
OBJECT_REPLACEMENT |
static String |
PERCENT_COMMENTS |
static String |
QUOTES_REPLACEMENT |
static String |
QUOTES_REPLACEMENT_RED |
protected List<Replacer> |
replacers |
static String |
SLASH_COMMENTS |
static String |
SQUOTES |
| Constructor and Description |
|---|
AbstractFormatter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addReplacement(String pattern,
String replacement) |
String |
format(String code,
String language)
Convert source code into HTML.
|
protected static String |
individualWords(String[] words) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedLanguagespublic static final String DQUOTES
public static final String SQUOTES
public static final String BQUOTES
public static final String SLASH_COMMENTS
public static final String DASH_COMMENTS
public static final String HASH_COMMENTS
public static final String PERCENT_COMMENTS
public static final String C_COMMENTS
public static final String CLASS
public static final String QUOTES_REPLACEMENT
public static final String QUOTES_REPLACEMENT_RED
public static final String COMMENTS_REPLACEMENT
public static final String KEYWORD_REPLACEMENT
public static final String OBJECT_REPLACEMENT
public String format(String code, String language)
SourceCodeFormatterformat in interface SourceCodeFormattercode - the source code as a stringlanguage - the programming language that it is believed this code is written inCopyright © 2019 Atlassian. All rights reserved.