|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<TextFormat> com.android.tools.lint.detector.api.TextFormat
public enum TextFormat
Lint error message, issue explanations and location descriptions
are described in a RAW
format which looks similar to text
but which can contain bold, symbols and links. These issues can
also be converted to plain text and to HTML markup, using the
convertTo(String, TextFormat)
method.
Issue#getDescription(TextFormat)
,
Issue.getExplanation(TextFormat)
,
Issue.getBriefDescription(TextFormat)
Enum Constant Summary | |
---|---|
HTML
HTML formatted output (note: does not include surrounding <html></html> tags) |
|
RAW
Raw output format which is similar to text but allows some markup: HTTP urls (http://...) Sentences immediately surrounded by * will be shown as bold. |
|
TEXT
Plain text output |
Method Summary | |
---|---|
java.lang.String |
convertTo(java.lang.String message,
TextFormat to)
Converts the given message to the given format. |
java.lang.String |
toHtml(java.lang.String text)
Converts the given text to HTML |
java.lang.String |
toText(java.lang.String text)
Converts the given text to plain text |
static TextFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static TextFormat[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final TextFormat RAW
<html>
tags around the fragment for HTML output.
TODO: Consider switching to the restructured text format - http://docutils.sourceforge.net/docs/user/rst/quickstart.html
public static final TextFormat TEXT
public static final TextFormat HTML
<html></html>
tags)
Method Detail |
---|
public static TextFormat[] values()
for (TextFormat c : TextFormat.values()) System.out.println(c);
public static TextFormat valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null@NonNull public java.lang.String toHtml(@NonNull java.lang.String text)
text
- the text to format
@NonNull public java.lang.String toText(@NonNull java.lang.String text)
text
- the tetx to format
public java.lang.String convertTo(@NonNull java.lang.String message, @NonNull TextFormat to)
message
- the message to convertto
- the format to convert to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |