com.google.inject.spi.Message Maven / Gradle / Ivy
package com.google.inject.spi;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.inject.Binder;
import com.google.inject.internal.Messages;
import com.google.inject.internal.util.SourceProvider;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* An error message and the context in which it occured. Messages are usually created internally by
* Guice and its extensions. Messages can be created explicitly in a module using {@link
* com.google.inject.Binder#addError(Throwable) addError()} statements:
*
* try {
* bindPropertiesFromFile();
* } catch (IOException e) {
* addError(e);
* }
*
*/
public final class Message implements Element {
private final String message;
private final Throwable cause;
private final List