Package com.google.inject.internal
Class GenericErrorDetail
- java.lang.Object
-
- com.google.inject.spi.ErrorDetail<T>
-
- com.google.inject.internal.GenericErrorDetail
-
- All Implemented Interfaces:
Serializable
public final class GenericErrorDetail extends ErrorDetail<T> implements Serializable
Generic error message representing a Guice internal error.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
formatDetail(List<ErrorDetail<?>> mergeableErrors, Formatter formatter)
Formats the detail of this error message along with other errors that are mergeable with this error.protected Optional<String>
getErrorIdentifier()
Returns an optional string identifier for this error.protected Optional<String>
getLearnMoreLink()
Returns an optional link to additional documentation about this error to be included in the formatted error message.GenericErrorDetail
withSources(List<Object> newSources)
Returns a new instance of the sameErrorDetail
with updated sources.-
Methods inherited from class com.google.inject.spi.ErrorDetail
equals, format, getCause, getMessage, getSources, hashCode, isMergeable
-
-
-
-
Field Detail
-
errorId
protected final ErrorId errorId
-
-
Method Detail
-
formatDetail
public void formatDetail(List<ErrorDetail<?>> mergeableErrors, Formatter formatter)
Description copied from class:ErrorDetail
Formats the detail of this error message along with other errors that are mergeable with this error. This is called fromErrorDetail.format(int, java.util.List<com.google.inject.spi.ErrorDetail<?>>, java.util.Formatter)
.mergeableErrors
is a list that contains all other errors that are reported in the same exception that are considered to be mergable with this error base on result of callingErrorDetail.isMergeable(com.google.inject.spi.ErrorDetail<?>)
. The list will be empty if non of the other errors are mergable with this error.- Specified by:
formatDetail
in classErrorDetail<GenericErrorDetail>
- Parameters:
mergeableErrors
- list of errors that are mergeable with this errorformatter
- for printing the error message
-
withSources
public GenericErrorDetail withSources(List<Object> newSources)
Description copied from class:ErrorDetail
Returns a new instance of the sameErrorDetail
with updated sources.- Specified by:
withSources
in classErrorDetail<GenericErrorDetail>
-
getLearnMoreLink
protected final Optional<String> getLearnMoreLink()
Description copied from class:ErrorDetail
Returns an optional link to additional documentation about this error to be included in the formatted error message.- Overrides:
getLearnMoreLink
in classErrorDetail<T extends ErrorDetail<T>>
-
getErrorIdentifier
protected final Optional<String> getErrorIdentifier()
Description copied from class:ErrorDetail
Returns an optional string identifier for this error.- Overrides:
getErrorIdentifier
in classErrorDetail<T extends ErrorDetail<T>>
-
-