Package com.google.inject.internal
Class ScopeNotFoundError
- java.lang.Object
-
- com.google.inject.spi.ErrorDetail<T>
-
- com.google.inject.internal.InternalErrorDetail<ScopeNotFoundError>
-
- com.google.inject.internal.ScopeNotFoundError
-
- All Implemented Interfaces:
java.io.Serializable
final class ScopeNotFoundError extends InternalErrorDetail<ScopeNotFoundError>
Error reported by Guice when a scope annotation is not bound to any scope implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<? extends java.lang.annotation.Annotation>scopeAnnotation-
Fields inherited from class com.google.inject.internal.InternalErrorDetail
errorId
-
-
Constructor Summary
Constructors Constructor Description ScopeNotFoundError(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation, java.util.List<java.lang.Object> sources)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.booleanisMergeable(ErrorDetail<?> other)Returns true if this error can be merged with theotherErrorand formatted together.ScopeNotFoundErrorwithSources(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
-
-
-
-
Method Detail
-
isMergeable
public boolean isMergeable(ErrorDetail<?> other)
Description copied from class:ErrorDetailReturns true if this error can be merged with theotherErrorand formatted together.By default this return false and implementations that support merging with other errors should override this method.
- Overrides:
isMergeablein classErrorDetail<ScopeNotFoundError>
-
formatDetail
protected 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<ScopeNotFoundError>- Parameters:
mergeableErrors- list of errors that are mergeable with this errorformatter- for printing the error message
-
withSources
public ScopeNotFoundError 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<ScopeNotFoundError>
-
-