return Stmt.loadStatic(declaringClass, "this")
.invoke("handleError", Variable.get("throwable"), Variable.get("response"));
}
private Statement responseHandling() {
Statement handleResponse = Stmt.loadStatic(declaringClass, "this").loadField("remoteCallback")
.invoke("callback", Stmt.loadVariable("response"));
Statement result = demarshal(resourceMethod.getMethod().getReturnType(),
Stmt.loadVariable("response").invoke("getText"), resourceMethod.getAcceptHeader());
Statement handleResult = Stmt
.if_(Bool.equals(Stmt.loadVariable("response").invoke("getStatusCode"), 204))
.append(Stmt.loadStatic(declaringClass, "this").loadField("remoteCallback").invoke("callback", Stmt.load(null)))
.finish()
.else_()
.append(Stmt.loadStatic(declaringClass, "this").loadField("remoteCallback").invoke("callback", result))