github.com/F4RD1N/gomobile@v1.0.1/bind/testdata/issue12328.java.golden (about)

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