MCPcopy
hub / github.com/google/dagger / Failed

Class Failed

dagger-producers/main/java/dagger/producers/Produced.java:117–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115 }
116
117 private static final class Failed<T> extends Produced<T> {
118 private final Throwable throwable;
119
120 private Failed(Throwable throwable) {
121 this.throwable = checkNotNull(throwable);
122 }
123
124 @Override
125 public T get() throws ExecutionException {
126 throw new ExecutionException(throwable);
127 }
128
129 @Override
130 public boolean equals(Object o) {
131 if (o == this) {
132 return true;
133 } else if (o instanceof Failed) {
134 Failed<?> that = (Failed<?>) o;
135 return this.throwable.equals(that.throwable);
136 } else {
137 return false;
138 }
139 }
140
141 @Override
142 public int hashCode() {
143 return throwable.hashCode();
144 }
145
146 @Override
147 public String toString() {
148 return "Produced[failed with " + throwable.getClass().getCanonicalName() + "]";
149 }
150 }
151
152 private Produced() {}
153}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected