Top Description Fields Constructors Methods
com.google.inject

public final Class ConfigurationException

extends RuntimeException
Class Inheritance
Static Imports
com.google.common.base.Preconditions.checkState

Thrown when a programming error such as a misplaced annotation, illegal binding, or unsupported scope is found. Clients should catch this exception, log it, and stop execution.
Author
[email protected] (Jesse Wilson)
Since
2.0

Field Summary

Modifier and TypeField and Description
private final ImmutableSet<Message>
private Object
private static final long

Constructor Summary

AccessConstructor and Description
public
ConfigurationException(Iterable<Message> messages)

Creates a ConfigurationException containing messages.

Method Summary

Modifier and TypeMethod and Description
public Collection<Message>
getErrorMessages()

Returns messages for the errors that caused this exception.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.
public <E> E

Returns:

the partial value, or null if none was set. The type of the partial value is specified by the throwing method.
getPartialValue
()

Returns a value that was only partially computed due to this exception.

public ConfigurationException
withPartialValue(Object partialValue)

Returns a copy of this configuration exception with the specified partial value.

Field Detail

messagesback to summary
private final ImmutableSet<Message> messages
partialValueback to summary
private Object partialValue
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Constructor Detail

ConfigurationExceptionback to summary
public ConfigurationException(Iterable<Message> messages)

Creates a ConfigurationException containing messages.

Method Detail

getErrorMessagesback to summary
public Collection<Message> getErrorMessages()

Returns messages for the errors that caused this exception.

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
getPartialValueback to summary
public <E> E getPartialValue()

Returns a value that was only partially computed due to this exception. The caller can use this while collecting additional configuration problems.

Returns:E

the partial value, or null if none was set. The type of the partial value is specified by the throwing method.

Annotations
@SuppressWarnings:unchecked, TypeParameterUnusedInFormals
withPartialValueback to summary
public ConfigurationException withPartialValue(Object partialValue)

Returns a copy of this configuration exception with the specified partial value.