private String rewriteMethodSignature(String signature) {
if (signature == null) {
return null;
}
SignatureReader reader = new SignatureReader(signature);
SignatureWriter writer = new SignatureWriter() {
@Override
public void visitClassType(String name) {
if (name.equals(Type.getInternalName(HttpServiceRequest.class))) {
super.visitClassType(Type.getInternalName(HttpRequest.class));
return;
}
if (name.equals(Type.getInternalName(HttpServiceResponder.class))) {
super.visitClassType(Type.getInternalName(HttpResponder.class));
return;
}
super.visitClassType(name);
}
};
reader.accept(writer);
return writer.toString();
}