MCPcopy Index your code
hub / github.com/google/dagger / error

Method error

java/dagger/internal/codegen/BuilderValidator.java:209–220  ·  view source on GitHub ↗
(
      ValidationReport.Builder<TypeElement> builder,
      ExecutableElement method,
      String enclosedError,
      String inheritedError,
      Object... extraArgs)

Source from the content-addressed store, hash-verified

207 * class was included in this compile run. But that's hard, and this is close enough.
208 */
209 private static void error(
210 ValidationReport.Builder<TypeElement> builder,
211 ExecutableElement method,
212 String enclosedError,
213 String inheritedError,
214 Object... extraArgs) {
215 if (method.getEnclosingElement().equals(builder.getSubject())) {
216 builder.addError(String.format(enclosedError, extraArgs), method);
217 } else {
218 builder.addError(String.format(inheritedError, append(extraArgs, method)));
219 }
220 }
221
222 private static Object[] append(Object[] initial, Object additional) {
223 Object[] newArray = Arrays.copyOf(initial, initial.length + 1);

Callers 1

validateMethod · 0.95

Calls 5

appendMethod · 0.95
getSubjectMethod · 0.80
addErrorMethod · 0.80
equalsMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected