Package com.google.inject.internal
Class GenericErrorDetail
- java.lang.Object
-
- com.google.inject.spi.ErrorDetail<T>
-
- com.google.inject.internal.InternalErrorDetail<GenericErrorDetail>
-
- com.google.inject.internal.GenericErrorDetail
-
- All Implemented Interfaces:
java.io.Serializable
public final class GenericErrorDetail extends InternalErrorDetail<GenericErrorDetail> implements java.io.Serializable
Generic error message representing a Guice internal error.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.google.inject.internal.InternalErrorDetail
errorId
-
-
Constructor Summary
Constructors Constructor Description GenericErrorDetail(ErrorId errorId, java.lang.String message, java.util.List<java.lang.Object> sources, java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidformatDetail(java.util.List<ErrorDetail<?>> mergeableErrors, java.util.Formatter formatter)Formats the detail of this error message along with other errors that are mergeable with this error.GenericErrorDetailwithSources(java.util.List<java.lang.Object> newSources)Returns a new instance of the sameErrorDetailwith updated sources.-
Methods inherited from class com.google.inject.internal.InternalErrorDetail
getErrorIdentifier, getLearnMoreLink
-
Methods inherited from class com.google.inject.spi.ErrorDetail
equals, format, getCause, getMessage, getSources, hashCode, isMergeable
-
-
-
-
Constructor Detail
-
GenericErrorDetail
public GenericErrorDetail(ErrorId errorId, java.lang.String message, java.util.List<java.lang.Object> sources, java.lang.Throwable cause)
-
-
Method Detail
-
formatDetail
public void formatDetail(java.util.List<ErrorDetail<?>> mergeableErrors, java.util.Formatter formatter)
Description copied from class:ErrorDetailFormats 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).mergeableErrorsis 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:
formatDetailin classErrorDetail<GenericErrorDetail>- Parameters:
mergeableErrors- list of errors that are mergeable with this errorformatter- for printing the error message
-
withSources
public GenericErrorDetail withSources(java.util.List<java.lang.Object> newSources)
Description copied from class:ErrorDetailReturns a new instance of the sameErrorDetailwith updated sources.- Specified by:
withSourcesin classErrorDetail<GenericErrorDetail>
-
-