bind: format generated go code before comparing with golden files

bind_test.go compares the generated Go files against golden files
checked in the repository. The bind package formats some of the
generated Go files, so any changes in the go formatter can break
the tests.

This change makes the test more robust by applying formatting based
on the currently used go version. Since a golden file often
includes multiple go files generated by the bind, the `gofmt`
function splits the golden file using the gobindPreamble marker
and then run format.Source for each chunk. In order to ease the
golden file splitting, this CL also moves the gobindPreamble
to the beginning of each generated file consistently.

It turned out bind omits formatting for some go files (generated
for reverse binding). That needs to be fixed but it is a much
bigger fix. Thus, in this CL, we apply the formatting on the
bind's output as well.

This CL also updates the gobindPreamble to follow the style guide
for generated code. https://golang.org/s/generatedcode

Fixes golang/go#34619

Change-Id: Ia2957693154face2848e051ebbb2373e95d79593
Reviewed-on: https://go-review.googlesource.com/c/mobile/+/198322
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/bind/bind.go b/bind/bind.go
index 76ba03b..e569083 100644
--- a/bind/bind.go
+++ b/bind/bind.go
@@ -20,6 +20,8 @@
 	"io"
 )
 
+const gobindPreamble = "// Code generated by gobind. DO NOT EDIT.\n\n"
+
 type (
 	GeneratorConfig struct {
 		Writer io.Writer
diff --git a/bind/bind_test.go b/bind/bind_test.go
index dd8ad32..fae951b 100644
--- a/bind/bind_test.go
+++ b/bind/bind_test.go
@@ -5,6 +5,7 @@
 	"flag"
 	"go/ast"
 	"go/build"
+	"go/format"
 	"go/importer"
 	"go/parser"
 	"go/token"
@@ -484,14 +485,26 @@
 		t.Errorf("%s: %v", filename, err)
 		return
 	}
-	out := writeTempFile(t, "go", buf.Bytes())
+	// TODO(hyangah): let GenGo format the generated go files.
+	out := writeTempFile(t, "go", gofmt(t, buf.Bytes()))
 	defer os.Remove(out)
+
 	golden := filename
 	if golden == "" {
 		golden = "testdata/universe"
 	}
 	golden += ".golden"
-	if diffstr := diff(golden, out); diffstr != "" {
+
+	goldenContents, err := ioutil.ReadFile(golden)
+	if err != nil {
+		t.Fatalf("failed to read golden file: %v", err)
+	}
+
+	// format golden file using the current go version's formatting rule.
+	formattedGolden := writeTempFile(t, "go", gofmt(t, goldenContents))
+	defer os.Remove(formattedGolden)
+
+	if diffstr := diff(formattedGolden, out); diffstr != "" {
 		t.Errorf("%s: does not match Go golden:\n%s", filename, diffstr)
 
 		if *updateFlag {
@@ -503,6 +516,28 @@
 	}
 }
 
+// gofmt formats the collection of Go source files auto-generated by gobind.
+func gofmt(t *testing.T, src []byte) []byte {
+	t.Helper()
+	buf := &bytes.Buffer{}
+	mark := []byte(gobindPreamble)
+	for i, c := range bytes.Split(src, mark) {
+		if i == 0 {
+			buf.Write(c)
+			continue
+		}
+		tmp := append(mark, c...)
+		out, err := format.Source(tmp)
+		if err != nil {
+			t.Fatalf("failed to format Go file: error=%v\n----\n%s\n----", err, tmp)
+		}
+		if _, err := buf.Write(out); err != nil {
+			t.Fatalf("failed to write formatted file to buffer: %v", err)
+		}
+	}
+	return buf.Bytes()
+}
+
 func TestCustomPrefix(t *testing.T) {
 	const datafile = "testdata/customprefix.go"
 	pkg, file := typeCheck(t, datafile, "")
diff --git a/bind/genclasses.go b/bind/genclasses.go
index a9bfa82..8746ab2 100644
--- a/bind/genclasses.go
+++ b/bind/genclasses.go
@@ -164,7 +164,7 @@
 
 func (g *ClassGen) GenPackage(idx int) {
 	jpkg := g.jpkgs[idx]
-	g.Printf("// File is generated by gobind. Do not edit.\n\n")
+	g.Printf(gobindPreamble)
 	g.Printf("package %s\n\n", path.Base(jpkg))
 	g.Printf("import \"Java\"\n\n")
 	g.Printf("const _ = Java.Dummy\n\n")
@@ -573,7 +573,11 @@
 	g.Outdent()
 	g.Printf("}\n\n")
 	g.Printf("type proxy_class_%s _seq.Ref\n\n", cls.JNIName)
-	g.Printf("func (p *proxy_class_%s) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }\n\n", cls.JNIName)
+	g.Printf("func (p *proxy_class_%s) Bind_proxy_refnum__() int32 {\n", cls.JNIName)
+	g.Indent()
+	g.Printf("return (*_seq.Ref)(p).Bind_IncNum()\n")
+	g.Outdent()
+	g.Printf("}\n\n")
 	for _, fs := range cls.AllMethods {
 		if !g.isFuncSetSupported(fs) {
 			continue
@@ -901,23 +905,20 @@
 }
 
 var (
-	classesPkgHeader = `// File is generated by gobind. Do not edit.
-
+	classesPkgHeader = gobindPreamble + `
 package Java
 
 // Used to silence this package not used errors
 const Dummy = 0
 
 `
-	classesCHeader = `// File is generated by gobind. Do not edit.
-
+	classesCHeader = gobindPreamble + `
 #include <jni.h>
 #include "seq.h"
 #include "classes.h"
 
 `
-	classesHHeader = `// File is generated by gobind. Do not edit.
-
+	classesHHeader = gobindPreamble + `
 #include <jni.h>
 #include "seq.h"
 
@@ -925,12 +926,9 @@
 
 `
 
-	javaImplHeader = `// File is generated by gobind. Do not edit.
+	javaImplHeader = gobindPreamble
 
-`
-
-	classesGoHeader = `// File is generated by gobind. Do not edit.
-
+	classesGoHeader = gobindPreamble + `
 package main
 
 /*
diff --git a/bind/gengo.go b/bind/gengo.go
index 4ab7219..82aa4fc 100644
--- a/bind/gengo.go
+++ b/bind/gengo.go
@@ -32,10 +32,9 @@
 }
 
 const (
-	goPreamble = `// Package main is an autogenerated binder stub for package %[1]s.
-//   gobind -lang=go %[2]s
+	goPreamble = gobindPreamble + `// Package main is an autogenerated binder stub for package %[1]s.
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go %[2]s
 package main
 
 /*
@@ -311,7 +310,11 @@
 	}
 	g.Printf("type proxy%s_%s _seq.Ref\n\n", g.pkgPrefix, obj.Name())
 
-	g.Printf("func (p *proxy%s_%s) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }\n\n", g.pkgPrefix, obj.Name())
+	g.Printf("func (p *proxy%s_%s) Bind_proxy_refnum__() int32 {\n", g.pkgPrefix, obj.Name())
+	g.Indent()
+	g.Printf("return (*_seq.Ref)(p).Bind_IncNum()\n")
+	g.Outdent()
+	g.Printf("}\n\n")
 
 	for _, m := range summary.callable {
 		if !g.isSigSupported(m.Type()) {
diff --git a/bind/genjava.go b/bind/genjava.go
index e5d31de..e31beba 100644
--- a/bind/genjava.go
+++ b/bind/genjava.go
@@ -1701,19 +1701,17 @@
 }
 
 const (
-	javaPreamble = `// Java class %[1]s.%[2]s is a proxy for talking to a Go program.
-//   gobind %[3]s %[4]s
+	javaPreamble = gobindPreamble + `// Java class %[1]s.%[2]s is a proxy for talking to a Go program.
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind %[3]s %[4]s
 package %[1]s;
 
 import go.Seq;
 
 `
-	cPreamble = `// JNI functions for the Go <=> Java bridge.
-//   gobind %[1]s %[2]s
+	cPreamble = gobindPreamble + `// JNI functions for the Go <=> Java bridge.
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind %[1]s %[2]s
 
 #include <android/log.h>
 #include <stdint.h>
@@ -1721,10 +1719,9 @@
 #include "_cgo_export.h"
 `
 
-	hPreamble = `// JNI function headers for the Go <=> Java bridge.
-//   gobind %[1]s %[2]s
+	hPreamble = gobindPreamble + `// JNI function headers for the Go <=> Java bridge.
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind %[1]s %[2]s
 
 #ifndef __%[3]s_H__
 #define __%[3]s_H__
diff --git a/bind/genobjcw.go b/bind/genobjcw.go
index 7215ff9..1f5ccf6 100644
--- a/bind/genobjcw.go
+++ b/bind/genobjcw.go
@@ -62,7 +62,7 @@
 }
 
 func (g *ObjcWrapper) GenM() {
-	g.Printf("//File is generated by gobind. Do not edit.\n\n")
+	g.Printf(gobindPreamble)
 	// For objc_msgSend* functions.
 	g.Printf("@import ObjectiveC.message;\n")
 	g.Printf("#include \"seq.h\"\n")
@@ -219,7 +219,7 @@
 }
 
 func (g *ObjcWrapper) GenH() {
-	g.Printf("//File is generated by gobind. Do not edit.\n\n")
+	g.Printf(gobindPreamble)
 	g.Printf("#include \"seq.h\"\n\n")
 	for _, m := range g.modules {
 		g.Printf("@import %s;\n", m)
@@ -314,7 +314,7 @@
 }
 
 func (g *ObjcWrapper) GenGo() {
-	g.Printf("// File is generated by gobind. Do not edit.\n\n")
+	g.Printf(gobindPreamble)
 	g.Printf("package main\n\n")
 	g.Printf("// #include \"interfaces.h\"\n")
 	g.Printf("import \"C\"\n\n")
@@ -533,7 +533,7 @@
 
 func (g *ObjcWrapper) GenPackage(idx int) {
 	pkg := g.pkgNames[idx]
-	g.Printf("//File is generated by gobind. Do not edit.\n\n")
+	g.Printf(gobindPreamble)
 	g.Printf("package %s\n\n", path.Base(pkg))
 	g.Printf("import \"ObjC\"\n\n")
 	g.Printf("const _ = ObjC.Dummy\n\n")
@@ -558,7 +558,7 @@
 }
 
 func (g *ObjcWrapper) GenInterfaces() {
-	g.Printf("//File is generated by gobind. Do not edit.\n\n")
+	g.Printf(gobindPreamble)
 	g.Printf("package ObjC\n\n")
 	g.Printf("// Used to silence this package not used errors\n")
 	g.Printf("const Dummy = 0\n\n")
diff --git a/bind/testdata/basictypes.go.golden b/bind/testdata/basictypes.go.golden
index b96b9f4..2874b33 100644
--- a/bind/testdata/basictypes.go.golden
+++ b/bind/testdata/basictypes.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package basictypes.
-//   gobind -lang=go basictypes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go basictypes
 package main
 
 /*
diff --git a/bind/testdata/basictypes.java.c.golden b/bind/testdata/basictypes.java.c.golden
index bdebd0c..cb947a2 100644
--- a/bind/testdata/basictypes.java.c.golden
+++ b/bind/testdata/basictypes.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java basictypes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java basictypes
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/basictypes.java.golden b/bind/testdata/basictypes.java.golden
index 3f831de..5f3511b 100644
--- a/bind/testdata/basictypes.java.golden
+++ b/bind/testdata/basictypes.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class basictypes.Basictypes is a proxy for talking to a Go program.
-//   gobind -lang=java basictypes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java basictypes
 package basictypes;
 
 import go.Seq;
diff --git a/bind/testdata/basictypes.java.h.golden b/bind/testdata/basictypes.java.h.golden
index 89cc2fb..631ec94 100644
--- a/bind/testdata/basictypes.java.h.golden
+++ b/bind/testdata/basictypes.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java basictypes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java basictypes
 
 #ifndef __Basictypes_H__
 #define __Basictypes_H__
diff --git a/bind/testdata/classes.go.golden b/bind/testdata/classes.go.golden
index 8324924..fe6bf15 100644
--- a/bind/testdata/classes.go.golden
+++ b/bind/testdata/classes.go.golden
@@ -1,4 +1,4 @@
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Runnable
 
@@ -6,8 +6,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.lang.Runnable proxy.
@@ -15,8 +14,7 @@
 	// not extend or implement java.lang.Runnable.
 	Cast func(v interface{}) Java.Java_lang_Runnable
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package lang
 
@@ -27,7 +25,7 @@
 type Runnable Java.Java_lang_Runnable
 type Object Java.Java_lang_Object
 type System Java.Java_lang_System
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package InputStream
 
@@ -35,8 +33,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.io.InputStream proxy.
@@ -44,8 +41,7 @@
 	// not extend or implement java.io.InputStream.
 	Cast func(v interface{}) Java.Java_io_InputStream
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package io
 
@@ -55,7 +51,7 @@
 
 type InputStream Java.Java_io_InputStream
 type Console Java.Java_io_Console
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Future
 
@@ -63,8 +59,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.concurrent.Future proxy.
@@ -72,8 +67,7 @@
 	// not extend or implement java.util.concurrent.Future.
 	Cast func(v interface{}) Java.Java_util_concurrent_Future
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package concurrent
 
@@ -83,7 +77,7 @@
 
 type Future Java.Java_util_concurrent_Future
 type TimeUnit Java.Java_util_concurrent_TimeUnit
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Object
 
@@ -91,8 +85,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.lang.Object proxy.
@@ -100,8 +93,7 @@
 	// not extend or implement java.lang.Object.
 	Cast func(v interface{}) Java.Java_lang_Object
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package TimeUnit
 
@@ -109,8 +101,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.concurrent.TimeUnit proxy.
@@ -118,8 +109,7 @@
 	// not extend or implement java.util.concurrent.TimeUnit.
 	Cast func(v interface{}) Java.Java_util_concurrent_TimeUnit
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Spliterators
 
@@ -127,8 +117,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	Iterator func(a0 Java.Java_util_Spliterator) Java.Java_util_Iterator
@@ -137,8 +126,7 @@
 	// not extend or implement java.util.Spliterators.
 	Cast func(v interface{}) Java.Java_util_Spliterators
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package util
 
@@ -149,7 +137,7 @@
 type Spliterators Java.Java_util_Spliterators
 type Iterator Java.Java_util_Iterator
 type Spliterator Java.Java_util_Spliterator
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package System
 
@@ -157,8 +145,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	Console func() Java.Java_io_Console
@@ -167,8 +154,7 @@
 	// not extend or implement java.lang.System.
 	Cast func(v interface{}) Java.Java_lang_System
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Future
 
@@ -176,8 +162,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.Future proxy.
@@ -185,8 +170,7 @@
 	// not extend or implement java.Future.
 	Cast func(v interface{}) Java.Java_Future
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package java
 
@@ -198,7 +182,7 @@
 type InputStream Java.Java_InputStream
 type Object Java.Java_Object
 type Runnable Java.Java_Runnable
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package InputStream
 
@@ -206,8 +190,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.InputStream proxy.
@@ -215,8 +198,7 @@
 	// not extend or implement java.InputStream.
 	Cast func(v interface{}) Java.Java_InputStream
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Object
 
@@ -224,8 +206,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.Object proxy.
@@ -233,8 +214,7 @@
 	// not extend or implement java.Object.
 	Cast func(v interface{}) Java.Java_Object
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Runnable
 
@@ -242,8 +222,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.Runnable proxy.
@@ -251,8 +230,7 @@
 	// not extend or implement java.Runnable.
 	Cast func(v interface{}) Java.Java_Runnable
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Iterator
 
@@ -260,8 +238,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.Iterator proxy.
@@ -269,8 +246,7 @@
 	// not extend or implement java.util.Iterator.
 	Cast func(v interface{}) Java.Java_util_Iterator
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Spliterator
 
@@ -281,15 +257,16 @@
 type OfInt Java.Java_util_Spliterator_OfInt
 type OfLong Java.Java_util_Spliterator_OfLong
 type OfDouble Java.Java_util_Spliterator_OfDouble
+
 const (
-	ORDERED = 16
-	DISTINCT = 1
-	SORTED = 4
-	SIZED = 64
-	NONNULL = 256
-	IMMUTABLE = 1024
+	ORDERED    = 16
+	DISTINCT   = 1
+	SORTED     = 4
+	SIZED      = 64
+	NONNULL    = 256
+	IMMUTABLE  = 1024
 	CONCURRENT = 4096
-	SUBSIZED = 16384
+	SUBSIZED   = 16384
 )
 
 var (
@@ -298,8 +275,7 @@
 	// not extend or implement java.util.Spliterator.
 	Cast func(v interface{}) Java.Java_util_Spliterator
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package OfInt
 
@@ -307,8 +283,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfInt proxy.
@@ -316,8 +291,7 @@
 	// not extend or implement java.util.PrimitiveIterator.OfInt.
 	Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfInt
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package PrimitiveIterator
 
@@ -328,7 +302,7 @@
 type OfInt Java.Java_util_PrimitiveIterator_OfInt
 type OfLong Java.Java_util_PrimitiveIterator_OfLong
 type OfDouble Java.Java_util_PrimitiveIterator_OfDouble
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package OfInt
 
@@ -336,8 +310,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfInt proxy.
@@ -345,8 +318,7 @@
 	// not extend or implement java.util.Spliterator.OfInt.
 	Cast func(v interface{}) Java.Java_util_Spliterator_OfInt
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package OfLong
 
@@ -354,8 +326,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfLong proxy.
@@ -363,8 +334,7 @@
 	// not extend or implement java.util.PrimitiveIterator.OfLong.
 	Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfLong
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package OfLong
 
@@ -372,8 +342,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfLong proxy.
@@ -381,8 +350,7 @@
 	// not extend or implement java.util.Spliterator.OfLong.
 	Cast func(v interface{}) Java.Java_util_Spliterator_OfLong
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package OfDouble
 
@@ -390,8 +358,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.PrimitiveIterator.OfDouble proxy.
@@ -399,8 +366,7 @@
 	// not extend or implement java.util.PrimitiveIterator.OfDouble.
 	Cast func(v interface{}) Java.Java_util_PrimitiveIterator_OfDouble
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package OfDouble
 
@@ -408,8 +374,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.util.Spliterator.OfDouble proxy.
@@ -417,8 +382,7 @@
 	// not extend or implement java.util.Spliterator.OfDouble.
 	Cast func(v interface{}) Java.Java_util_Spliterator_OfDouble
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Console
 
@@ -426,8 +390,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.io.Console proxy.
@@ -435,8 +398,7 @@
 	// not extend or implement java.io.Console.
 	Cast func(v interface{}) Java.Java_io_Console
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Java
 
@@ -541,8 +503,7 @@
 	Flush() error
 	ToString() string
 }
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package main
 
@@ -586,11 +547,12 @@
 
 import "fmt"
 
-type proxy interface { Bind_proxy_refnum__() int32 }
+type proxy interface{ Bind_proxy_refnum__() int32 }
 
 // Suppress unused package error
 
 var _ = _seq.FromRefNum
+
 const _ = Java.Dummy
 
 //export initClasses
@@ -641,7 +603,9 @@
 
 type proxy_class_java_lang_Runnable _seq.Ref
 
-func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_lang_Runnable) Run() {
 	res := C.cproxy_java_lang_Runnable_run(C.jint(p.Bind_proxy_refnum__()))
@@ -654,7 +618,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 }
 
 var class_java_io_InputStream C.jclass
@@ -680,7 +646,9 @@
 
 type proxy_class_java_io_InputStream _seq.Ref
 
-func (p *proxy_class_java_io_InputStream) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_io_InputStream) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_io_InputStream) Read(a0 ...interface{}) (int32, error) {
 	switch 0 + len(a0) {
@@ -751,7 +719,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -778,7 +748,9 @@
 
 type proxy_class_java_util_concurrent_Future _seq.Ref
 
-func (p *proxy_class_java_util_concurrent_Future) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_concurrent_Future) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_util_concurrent_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) {
 	switch 0 + len(a0) {
@@ -860,7 +832,9 @@
 
 type proxy_class_java_lang_Object _seq.Ref
 
-func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_lang_Object) ToString() string {
 	res := C.cproxy_java_lang_Object_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -874,7 +848,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -901,7 +877,9 @@
 
 type proxy_class_java_util_concurrent_TimeUnit _seq.Ref
 
-func (p *proxy_class_java_util_concurrent_TimeUnit) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_concurrent_TimeUnit) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_util_concurrent_TimeUnit) ToString() string {
 	res := C.cproxy_java_util_concurrent_TimeUnit_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -915,7 +893,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -954,7 +934,9 @@
 					_exc = (*proxy_error)(_exc_ref)
 				}
 			}
-			if (_exc != nil) { panic(_exc) }
+			if _exc != nil {
+				panic(_exc)
+			}
 			return _res
 		}
 		{
@@ -983,7 +965,9 @@
 						_exc = (*proxy_error)(_exc_ref)
 					}
 				}
-				if (_exc != nil) { panic(_exc) }
+				if _exc != nil {
+					panic(_exc)
+				}
 				return _res
 			}
 		}
@@ -1013,7 +997,9 @@
 						_exc = (*proxy_error)(_exc_ref)
 					}
 				}
-				if (_exc != nil) { panic(_exc) }
+				if _exc != nil {
+					panic(_exc)
+				}
 				return _res
 			}
 		}
@@ -1043,13 +1029,15 @@
 						_exc = (*proxy_error)(_exc_ref)
 					}
 				}
-				if (_exc != nil) { panic(_exc) }
+				if _exc != nil {
+					panic(_exc)
+				}
 				return _res
 			}
 		}
 		panic("no overloaded method found for java.util.Spliterators.iterator that matched the arguments")
 	}
-	
+
 	Spliterators.Cast = func(v interface{}) Java.Java_util_Spliterators {
 		t := reflect.TypeOf((*proxy_class_java_util_Spliterators)(nil))
 		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_util_Spliterators)
@@ -1063,7 +1051,9 @@
 
 type proxy_class_java_util_Spliterators _seq.Ref
 
-func (p *proxy_class_java_util_Spliterators) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_Spliterators) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_util_Spliterators) ToString() string {
 	res := C.cproxy_java_util_Spliterators_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -1077,7 +1067,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -1111,10 +1103,12 @@
 				_exc = (*proxy_error)(_exc_ref)
 			}
 		}
-		if (_exc != nil) { panic(_exc) }
+		if _exc != nil {
+			panic(_exc)
+		}
 		return _res
 	}
-	
+
 	System.Cast = func(v interface{}) Java.Java_lang_System {
 		t := reflect.TypeOf((*proxy_class_java_lang_System)(nil))
 		cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_System)
@@ -1128,7 +1122,9 @@
 
 type proxy_class_java_lang_System _seq.Ref
 
-func (p *proxy_class_java_lang_System) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_System) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_lang_System) ToString() string {
 	res := C.cproxy_java_lang_System_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -1142,7 +1138,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -1169,7 +1167,9 @@
 
 type proxy_class_java_Future _seq.Ref
 
-func (p *proxy_class_java_Future) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_Future) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_Future) Get(a0 ...interface{}) (Java.Java_lang_Object, error) {
 	switch 0 + len(a0) {
@@ -1232,7 +1232,7 @@
 	return &super_java_Future{p}
 }
 
-type super_java_Future struct {*proxy_class_java_Future}
+type super_java_Future struct{ *proxy_class_java_Future }
 
 func (p *proxy_class_java_Future) Unwrap() interface{} {
 	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
@@ -1319,7 +1319,9 @@
 
 type proxy_class_java_InputStream _seq.Ref
 
-func (p *proxy_class_java_InputStream) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_InputStream) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_InputStream) Read(a0 ...interface{}) (int32, error) {
 	switch 0 + len(a0) {
@@ -1390,7 +1392,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -1398,7 +1402,7 @@
 	return &super_java_InputStream{p}
 }
 
-type super_java_InputStream struct {*proxy_class_java_InputStream}
+type super_java_InputStream struct{ *proxy_class_java_InputStream }
 
 func (p *proxy_class_java_InputStream) Unwrap() interface{} {
 	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
@@ -1474,7 +1478,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -1501,7 +1507,9 @@
 
 type proxy_class_java_Object _seq.Ref
 
-func (p *proxy_class_java_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_Object) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_Object) ToString() string {
 	res := C.cproxy_java_Object_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -1515,7 +1523,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -1523,7 +1533,7 @@
 	return &super_java_Object{p}
 }
 
-type super_java_Object struct {*proxy_class_java_Object}
+type super_java_Object struct{ *proxy_class_java_Object }
 
 func (p *proxy_class_java_Object) Unwrap() interface{} {
 	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
@@ -1542,7 +1552,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -1569,7 +1581,9 @@
 
 type proxy_class_java_Runnable _seq.Ref
 
-func (p *proxy_class_java_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_Runnable) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_Runnable) Run() {
 	res := C.cproxy_java_Runnable_run(C.jint(p.Bind_proxy_refnum__()))
@@ -1582,14 +1596,16 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 }
 
 func (p *proxy_class_java_Runnable) Super() Java.Java_Runnable {
 	return &super_java_Runnable{p}
 }
 
-type super_java_Runnable struct {*proxy_class_java_Runnable}
+type super_java_Runnable struct{ *proxy_class_java_Runnable }
 
 func (p *proxy_class_java_Runnable) Unwrap() interface{} {
 	goRefnum := C.go_seq_unwrap(C.jint(p.Bind_proxy_refnum__()))
@@ -1607,7 +1623,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 }
 
 var class_java_util_Iterator C.jclass
@@ -1633,7 +1651,9 @@
 
 type proxy_class_java_util_Iterator _seq.Ref
 
-func (p *proxy_class_java_util_Iterator) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_Iterator) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_Spliterator C.jclass
 
@@ -1658,7 +1678,9 @@
 
 type proxy_class_java_util_Spliterator _seq.Ref
 
-func (p *proxy_class_java_util_Spliterator) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_Spliterator) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_PrimitiveIterator_OfInt C.jclass
 
@@ -1683,7 +1705,9 @@
 
 type proxy_class_java_util_PrimitiveIterator_OfInt _seq.Ref
 
-func (p *proxy_class_java_util_PrimitiveIterator_OfInt) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_PrimitiveIterator_OfInt) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_Spliterator_OfInt C.jclass
 
@@ -1708,7 +1732,9 @@
 
 type proxy_class_java_util_Spliterator_OfInt _seq.Ref
 
-func (p *proxy_class_java_util_Spliterator_OfInt) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_Spliterator_OfInt) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_PrimitiveIterator_OfLong C.jclass
 
@@ -1733,7 +1759,9 @@
 
 type proxy_class_java_util_PrimitiveIterator_OfLong _seq.Ref
 
-func (p *proxy_class_java_util_PrimitiveIterator_OfLong) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_PrimitiveIterator_OfLong) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_Spliterator_OfLong C.jclass
 
@@ -1758,7 +1786,9 @@
 
 type proxy_class_java_util_Spliterator_OfLong _seq.Ref
 
-func (p *proxy_class_java_util_Spliterator_OfLong) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_Spliterator_OfLong) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_PrimitiveIterator_OfDouble C.jclass
 
@@ -1783,7 +1813,9 @@
 
 type proxy_class_java_util_PrimitiveIterator_OfDouble _seq.Ref
 
-func (p *proxy_class_java_util_PrimitiveIterator_OfDouble) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_PrimitiveIterator_OfDouble) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_util_Spliterator_OfDouble C.jclass
 
@@ -1808,7 +1840,9 @@
 
 type proxy_class_java_util_Spliterator_OfDouble _seq.Ref
 
-func (p *proxy_class_java_util_Spliterator_OfDouble) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_util_Spliterator_OfDouble) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 var class_java_io_Console C.jclass
 
@@ -1833,7 +1867,9 @@
 
 type proxy_class_java_io_Console _seq.Ref
 
-func (p *proxy_class_java_io_Console) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_io_Console) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_io_Console) Flush() error {
 	res := C.cproxy_java_io_Console_flush(C.jint(p.Bind_proxy_refnum__()))
@@ -1861,14 +1897,16 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
+// Code generated by gobind. DO NOT EDIT.
 
 // Package main is an autogenerated binder stub for package java.
-//   gobind -lang=go classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go classes
 package main
 
 /*
diff --git a/bind/testdata/classes.java.c.golden b/bind/testdata/classes.java.c.golden
index dac9d2e..811f961 100644
--- a/bind/testdata/classes.java.c.golden
+++ b/bind/testdata/classes.java.c.golden
@@ -1,4 +1,5 @@
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
+
 
 #include <jni.h>
 #include "seq.h"
@@ -727,10 +728,11 @@
 	return __res;
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/classes.java.golden b/bind/testdata/classes.java.golden
index 44c6ca9..f4ad0a1 100644
--- a/bind/testdata/classes.java.golden
+++ b/bind/testdata/classes.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.Future is a proxy for talking to a Go program.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 package java;
 
 import go.Seq;
@@ -32,10 +33,11 @@
     @Override public native java.lang.Object get(long p0, java.util.concurrent.TimeUnit p1) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException;
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.InputStream is a proxy for talking to a Go program.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 package java;
 
 import go.Seq;
@@ -64,10 +66,11 @@
     @Override public native int read() throws java.io.IOException;
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.Object is a proxy for talking to a Go program.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 package java;
 
 import go.Seq;
@@ -93,10 +96,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.Runnable is a proxy for talking to a Go program.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 package java;
 
 import go.Seq;
@@ -123,10 +127,11 @@
     @Override public native void run();
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.Java is a proxy for talking to a Go program.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 package java;
 
 import go.Seq;
diff --git a/bind/testdata/classes.java.h.golden b/bind/testdata/classes.java.h.golden
index 7350e6b..5368d26 100644
--- a/bind/testdata/classes.java.h.golden
+++ b/bind/testdata/classes.java.h.golden
@@ -1,4 +1,5 @@
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
+
 
 #include <jni.h>
 #include "seq.h"
@@ -80,10 +81,11 @@
 extern ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfLong_2(jint a0);
 extern ret_jint cproxy_s_java_util_Spliterators_iterator__Ljava_util_Spliterator_00024OfDouble_2(jint a0);
 extern ret_jint cproxy_s_java_lang_System_console();
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java classes
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java classes
 
 #ifndef __Java_H__
 #define __Java_H__
diff --git a/bind/testdata/customprefix.java.c.golden b/bind/testdata/customprefix.java.c.golden
index 5eb3b24..4c9e471 100644
--- a/bind/testdata/customprefix.java.c.golden
+++ b/bind/testdata/customprefix.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java -javapkg=com.example customprefix
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java -javapkg=com.example customprefix
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/customprefix.java.golden b/bind/testdata/customprefix.java.golden
index b9d4193..3073bf1 100644
--- a/bind/testdata/customprefix.java.golden
+++ b/bind/testdata/customprefix.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class com.example.customprefix.Customprefix is a proxy for talking to a Go program.
-//   gobind -lang=java -javapkg=com.example customprefix
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java -javapkg=com.example customprefix
 package com.example.customprefix;
 
 import go.Seq;
diff --git a/bind/testdata/customprefix.java.h.golden b/bind/testdata/customprefix.java.h.golden
index 302ba2d..12a6f5a 100644
--- a/bind/testdata/customprefix.java.h.golden
+++ b/bind/testdata/customprefix.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java -javapkg=com.example customprefix
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java -javapkg=com.example customprefix
 
 #ifndef __Customprefix_H__
 #define __Customprefix_H__
diff --git a/bind/testdata/doc.go.golden b/bind/testdata/doc.go.golden
index 043122d..bdcbe28 100644
--- a/bind/testdata/doc.go.golden
+++ b/bind/testdata/doc.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package doc.
-//   gobind -lang=go doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go doc
 package main
 
 /*
@@ -126,7 +127,9 @@
 
 type proxydoc_I _seq.Ref
 
-func (p *proxydoc_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxydoc_I) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxydoc_I) IM() {
 	C.cproxydoc_I_IM(C.int32_t(p.Bind_proxy_refnum__()))
diff --git a/bind/testdata/doc.java.c.golden b/bind/testdata/doc.java.c.golden
index 5b07165..fe365be 100644
--- a/bind/testdata/doc.java.c.golden
+++ b/bind/testdata/doc.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/doc.java.golden b/bind/testdata/doc.java.golden
index 90172e7..9819a2b 100644
--- a/bind/testdata/doc.java.golden
+++ b/bind/testdata/doc.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class doc.NoDoc is a proxy for talking to a Go program.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 package doc;
 
 import go.Seq;
@@ -44,10 +45,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class doc.S is a proxy for talking to a Go program.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 package doc;
 
 import go.Seq;
@@ -177,10 +179,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class doc.S2 is a proxy for talking to a Go program.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 package doc;
 
 import go.Seq;
@@ -223,10 +226,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class doc.I is a proxy for talking to a Go program.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 package doc;
 
 import go.Seq;
@@ -242,10 +246,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class doc.Doc is a proxy for talking to a Go program.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 package doc;
 
 import go.Seq;
diff --git a/bind/testdata/doc.java.h.golden b/bind/testdata/doc.java.h.golden
index b4d2917..e4eff37 100644
--- a/bind/testdata/doc.java.h.golden
+++ b/bind/testdata/doc.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java doc
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java doc
 
 #ifndef __Doc_H__
 #define __Doc_H__
diff --git a/bind/testdata/ignore.go.golden b/bind/testdata/ignore.go.golden
index abcdb91..486db37 100644
--- a/bind/testdata/ignore.go.golden
+++ b/bind/testdata/ignore.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package ignore.
-//   gobind -lang=go ignore
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go ignore
 package main
 
 /*
@@ -38,7 +39,9 @@
 
 type proxyignore_I _seq.Ref
 
-func (p *proxyignore_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyignore_I) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 // skipped method I.Argument with unsupported parameter or result types
 // skipped method I.Result with unsupported parameter or result types
diff --git a/bind/testdata/ignore.java.c.golden b/bind/testdata/ignore.java.c.golden
index 9511e21..d511041 100644
--- a/bind/testdata/ignore.java.c.golden
+++ b/bind/testdata/ignore.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java ignore
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java ignore
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/ignore.java.golden b/bind/testdata/ignore.java.golden
index df327a0..21894d9 100644
--- a/bind/testdata/ignore.java.golden
+++ b/bind/testdata/ignore.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class ignore.S is a proxy for talking to a Go program.
-//   gobind -lang=java ignore
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java ignore
 package ignore;
 
 import go.Seq;
@@ -49,10 +50,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class ignore.I is a proxy for talking to a Go program.
-//   gobind -lang=java ignore
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java ignore
 package ignore;
 
 import go.Seq;
@@ -65,10 +67,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class ignore.Ignore is a proxy for talking to a Go program.
-//   gobind -lang=java ignore
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java ignore
 package ignore;
 
 import go.Seq;
diff --git a/bind/testdata/ignore.java.h.golden b/bind/testdata/ignore.java.h.golden
index 0411568..857dc19 100644
--- a/bind/testdata/ignore.java.h.golden
+++ b/bind/testdata/ignore.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java ignore
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java ignore
 
 #ifndef __Ignore_H__
 #define __Ignore_H__
diff --git a/bind/testdata/interfaces.go.golden b/bind/testdata/interfaces.go.golden
index 60cf2e4..866bf16 100644
--- a/bind/testdata/interfaces.go.golden
+++ b/bind/testdata/interfaces.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package interfaces.
-//   gobind -lang=go interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go interfaces
 package main
 
 /*
@@ -35,7 +36,9 @@
 
 type proxyinterfaces_Error _seq.Ref
 
-func (p *proxyinterfaces_Error) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_Error) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_Error) Err() error {
 	res := C.cproxyinterfaces_Error_Err(C.int32_t(p.Bind_proxy_refnum__()))
@@ -62,7 +65,9 @@
 
 type proxyinterfaces_I _seq.Ref
 
-func (p *proxyinterfaces_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_I) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_I) Rand() int32 {
 	res := C.cproxyinterfaces_I_Rand(C.int32_t(p.Bind_proxy_refnum__()))
@@ -98,7 +103,9 @@
 
 type proxyinterfaces_I3 _seq.Ref
 
-func (p *proxyinterfaces_I3) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_I3) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_I3) F() interfaces.I1 {
 	res := C.cproxyinterfaces_I3_F(C.int32_t(p.Bind_proxy_refnum__()))
@@ -121,7 +128,9 @@
 
 type proxyinterfaces_Interfaces _seq.Ref
 
-func (p *proxyinterfaces_Interfaces) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_Interfaces) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_Interfaces) SomeMethod() {
 	C.cproxyinterfaces_Interfaces_SomeMethod(C.int32_t(p.Bind_proxy_refnum__()))
@@ -145,7 +154,9 @@
 
 type proxyinterfaces_LargerI _seq.Ref
 
-func (p *proxyinterfaces_LargerI) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_LargerI) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_LargerI) AnotherFunc() {
 	C.cproxyinterfaces_LargerI_AnotherFunc(C.int32_t(p.Bind_proxy_refnum__()))
@@ -168,7 +179,9 @@
 
 type proxyinterfaces_SameI _seq.Ref
 
-func (p *proxyinterfaces_SameI) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_SameI) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_SameI) Rand() int32 {
 	res := C.cproxyinterfaces_SameI_Rand(C.int32_t(p.Bind_proxy_refnum__()))
@@ -186,7 +199,9 @@
 
 type proxyinterfaces_WithParam _seq.Ref
 
-func (p *proxyinterfaces_WithParam) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyinterfaces_WithParam) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyinterfaces_WithParam) HasParam(param_p0 bool) {
 	var _param_p0 C.char = 0
diff --git a/bind/testdata/interfaces.java.c.golden b/bind/testdata/interfaces.java.c.golden
index b3c2138..255daaf 100644
--- a/bind/testdata/interfaces.java.c.golden
+++ b/bind/testdata/interfaces.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/interfaces.java.golden b/bind/testdata/interfaces.java.golden
index a25fb29..f17d6dc 100644
--- a/bind/testdata/interfaces.java.golden
+++ b/bind/testdata/interfaces.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.Error is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -11,10 +12,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.I is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -24,10 +26,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.I1 is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -40,10 +43,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.I2 is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -56,10 +60,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.I3 is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -73,10 +78,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.Interfaces_ is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -89,10 +95,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.LargerI is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -103,10 +110,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.SameI is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -116,10 +124,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.WithParam is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
@@ -129,10 +138,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class interfaces.Interfaces is a proxy for talking to a Go program.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 package interfaces;
 
 import go.Seq;
diff --git a/bind/testdata/interfaces.java.h.golden b/bind/testdata/interfaces.java.h.golden
index 5d5f3f1..fb51082 100644
--- a/bind/testdata/interfaces.java.h.golden
+++ b/bind/testdata/interfaces.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java interfaces
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java interfaces
 
 #ifndef __Interfaces_H__
 #define __Interfaces_H__
diff --git a/bind/testdata/issue10788.go.golden b/bind/testdata/issue10788.go.golden
index 165bb70..3c6954d 100644
--- a/bind/testdata/issue10788.go.golden
+++ b/bind/testdata/issue10788.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package issue10788.
-//   gobind -lang=go issue10788
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go issue10788
 package main
 
 /*
diff --git a/bind/testdata/issue10788.java.c.golden b/bind/testdata/issue10788.java.c.golden
index c28be81..da1bcfb 100644
--- a/bind/testdata/issue10788.java.c.golden
+++ b/bind/testdata/issue10788.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java issue10788
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue10788
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/issue10788.java.golden b/bind/testdata/issue10788.java.golden
index 29191c5..9b4877f 100644
--- a/bind/testdata/issue10788.java.golden
+++ b/bind/testdata/issue10788.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue10788.TestStruct is a proxy for talking to a Go program.
-//   gobind -lang=java issue10788
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue10788
 package issue10788;
 
 import go.Seq;
@@ -54,10 +55,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue10788.TestInterface is a proxy for talking to a Go program.
-//   gobind -lang=java issue10788
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue10788
 package issue10788;
 
 import go.Seq;
@@ -68,10 +70,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue10788.Issue10788 is a proxy for talking to a Go program.
-//   gobind -lang=java issue10788
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue10788
 package issue10788;
 
 import go.Seq;
diff --git a/bind/testdata/issue10788.java.h.golden b/bind/testdata/issue10788.java.h.golden
index f8206d3..2a0b28f 100644
--- a/bind/testdata/issue10788.java.h.golden
+++ b/bind/testdata/issue10788.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java issue10788
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue10788
 
 #ifndef __Issue10788_H__
 #define __Issue10788_H__
diff --git a/bind/testdata/issue12328.go.golden b/bind/testdata/issue12328.go.golden
index 38f4ccd..91b2bb8 100644
--- a/bind/testdata/issue12328.go.golden
+++ b/bind/testdata/issue12328.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package issue12328.
-//   gobind -lang=go issue12328
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go issue12328
 package main
 
 /*
diff --git a/bind/testdata/issue12328.java.c.golden b/bind/testdata/issue12328.java.c.golden
index 7c27e74..da87989 100644
--- a/bind/testdata/issue12328.java.c.golden
+++ b/bind/testdata/issue12328.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java issue12328
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12328
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/issue12328.java.golden b/bind/testdata/issue12328.java.golden
index 7b24a59..957a67d 100644
--- a/bind/testdata/issue12328.java.golden
+++ b/bind/testdata/issue12328.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue12328.T is a proxy for talking to a Go program.
-//   gobind -lang=java issue12328
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12328
 package issue12328;
 
 import go.Seq;
@@ -54,10 +55,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue12328.Issue12328 is a proxy for talking to a Go program.
-//   gobind -lang=java issue12328
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12328
 package issue12328;
 
 import go.Seq;
diff --git a/bind/testdata/issue12328.java.h.golden b/bind/testdata/issue12328.java.h.golden
index 14debbb..ee1c5de 100644
--- a/bind/testdata/issue12328.java.h.golden
+++ b/bind/testdata/issue12328.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java issue12328
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12328
 
 #ifndef __Issue12328_H__
 #define __Issue12328_H__
diff --git a/bind/testdata/issue12403.go.golden b/bind/testdata/issue12403.go.golden
index 2eecfa9..e979f5d 100644
--- a/bind/testdata/issue12403.go.golden
+++ b/bind/testdata/issue12403.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package issue12403.
-//   gobind -lang=go issue12403
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go issue12403
 package main
 
 /*
@@ -46,7 +47,9 @@
 
 type proxyissue12403_Parsable _seq.Ref
 
-func (p *proxyissue12403_Parsable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyissue12403_Parsable) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyissue12403_Parsable) FromJSON(param_jstr string) string {
 	_param_jstr := encodeString(param_jstr)
diff --git a/bind/testdata/issue12403.java.c.golden b/bind/testdata/issue12403.java.c.golden
index 846473c..cffa177 100644
--- a/bind/testdata/issue12403.java.c.golden
+++ b/bind/testdata/issue12403.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java issue12403
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12403
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/issue12403.java.golden b/bind/testdata/issue12403.java.golden
index 31aef58..db0e5fb 100644
--- a/bind/testdata/issue12403.java.golden
+++ b/bind/testdata/issue12403.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue12403.Parsable is a proxy for talking to a Go program.
-//   gobind -lang=java issue12403
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12403
 package issue12403;
 
 import go.Seq;
@@ -12,10 +13,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue12403.Issue12403 is a proxy for talking to a Go program.
-//   gobind -lang=java issue12403
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12403
 package issue12403;
 
 import go.Seq;
diff --git a/bind/testdata/issue12403.java.h.golden b/bind/testdata/issue12403.java.h.golden
index 2424a0d..783436b 100644
--- a/bind/testdata/issue12403.java.h.golden
+++ b/bind/testdata/issue12403.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java issue12403
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue12403
 
 #ifndef __Issue12403_H__
 #define __Issue12403_H__
diff --git a/bind/testdata/issue29559.go.golden b/bind/testdata/issue29559.go.golden
index 1d88aea..70f1790 100644
--- a/bind/testdata/issue29559.go.golden
+++ b/bind/testdata/issue29559.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package issue29559.
-//   gobind -lang=go issue29559
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go issue29559
 package main
 
 /*
diff --git a/bind/testdata/issue29559.java.c.golden b/bind/testdata/issue29559.java.c.golden
index 8cd552c..92df860 100644
--- a/bind/testdata/issue29559.java.c.golden
+++ b/bind/testdata/issue29559.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java issue29559
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue29559
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/issue29559.java.golden b/bind/testdata/issue29559.java.golden
index 946e4b9..a821edf 100644
--- a/bind/testdata/issue29559.java.golden
+++ b/bind/testdata/issue29559.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class issue29559.Issue29559 is a proxy for talking to a Go program.
-//   gobind -lang=java issue29559
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue29559
 package issue29559;
 
 import go.Seq;
diff --git a/bind/testdata/issue29559.java.h.golden b/bind/testdata/issue29559.java.h.golden
index a931ee0..9e4f85e 100644
--- a/bind/testdata/issue29559.java.h.golden
+++ b/bind/testdata/issue29559.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java issue29559
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java issue29559
 
 #ifndef __Issue29559_H__
 #define __Issue29559_H__
diff --git a/bind/testdata/java.go.golden b/bind/testdata/java.go.golden
index 6321418..2a47a1e 100644
--- a/bind/testdata/java.go.golden
+++ b/bind/testdata/java.go.golden
@@ -1,4 +1,4 @@
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Float
 
@@ -7,13 +7,13 @@
 const _ = Java.Dummy
 
 const (
-	MAX_VALUE = 3.4028235E38
-	MIN_NORMAL = 1.17549435E-38
-	MIN_VALUE = 1.4E-45
+	MAX_VALUE    = 3.4028235E38
+	MIN_NORMAL   = 1.17549435E-38
+	MIN_VALUE    = 1.4E-45
 	MAX_EXPONENT = 127
 	MIN_EXPONENT = -126
-	SIZE = 32
-	BYTES = 4
+	SIZE         = 32
+	BYTES        = 4
 )
 
 var (
@@ -22,8 +22,7 @@
 	// not extend or implement java.lang.Float.
 	Cast func(v interface{}) Java.Java_lang_Float
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package lang
 
@@ -35,7 +34,7 @@
 type Long Java.Java_lang_Long
 type Object Java.Java_lang_Object
 type Runnable Java.Java_lang_Runnable
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Long
 
@@ -46,8 +45,8 @@
 const (
 	MIN_VALUE = -9223372036854775808
 	MAX_VALUE = 9223372036854775807
-	SIZE = 64
-	BYTES = 8
+	SIZE      = 64
+	BYTES     = 8
 )
 
 var (
@@ -56,8 +55,7 @@
 	// not extend or implement java.lang.Long.
 	Cast func(v interface{}) Java.Java_lang_Long
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Object
 
@@ -65,8 +63,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.lang.Object proxy.
@@ -74,8 +71,7 @@
 	// not extend or implement java.lang.Object.
 	Cast func(v interface{}) Java.Java_lang_Object
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Runnable
 
@@ -83,8 +79,7 @@
 
 const _ = Java.Dummy
 
-const (
-)
+const ()
 
 var (
 	// Cast takes a proxy for a Java object and converts it to a java.lang.Runnable proxy.
@@ -92,8 +87,7 @@
 	// not extend or implement java.lang.Runnable.
 	Cast func(v interface{}) Java.Java_lang_Runnable
 )
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package Java
 
@@ -114,8 +108,7 @@
 
 type Java_lang_Runnable interface {
 }
-
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
 
 package main
 
@@ -142,11 +135,12 @@
 
 import "fmt"
 
-type proxy interface { Bind_proxy_refnum__() int32 }
+type proxy interface{ Bind_proxy_refnum__() int32 }
 
 // Suppress unused package error
 
 var _ = _seq.FromRefNum
+
 const _ = Java.Dummy
 
 //export initClasses
@@ -181,7 +175,9 @@
 
 type proxy_class_java_lang_Float _seq.Ref
 
-func (p *proxy_class_java_lang_Float) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_Float) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_lang_Float) ToString() string {
 	res := C.cproxy_java_lang_Float_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -195,7 +191,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -222,7 +220,9 @@
 
 type proxy_class_java_lang_Long _seq.Ref
 
-func (p *proxy_class_java_lang_Long) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_Long) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_lang_Long) ToString() string {
 	res := C.cproxy_java_lang_Long_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -236,7 +236,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -263,7 +265,9 @@
 
 type proxy_class_java_lang_Object _seq.Ref
 
-func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_class_java_lang_Object) ToString() string {
 	res := C.cproxy_java_lang_Object_toString(C.jint(p.Bind_proxy_refnum__()))
@@ -277,7 +281,9 @@
 			_exc = (*proxy_error)(_exc_ref)
 		}
 	}
-	if (_exc != nil) { panic(_exc) }
+	if _exc != nil {
+		panic(_exc)
+	}
 	return _res
 }
 
@@ -304,12 +310,14 @@
 
 type proxy_class_java_lang_Runnable _seq.Ref
 
-func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
+// Code generated by gobind. DO NOT EDIT.
 
 // Package main is an autogenerated binder stub for package java.
-//   gobind -lang=go java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go java
 package main
 
 /*
@@ -340,7 +348,9 @@
 
 type proxyjava_F _seq.Ref
 
-func (p *proxyjava_F) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyjava_F) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyjava_F) ToString() string {
 	res := C.cproxyjava_F_ToString(C.int32_t(p.Bind_proxy_refnum__()))
@@ -359,7 +369,9 @@
 
 type proxyjava_L _seq.Ref
 
-func (p *proxyjava_L) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyjava_L) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyjava_L) ToString() string {
 	res := C.cproxyjava_L_ToString(C.int32_t(p.Bind_proxy_refnum__()))
@@ -378,7 +390,9 @@
 
 type proxyjava_O _seq.Ref
 
-func (p *proxyjava_O) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyjava_O) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxyjava_O) ToString() string {
 	res := C.cproxyjava_O_ToString(C.int32_t(p.Bind_proxy_refnum__()))
@@ -388,4 +402,6 @@
 
 type proxyjava_R _seq.Ref
 
-func (p *proxyjava_R) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyjava_R) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
diff --git a/bind/testdata/java.java.c.golden b/bind/testdata/java.java.c.golden
index 8bbe285..e9d0603 100644
--- a/bind/testdata/java.java.c.golden
+++ b/bind/testdata/java.java.c.golden
@@ -1,4 +1,5 @@
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
+
 
 #include <jni.h>
 #include "seq.h"
@@ -85,10 +86,11 @@
 	return __res;
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/java.java.golden b/bind/testdata/java.java.golden
index bbbef88..bd060d8 100644
--- a/bind/testdata/java.java.golden
+++ b/bind/testdata/java.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.F is a proxy for talking to a Go program.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 package java;
 
 import go.Seq;
@@ -11,10 +12,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.L is a proxy for talking to a Go program.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 package java;
 
 import go.Seq;
@@ -24,10 +26,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.O is a proxy for talking to a Go program.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 package java;
 
 import go.Seq;
@@ -37,10 +40,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.R is a proxy for talking to a Go program.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 package java;
 
 import go.Seq;
@@ -49,10 +53,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class java.Java is a proxy for talking to a Go program.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 package java;
 
 import go.Seq;
diff --git a/bind/testdata/java.java.h.golden b/bind/testdata/java.java.h.golden
index 58eaaa5..f0ccef3 100644
--- a/bind/testdata/java.java.h.golden
+++ b/bind/testdata/java.java.h.golden
@@ -1,4 +1,5 @@
-// File is generated by gobind. Do not edit.
+// Code generated by gobind. DO NOT EDIT.
+
 
 #include <jni.h>
 #include "seq.h"
@@ -49,10 +50,11 @@
 extern ret_nstring cproxy_java_lang_Float_toString(jint this);
 extern ret_nstring cproxy_java_lang_Long_toString(jint this);
 extern ret_nstring cproxy_java_lang_Object_toString(jint this);
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java java
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java java
 
 #ifndef __Java_H__
 #define __Java_H__
diff --git a/bind/testdata/keywords.go.golden b/bind/testdata/keywords.go.golden
index 9d80a51..01e0738 100644
--- a/bind/testdata/keywords.go.golden
+++ b/bind/testdata/keywords.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package keywords.
-//   gobind -lang=go keywords
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go keywords
 package main
 
 /*
@@ -408,7 +409,9 @@
 
 type proxykeywords_KeywordCaller _seq.Ref
 
-func (p *proxykeywords_KeywordCaller) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxykeywords_KeywordCaller) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxykeywords_KeywordCaller) Abstract() {
 	C.cproxykeywords_KeywordCaller_Abstract(C.int32_t(p.Bind_proxy_refnum__()))
diff --git a/bind/testdata/keywords.java.c.golden b/bind/testdata/keywords.java.c.golden
index 88571de..82e1035 100644
--- a/bind/testdata/keywords.java.c.golden
+++ b/bind/testdata/keywords.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java keywords
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java keywords
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/keywords.java.golden b/bind/testdata/keywords.java.golden
index e2c744a..3db5202 100644
--- a/bind/testdata/keywords.java.golden
+++ b/bind/testdata/keywords.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class keywords.KeywordCaller is a proxy for talking to a Go program.
-//   gobind -lang=java keywords
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java keywords
 package keywords;
 
 import go.Seq;
@@ -65,10 +66,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class keywords.Keywords is a proxy for talking to a Go program.
-//   gobind -lang=java keywords
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java keywords
 package keywords;
 
 import go.Seq;
diff --git a/bind/testdata/keywords.java.h.golden b/bind/testdata/keywords.java.h.golden
index 4af5e9f..7eee773 100644
--- a/bind/testdata/keywords.java.h.golden
+++ b/bind/testdata/keywords.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java keywords
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java keywords
 
 #ifndef __Keywords_H__
 #define __Keywords_H__
diff --git a/bind/testdata/structs.go.golden b/bind/testdata/structs.go.golden
index aab0a35..fb50778 100644
--- a/bind/testdata/structs.go.golden
+++ b/bind/testdata/structs.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package structs.
-//   gobind -lang=go structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go structs
 package main
 
 /*
@@ -123,7 +124,9 @@
 
 type proxystructs_I _seq.Ref
 
-func (p *proxystructs_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxystructs_I) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxystructs_I) M() {
 	C.cproxystructs_I_M(C.int32_t(p.Bind_proxy_refnum__()))
diff --git a/bind/testdata/structs.java.c.golden b/bind/testdata/structs.java.c.golden
index 5a88adf..62b8f5a 100644
--- a/bind/testdata/structs.java.c.golden
+++ b/bind/testdata/structs.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/structs.java.golden b/bind/testdata/structs.java.golden
index d8a8006..5a140fe 100644
--- a/bind/testdata/structs.java.golden
+++ b/bind/testdata/structs.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class structs.S is a proxy for talking to a Go program.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 package structs;
 
 import go.Seq;
@@ -61,10 +62,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class structs.S2 is a proxy for talking to a Go program.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 package structs;
 
 import go.Seq;
@@ -104,10 +106,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class structs.Structs_ is a proxy for talking to a Go program.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 package structs;
 
 import go.Seq;
@@ -148,10 +151,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class structs.I is a proxy for talking to a Go program.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 package structs;
 
 import go.Seq;
@@ -161,10 +165,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class structs.Structs is a proxy for talking to a Go program.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 package structs;
 
 import go.Seq;
diff --git a/bind/testdata/structs.java.h.golden b/bind/testdata/structs.java.h.golden
index 4c84d34..85dc84b 100644
--- a/bind/testdata/structs.java.h.golden
+++ b/bind/testdata/structs.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java structs
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java structs
 
 #ifndef __Structs_H__
 #define __Structs_H__
diff --git a/bind/testdata/try.go.golden b/bind/testdata/try.go.golden
index f9ef1e4..9d0322c 100644
--- a/bind/testdata/try.go.golden
+++ b/bind/testdata/try.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package try.
-//   gobind -lang=go try
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go try
 package main
 
 /*
diff --git a/bind/testdata/try.java.c.golden b/bind/testdata/try.java.c.golden
index 54023f5..0099fa0 100644
--- a/bind/testdata/try.java.c.golden
+++ b/bind/testdata/try.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java try
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java try
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/try.java.golden b/bind/testdata/try.java.golden
index ac27fd9..e7c7adb 100644
--- a/bind/testdata/try.java.golden
+++ b/bind/testdata/try.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class try_.Try is a proxy for talking to a Go program.
-//   gobind -lang=java try
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java try
 package try_;
 
 import go.Seq;
diff --git a/bind/testdata/try.java.h.golden b/bind/testdata/try.java.h.golden
index 02e89f8..ffa4ed9 100644
--- a/bind/testdata/try.java.h.golden
+++ b/bind/testdata/try.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java try
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java try
 
 #ifndef __Try_H__
 #define __Try_H__
diff --git a/bind/testdata/underscores.go.golden b/bind/testdata/underscores.go.golden
index 5fcf4be..040bf36 100644
--- a/bind/testdata/underscores.go.golden
+++ b/bind/testdata/underscores.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package underscore_pkg.
-//   gobind -lang=go underscores
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go underscores
 package main
 
 /*
diff --git a/bind/testdata/underscores.java.c.golden b/bind/testdata/underscores.java.c.golden
index f4f60a1..b791d42 100644
--- a/bind/testdata/underscores.java.c.golden
+++ b/bind/testdata/underscores.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java underscores
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java underscores
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/underscores.java.golden b/bind/testdata/underscores.java.golden
index 58c64d0..3624f9d 100644
--- a/bind/testdata/underscores.java.golden
+++ b/bind/testdata/underscores.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class underscore_pkg.Underscore_struct is a proxy for talking to a Go program.
-//   gobind -lang=java underscores
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java underscores
 package underscore_pkg;
 
 import go.Seq;
@@ -54,10 +55,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class underscore_pkg.Underscore_pkg is a proxy for talking to a Go program.
-//   gobind -lang=java underscores
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java underscores
 package underscore_pkg;
 
 import go.Seq;
diff --git a/bind/testdata/underscores.java.h.golden b/bind/testdata/underscores.java.h.golden
index 6bf8948..1545890 100644
--- a/bind/testdata/underscores.java.h.golden
+++ b/bind/testdata/underscores.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java underscores
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java underscores
 
 #ifndef __Underscore_pkg_H__
 #define __Underscore_pkg_H__
diff --git a/bind/testdata/universe.golden b/bind/testdata/universe.golden
index 12c0507..1bb2a73 100644
--- a/bind/testdata/universe.golden
+++ b/bind/testdata/universe.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package universe.
-//   gobind -lang=go
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go
 package main
 
 /*
@@ -31,7 +32,9 @@
 
 type proxy_error _seq.Ref
 
-func (p *proxy_error) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxy_error) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 func (p *proxy_error) Error() string {
 	res := C.cproxy_error_Error(C.int32_t(p.Bind_proxy_refnum__()))
diff --git a/bind/testdata/universe.java.c.golden b/bind/testdata/universe.java.c.golden
index 71a481a..1b4a2c8 100644
--- a/bind/testdata/universe.java.c.golden
+++ b/bind/testdata/universe.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java 
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java 
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/universe.java.golden b/bind/testdata/universe.java.golden
index e7d21c2..6e49eaf 100644
--- a/bind/testdata/universe.java.golden
+++ b/bind/testdata/universe.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class go.error is a proxy for talking to a Go program.
-//   gobind -lang=java 
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java 
 package go;
 
 import go.Seq;
@@ -11,10 +12,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class go.Universe is a proxy for talking to a Go program.
-//   gobind -lang=java 
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java 
 package go;
 
 import go.Seq;
diff --git a/bind/testdata/universe.java.h.golden b/bind/testdata/universe.java.h.golden
index 89118c3..cd0b1e7 100644
--- a/bind/testdata/universe.java.h.golden
+++ b/bind/testdata/universe.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java 
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java 
 
 #ifndef __Universe_H__
 #define __Universe_H__
diff --git a/bind/testdata/vars.go.golden b/bind/testdata/vars.go.golden
index 7098222..f86d446 100644
--- a/bind/testdata/vars.go.golden
+++ b/bind/testdata/vars.go.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Package main is an autogenerated binder stub for package vars.
-//   gobind -lang=go vars
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=go vars
 package main
 
 /*
@@ -28,7 +29,9 @@
 
 type proxyvars_I _seq.Ref
 
-func (p *proxyvars_I) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
+func (p *proxyvars_I) Bind_proxy_refnum__() int32 {
+	return (*_seq.Ref)(p).Bind_IncNum()
+}
 
 //export var_setvars_ABool
 func var_setvars_ABool(v C.char) {
diff --git a/bind/testdata/vars.java.c.golden b/bind/testdata/vars.java.c.golden
index aacc9cd..014fce6 100644
--- a/bind/testdata/vars.java.c.golden
+++ b/bind/testdata/vars.java.c.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI functions for the Go <=> Java bridge.
-//   gobind -lang=java vars
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java vars
 
 #include <android/log.h>
 #include <stdint.h>
diff --git a/bind/testdata/vars.java.golden b/bind/testdata/vars.java.golden
index f92423f..09cd5d0 100644
--- a/bind/testdata/vars.java.golden
+++ b/bind/testdata/vars.java.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class vars.S is a proxy for talking to a Go program.
-//   gobind -lang=java vars
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java vars
 package vars;
 
 import go.Seq;
@@ -41,10 +42,11 @@
     }
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class vars.I is a proxy for talking to a Go program.
-//   gobind -lang=java vars
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java vars
 package vars;
 
 import go.Seq;
@@ -53,10 +55,11 @@
     
 }
 
+// Code generated by gobind. DO NOT EDIT.
+
 // Java class vars.Vars is a proxy for talking to a Go program.
-//   gobind -lang=java vars
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java vars
 package vars;
 
 import go.Seq;
diff --git a/bind/testdata/vars.java.h.golden b/bind/testdata/vars.java.h.golden
index f707a99..3b99414 100644
--- a/bind/testdata/vars.java.h.golden
+++ b/bind/testdata/vars.java.h.golden
@@ -1,7 +1,8 @@
+// Code generated by gobind. DO NOT EDIT.
+
 // JNI function headers for the Go <=> Java bridge.
-//   gobind -lang=java vars
 //
-// File is generated by gobind. Do not edit.
+//   autogenerated by gobind -lang=java vars
 
 #ifndef __Vars_H__
 #define __Vars_H__