protected void reportMC(DiagnosticPosition pos, MethodCheckDiag diag, InferenceContext inferenceContext, Object... args) { boolean inferDiag = inferenceContext != infer.emptyContext; InapplicableMethodException ex = inferDiag ? infer.inferenceException : inapplicableMethodException; if (inferDiag && (!diag.inferKey.equals(diag.basicKey))) { Object[] args2 = new Object[args.length + 1]; System.arraycopy(args, 0, args2, 1, args.length); args2[0] = inferenceContext.inferenceVars(); args = args2; } String key = inferDiag ? diag.inferKey : diag.basicKey; throw ex.setMessage(diags.create(DiagnosticType.FRAGMENT, log.currentSource(), pos, key, args)); }
protected void reportMC(DiagnosticPosition pos, MethodCheckDiag diag, InferenceContext inferenceContext, Object... args) { boolean inferDiag = inferenceContext != infer.emptyContext; InapplicableMethodException ex = inferDiag ? infer.inferenceException : inapplicableMethodException; if (inferDiag && (!diag.inferKey.equals(diag.basicKey))) { Object[] args2 = new Object[args.length + 1]; System.arraycopy(args, 0, args2, 1, args.length); args2[0] = inferenceContext.inferenceVars(); args = args2; } String key = inferDiag ? diag.inferKey : diag.basicKey; throw ex.setMessage(diags.create(DiagnosticType.FRAGMENT, log.currentSource(), pos, key, args)); }
ForAll pmt = (ForAll) mt; if (typeargtypes.length() != pmt.tvars.length()) throw inapplicableMethodException.setMessage("arg.length.mismatch"); // not enough args for (; bounds.nonEmpty(); bounds = bounds.tail) if (!types.isSubtypeUnchecked(actuals.head, bounds.head, warn)) throw inapplicableMethodException.setMessage("explicit.param.do.not.conform.to.bounds",actuals.head, bounds); formals = formals.tail; actuals = actuals.tail;
ForAll pmt = (ForAll) mt; if (typeargtypes.length() != pmt.tvars.length()) throw inapplicableMethodException.setMessage("arg.length.mismatch"); // not enough args for (; bounds.nonEmpty(); bounds = bounds.tail) if (!types.isSubtypeUnchecked(actuals.head, bounds.head, warn)) throw inapplicableMethodException.setMessage("explicit.param.do.not.conform.to.bounds",actuals.head, bounds); formals = formals.tail; actuals = actuals.tail;
public void report(DiagnosticPosition pos, JCDiagnostic details) { throw inapplicableMethodException.setMessage(details); }
public void report(DiagnosticPosition pos, JCDiagnostic details) { throw inapplicableMethodException.setMessage(details); }
InapplicableMethodException setMessage(String key) { return setMessage(key != null ? diags.fragment(key) : null); } InapplicableMethodException setMessage(String key, Object... args) {
InapplicableMethodException setMessage(String key, Object... args) { return setMessage(key != null ? diags.fragment(key, args) : null); } InapplicableMethodException setMessage(JCDiagnostic diag) {
InapplicableMethodException setMessage() { return setMessage((JCDiagnostic)null); } InapplicableMethodException setMessage(String key) {
InapplicableMethodException setMessage(String key) { return setMessage(key != null ? diags.fragment(key) : null); } InapplicableMethodException setMessage(String key, Object... args) {
InapplicableMethodException setMessage() { return setMessage((JCDiagnostic)null); } InapplicableMethodException setMessage(String key) {
InapplicableMethodException setMessage(String key, Object... args) { return setMessage(key != null ? diags.fragment(key, args) : null); } InapplicableMethodException setMessage(JCDiagnostic diag) {