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

pack-priv final Class MissingConstructorError

extends InternalErrorDetail<MissingConstructorError>
Class Inheritance
Imports
com.google.common.base.Objects, com.google.common.collect.Lists, com.google.inject.TypeLiteral, com.google.inject.spi.ErrorDetail, java.lang.reflect.Constructor, .Modifier, java.util.ArrayList, .Formatter, .List

Error reported when Guice can't find an useable constructor to create objects.

Field Summary

Modifier and TypeField and Description
private final boolean
private final TypeLiteral<?>
Inherited from com.google.inject.internal.InternalErrorDetail:
errorId

Constructor Summary

AccessConstructor and Description
pack-priv
MissingConstructorError(TypeLiteral<?> type, boolean atInjectRequired, 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 MissingConstructorError
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

atInjectRequiredback to summary
private final boolean atInjectRequired
typeback to summary
private final TypeLiteral<?> type

Constructor Detail

MissingConstructorErrorback to summary
pack-priv MissingConstructorError(TypeLiteral<?> type, boolean atInjectRequired, 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 MissingConstructorError 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