github.com/cyrilou242/gomobile-java@v0.0.0-20220215185836-09daef25a210/bind/testdata/underscores.java.golden (about)

     1  // Code generated by gobind. DO NOT EDIT.
     2  
     3  // Java class underscore_pkg.Underscore_struct is a proxy for talking to a Go program.
     4  //
     5  //   autogenerated by gobind -lang=java underscores
     6  package underscore_pkg;
     7  
     8  import go.Seq;
     9  
    10  public final class Underscore_struct implements Seq.Proxy {
    11      static { Underscore_pkg.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      Underscore_struct(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
    21      
    22      public Underscore_struct() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
    23      
    24      private static native int __New();
    25      
    26      public final native String getUnderscore_field();
    27      public final native void setUnderscore_field(String v);
    28      
    29      @Override public boolean equals(Object o) {
    30          if (o == null || !(o instanceof Underscore_struct)) {
    31              return false;
    32          }
    33          Underscore_struct that = (Underscore_struct)o;
    34          String thisUnderscore_field = getUnderscore_field();
    35          String thatUnderscore_field = that.getUnderscore_field();
    36          if (thisUnderscore_field == null) {
    37              if (thatUnderscore_field != null) {
    38                  return false;
    39              }
    40          } else if (!thisUnderscore_field.equals(thatUnderscore_field)) {
    41              return false;
    42          }
    43          return true;
    44      }
    45      
    46      @Override public int hashCode() {
    47          return java.util.Arrays.hashCode(new Object[] {getUnderscore_field()});
    48      }
    49      
    50      @Override public String toString() {
    51          StringBuilder b = new StringBuilder();
    52          b.append("Underscore_struct").append("{");
    53          b.append("Underscore_field:").append(getUnderscore_field()).append(",");
    54          return b.append("}").toString();
    55      }
    56  }
    57  
    58  // Code generated by gobind. DO NOT EDIT.
    59  
    60  // Java class underscore_pkg.Underscore_pkg is a proxy for talking to a Go program.
    61  //
    62  //   autogenerated by gobind -lang=java underscores
    63  package underscore_pkg;
    64  
    65  import go.Seq;
    66  
    67  public abstract class Underscore_pkg {
    68      static {
    69          Seq.touch(); // for loading the native library
    70          _init();
    71      }
    72      
    73      private Underscore_pkg() {} // 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      public static native void setUnderscore_var(long v);
    83      public static native long getUnderscore_var();
    84      
    85      public static native void underscore_func();
    86  }