Package-level declarations
This package contains extensions to Guava's base module.
ToStringHelper
Adds several extension functions for ToStringHelper, to make it more idiomatic in kotlin.
See the Guava User Guide on writing Object methods with com.google.common.base.Objects
Splitter as a Flow
Extension function for Splitter that allows it to be consumed as a flow.
To use this, you must include kotlinx-coroutines-core and kotlinx-coroutines-jdk8 as dependencies.
Throwables
Adds several extension functions to Throwable that delegate to Guava's Throwables
Functions
Converts the CaseFormat of a string.
Returns this's cause, cast to X.
Returns the innermost cause of this. The first throwable in a chain provides context from when the error or exception was initially detected. Example usage:
Propagates this exactly as-is, if and only if it is an instance of RuntimeException, Error, or X. Example usage:
Adds a name/value pair to the formatted output in name=value format.
Adds a name/value pair to the formatted output in name=value format, for the boolean primitive type.
Adds a name/value pair to the formatted output in name=value format, for the char primitive type.
Adds a name/value pair to the formatted output in name=value format, for the double primitive type.
Adds a name/value pair to the formatted output in name=value format, for the float primitive type.
Adds a name/value pair to the formatted output in name=value format, for the int primitive type.
Adds a name/value pair to the formatted output in name=value format, for the long primitive type.
Splits sequence into string components and makes them available through a Flow, which may be lazily evaluated. If you want an eagerly computed List, use Splitter.splitToList.
Throws this if it is not null and an instance of X. Example usage:
Throws this if it is not null and a RuntimeException or Error. Example usage:
Creates an instance of ToStringHelper.
Properties
Gets a Throwable cause chain as a list. The first entry in the list will be this followed by its cause hierarchy. Note that this is a snapshot of the cause chain and will not reflect any subsequent changes to the cause chain.
Returns a string containing the result of toString(), followed by the full, recursive stack trace of this. Note that you probably should not be parsing the resulting string; if you need programmatic access to the stack frames, you can call Throwable.getStackTrace.