github.com/acrespo/mobile@v0.0.0-20190107162257-dc0771356504/bind/testdata/underscores.java.golden (about)

     1  // Java class underscore_pkg.Underscore_struct is a proxy for talking to a Go program.
     2  //   gobind -lang=java underscores
     3  //
     4  // File is generated by gobind. Do not edit.
     5  package underscore_pkg;
     6  
     7  import go.Seq;
     8  
     9  public final class Underscore_struct implements Seq.Proxy {
    10      static { Underscore_pkg.touch(); }
    11      
    12      private final int refnum;
    13      
    14      @Override public final int incRefnum() {
    15            Seq.incGoRef(refnum, this);
    16            return refnum;
    17      }
    18      
    19      Underscore_struct(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
    20      
    21      public Underscore_struct() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
    22      
    23      private static native int __New();
    24      
    25      public final native String getUnderscore_field();
    26      public final native void setUnderscore_field(String v);
    27      
    28      @Override public boolean equals(Object o) {
    29          if (o == null || !(o instanceof Underscore_struct)) {
    30              return false;
    31          }
    32          Underscore_struct that = (Underscore_struct)o;
    33          String thisUnderscore_field = getUnderscore_field();
    34          String thatUnderscore_field = that.getUnderscore_field();
    35          if (thisUnderscore_field == null) {
    36              if (thatUnderscore_field != null) {
    37                  return false;
    38              }
    39          } else if (!thisUnderscore_field.equals(thatUnderscore_field)) {
    40              return false;
    41          }
    42          return true;
    43      }
    44      
    45      @Override public int hashCode() {
    46          return java.util.Arrays.hashCode(new Object[] {getUnderscore_field()});
    47      }
    48      
    49      @Override public String toString() {
    50          StringBuilder b = new StringBuilder();
    51          b.append("Underscore_struct").append("{");
    52          b.append("Underscore_field:").append(getUnderscore_field()).append(",");
    53          return b.append("}").toString();
    54      }
    55  }
    56  
    57  // Java class underscore_pkg.Underscore_pkg is a proxy for talking to a Go program.
    58  //   gobind -lang=java underscores
    59  //
    60  // File is generated by gobind. Do not edit.
    61  package underscore_pkg;
    62  
    63  import go.Seq;
    64  
    65  public abstract class Underscore_pkg {
    66      static {
    67          Seq.touch(); // for loading the native library
    68          _init();
    69      }
    70      
    71      private Underscore_pkg() {} // uninstantiable
    72      
    73      // touch is called from other bound packages to initialize this package
    74      public static void touch() {}
    75      
    76      private static native void _init();
    77      
    78      
    79      
    80      public static native void setUnderscore_var(long v);
    81      public static native long getUnderscore_var();
    82      
    83      public static native void underscore_func();
    84  }