public final class ThrowableFormatOptions
extends java.lang.Object
Throwable
pattern is formatted.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME |
protected static ThrowableFormatOptions |
DEFAULT
Default instance of
ThrowableFormatOptions . |
private static int |
DEFAULT_LINES |
static java.lang.String |
FILE_NAME |
private static java.lang.String |
FULL
Format the whole stack trace.
|
private java.util.List<java.lang.String> |
ignorePackages
The list of packages to filter.
|
static java.lang.String |
LINE_NUMBER |
private int |
lines
The number of lines to write.
|
static java.lang.String |
LOCALIZED_MESSAGE |
static java.lang.String |
MESSAGE |
static java.lang.String |
METHOD_NAME |
private static java.lang.String |
NONE
Do not format the exception.
|
private java.lang.String |
separator
The stack trace separator.
|
private static java.lang.String |
SHORT
Format only the first line of the throwable.
|
private java.lang.String |
suffix |
private TextRenderer |
textRenderer
ANSI renderer
|
Modifier | Constructor and Description |
---|---|
protected |
ThrowableFormatOptions()
Constructs the options for printing stack trace.
|
protected |
ThrowableFormatOptions(int lines,
java.lang.String separator,
java.util.List<java.lang.String> ignorePackages,
TextRenderer textRenderer,
java.lang.String suffix)
Constructs the options for printing stack trace.
|
protected |
ThrowableFormatOptions(java.util.List<java.lang.String> packages)
Constructs the options for printing stack trace.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allLines()
Determines if all lines should be printed.
|
boolean |
anyLines()
Determines if any lines should be printed.
|
java.util.List<java.lang.String> |
getIgnorePackages()
Returns the list of packages to ignore (filter out).
|
int |
getLines()
Returns the number of lines to write.
|
java.lang.String |
getSeparator()
Returns the stack trace separator.
|
java.lang.String |
getSuffix() |
TextRenderer |
getTextRenderer()
Returns the message rendered.
|
boolean |
hasPackages()
Determines if there are any packages to filter.
|
int |
minLines(int maxLines)
Returns the minimum between the lines and the max lines.
|
static ThrowableFormatOptions |
newInstance(java.lang.String[] options)
Creates a new instance based on the array of options.
|
java.lang.String |
toString() |
private static final int DEFAULT_LINES
protected static final ThrowableFormatOptions DEFAULT
ThrowableFormatOptions
.private static final java.lang.String FULL
private static final java.lang.String NONE
private static final java.lang.String SHORT
private final TextRenderer textRenderer
private final int lines
private final java.lang.String separator
private final java.lang.String suffix
private final java.util.List<java.lang.String> ignorePackages
public static final java.lang.String CLASS_NAME
public static final java.lang.String METHOD_NAME
public static final java.lang.String LINE_NUMBER
public static final java.lang.String FILE_NAME
public static final java.lang.String MESSAGE
public static final java.lang.String LOCALIZED_MESSAGE
protected ThrowableFormatOptions(int lines, java.lang.String separator, java.util.List<java.lang.String> ignorePackages, TextRenderer textRenderer, java.lang.String suffix)
lines
- The number of lines.separator
- The stack trace separator.ignorePackages
- The packages to filter.textRenderer
- The ANSI renderersuffix
- protected ThrowableFormatOptions(java.util.List<java.lang.String> packages)
packages
- The packages to filter.protected ThrowableFormatOptions()
public int getLines()
public java.lang.String getSeparator()
public TextRenderer getTextRenderer()
public java.util.List<java.lang.String> getIgnorePackages()
public boolean allLines()
public boolean anyLines()
public int minLines(int maxLines)
maxLines
- The maximum number of lines.public boolean hasPackages()
public java.lang.String toString()
toString
in class java.lang.Object
public static ThrowableFormatOptions newInstance(java.lang.String[] options)
options
- The array of options.public java.lang.String getSuffix()