Warning
The class and its APIs are still experimental and subject to change.
| Modifier and Type | Field and Description |
|---|---|
| private final Throwable | |
| private final String | |
| private final ImmutableList |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public final void | format(int
index for this error index, List<ErrorDetail<?>> list of errors that are mergeable with this error mergeableErrors, Formatter for printing the error message formatter)Formats this error along with other errors that are mergeable with this error. |
| protected abstract void | formatDetail(List<ErrorDetail<?>>
list of errors that are mergeable with this error mergeableErrors, Formatter for printing the error message formatter)Formats the detail of this error message along with other errors that are mergeable with this error. |
| public Throwable | |
| protected Optional | |
| protected Optional | getLearnMoreLink()
Returns an optional link to additional documentation about this error to be included in the formatted error message. |
| public String | |
| public List | |
| public int | |
| public boolean | isMergeable(ErrorDetail<?> otherError)
Returns true if this error can be merged with the |
| public abstract SelfT | withSources(List<Object> newSources)
Returns a new instance of the same |
| cause | back to summary |
|---|---|
| private final Throwable cause | |
| message | back to summary |
|---|---|
| private final String message | |
| sources | back to summary |
|---|---|
| private final ImmutableList<Object> sources | |
| ErrorDetail | back to summary |
|---|---|
| protected ErrorDetail(String message, List<Object> sources, Throwable cause) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| format | back to summary |
|---|---|
| public final void format(int index, List<ErrorDetail<?>> mergeableErrors, Formatter formatter) Formats this error along with other errors that are mergeable with this error.
Formatted error has the following structure:
| |
| formatDetail | back to summary |
|---|---|
| protected abstract void formatDetail(List<ErrorDetail<?>> mergeableErrors, Formatter formatter) Formats the detail of this error message along with other errors that are mergeable with this
error. This is called from
| |
| getCause | back to summary |
|---|---|
| public Throwable getCause() | |
| getErrorIdentifier | back to summary |
|---|---|
| protected Optional Returns an optional string identifier for this error. | |
| getLearnMoreLink | back to summary |
|---|---|
| protected Optional Returns an optional link to additional documentation about this error to be included in the formatted error message. | |
| getMessage | back to summary |
|---|---|
| public String getMessage() | |
| getSources | back to summary |
|---|---|
| public List | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isMergeable | back to summary |
|---|---|
| public boolean isMergeable(ErrorDetail<?> otherError) Returns true if this error can be merged with the By default this return false and implementations that support merging with other errors should override this method. | |
| withSources | back to summary |
|---|---|
| public abstract SelfT withSources(List<Object> newSources) Returns a new instance of the same | |