genFuncArgs generated Java function arguments declaration for the function f. If the supplied overridden java function is supplied, genFuncArgs omits the implicit this argument.
(f *types.Func, jm *java.Func, hasThis bool)
| 458 | // If the supplied overridden java function is supplied, genFuncArgs omits the implicit |
| 459 | // this argument. |
| 460 | func (g *JavaGen) genFuncArgs(f *types.Func, jm *java.Func, hasThis bool) { |
| 461 | sig := f.Type().(*types.Signature) |
| 462 | params := sig.Params() |
| 463 | first := 0 |
| 464 | if hasThis { |
| 465 | // Skip the implicit this argument to the Go method |
| 466 | first = 1 |
| 467 | } |
| 468 | for i := first; i < params.Len(); i++ { |
| 469 | if i > first { |
| 470 | g.Printf(", ") |
| 471 | } |
| 472 | v := params.At(i) |
| 473 | name := g.paramName(params, i) |
| 474 | jt := g.javaType(v.Type()) |
| 475 | g.Printf("%s %s", jt, name) |
| 476 | } |
| 477 | } |
| 478 | |
| 479 | func (g *JavaGen) genObjectMethods(n string, fields []*types.Var, isStringer bool) { |
| 480 | g.Printf("@Override public boolean equals(Object o) {\n") |