Top Description Fields Constructors Methods
com.google.inject.internal

pack-priv final Class ScopeNotFoundError

extends InternalErrorDetail<ScopeNotFoundError>
Class Inheritance
Imports
com.google.common.collect.Lists, com.google.inject.spi.ErrorDetail, java.lang.annotation.Annotation, java.util.ArrayList, .Formatter, .List

Error reported by Guice when a scope annotation is not bound to any scope implementation.

Field Summary

Modifier and TypeField and Description
private final Class<? extends Annotation>
Inherited from com.google.inject.internal.InternalErrorDetail:
errorId

Constructor Summary

AccessConstructor and Description
pack-priv
ScopeNotFoundError(Class<? extends Annotation> scopeAnnotation, List<Object> sources)

Method Summary

Modifier and TypeMethod and Description
protected void
formatDetail(List<ErrorDetail<?>>
list of errors that are mergeable with this error
mergeableErrors
,
Formatter
for printing the error message
formatter
)

Implements abstract com.google.inject.spi.ErrorDetail.formatDetail.

Formats the detail of this error message along with other errors that are mergeable with this error.
public boolean
isMergeable(ErrorDetail<?> other)

Overrides com.google.inject.spi.ErrorDetail.isMergeable.

Returns true if this error can be merged with the otherError and formatted together.
public ScopeNotFoundError
withSources(List<Object> newSources)

Implements abstract com.google.inject.spi.ErrorDetail.withSources.

Returns a new instance of the same ErrorDetail with updated sources.
Inherited from com.google.inject.internal.InternalErrorDetail:
getErrorIdentifiergetLearnMoreLink

Field Detail

scopeAnnotationback to summary
private final Class<? extends Annotation> scopeAnnotation

Constructor Detail

ScopeNotFoundErrorback to summary
pack-priv ScopeNotFoundError(Class<? extends Annotation> scopeAnnotation, List<Object> sources)

Method Detail

formatDetailback to summary
protected void formatDetail(List<ErrorDetail<?>> mergeableErrors, Formatter formatter)

Implements abstract com.google.inject.spi.ErrorDetail.formatDetail.

Doc from com.google.inject.spi.ErrorDetail.formatDetail.

Formats the detail of this error message along with other errors that are mergeable with this error. This is called from format.

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 calling isMergeable. The list will be empty if non of the other errors are mergable with this error.

Parameters
mergeableErrors:List<ErrorDetail<?>>

list of errors that are mergeable with this error

formatter:Formatter

for printing the error message

Annotations
@Override
isMergeableback to summary
public boolean isMergeable(ErrorDetail<?> other)

Overrides com.google.inject.spi.ErrorDetail.isMergeable.

Doc from com.google.inject.spi.ErrorDetail.isMergeable.

Returns true if this error can be merged with the otherError and formatted together.

By default this return false and implementations that support merging with other errors should override this method.

Annotations
@Override
withSourcesback to summary
public ScopeNotFoundError withSources(List<Object> newSources)

Implements abstract com.google.inject.spi.ErrorDetail.withSources.

Doc from com.google.inject.spi.ErrorDetail.withSources.

Returns a new instance of the same ErrorDetail with updated sources.

Annotations
@Override