private void startMergeMethod(Interface including, Method method) { // Check conditions implied by mixin configuration. Method redeclared = including.lookupMethod(method.getSimpleName()); if (redeclared == null) { error( including.getLocation(), "The API '%s' does not redeclare method '%s' as required by the mixin configuration.", including.getFullName(), method); return; } if (!method.getInputType().equals(redeclared.getInputType())) { error( redeclared.getLocation(), "The method '%s' must have request type '%s' as required by the mixin configuration.", redeclared, method.getInputMessage()); return; } if (!method.getOutputType().equals(redeclared.getOutputType())) { error( redeclared.getLocation(), "The method '%s' must have response type '%s' as required by the mixin configuration.", redeclared, method.getOutputType()); return; } // Add attribute. redeclared.addAttribute(ImplementsAttribute.KEY, ImplementsAttribute.create(method)); }
private void startMergeMethod(Interface including, Method method) { // Check conditions implied by mixin configuration. Method redeclared = including.lookupMethod(method.getSimpleName()); if (redeclared == null) { error( including.getLocation(), "The API '%s' does not redeclare method '%s' as required by the mixin configuration.", including.getFullName(), method); return; } if (!method.getInputType().equals(redeclared.getInputType())) { error( redeclared.getLocation(), "The method '%s' must have request type '%s' as required by the mixin configuration.", redeclared, method.getInputMessage()); return; } if (!method.getOutputType().equals(redeclared.getOutputType())) { error( redeclared.getLocation(), "The method '%s' must have response type '%s' as required by the mixin configuration.", redeclared, method.getOutputType()); return; } // Add attribute. redeclared.addAttribute(ImplementsAttribute.KEY, ImplementsAttribute.create(method)); }