public static class TTY.Filter extends Object implements AutoCloseable
TTY.| Constructor and Description |
|---|
Filter()
Creates an object that will suppress
TTY for the current thread. |
Filter(LogStream newStream)
Creates an object that will overwrite
TTY for the current thread with a custom
log stream. |
Filter(String filter,
Object object)
Creates an object that will suppress
TTY for the current thread if the given
filter does not match the given object. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
remove()
Reverts the suppression state of
TTY to how it was before this object was
constructed. |
public Filter(String filter, Object object)
TTY for the current thread if the given
filter does not match the given object. To revert the suppression state to how it was
before this call, the TTY.Filter.remove() method must be called on the suppression object.filter - the pattern for matching. If null, then the match is successful. If
it starts with "~", then a regular expression
match is performed where
the regular expression is specified by filter without the "~" prefix.
Otherwise, a simple substring match
is performed where filter is the substring used.object - an object whose string value is matched
against filterpublic Filter()
TTY for the current thread. To revert the
suppression state to how it was before this call, the TTY.Filter.remove() method must be
called on this filter object.public Filter(LogStream newStream)
TTY for the current thread with a custom
log stream. To revert the overwritten state to how it was before this call, the
TTY.Filter.remove() method must be called on this filter object.public void remove()
TTY to how it was before this object was
constructed.public void close()
close in interface AutoCloseable