github.com/thommil/tge-mobile@v0.0.0-20190308225214-66a08abd51aa/bind/testdata/vars.java.golden (about)

     1  // Java class vars.S is a proxy for talking to a Go program.
     2  //   gobind -lang=java vars
     3  //
     4  // File is generated by gobind. Do not edit.
     5  package vars;
     6  
     7  import go.Seq;
     8  
     9  public final class S implements Seq.Proxy, I {
    10      static { Vars.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      S(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
    20      
    21      public S() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
    22      
    23      private static native int __New();
    24      
    25      @Override public boolean equals(Object o) {
    26          if (o == null || !(o instanceof S)) {
    27              return false;
    28          }
    29          S that = (S)o;
    30          return true;
    31      }
    32      
    33      @Override public int hashCode() {
    34          return java.util.Arrays.hashCode(new Object[] {});
    35      }
    36      
    37      @Override public String toString() {
    38          StringBuilder b = new StringBuilder();
    39          b.append("S").append("{");
    40          return b.append("}").toString();
    41      }
    42  }
    43  
    44  // Java class vars.I is a proxy for talking to a Go program.
    45  //   gobind -lang=java vars
    46  //
    47  // File is generated by gobind. Do not edit.
    48  package vars;
    49  
    50  import go.Seq;
    51  
    52  public interface I {
    53      
    54  }
    55  
    56  // Java class vars.Vars is a proxy for talking to a Go program.
    57  //   gobind -lang=java vars
    58  //
    59  // File is generated by gobind. Do not edit.
    60  package vars;
    61  
    62  import go.Seq;
    63  
    64  public abstract class Vars {
    65      static {
    66          Seq.touch(); // for loading the native library
    67          _init();
    68      }
    69      
    70      private Vars() {} // uninstantiable
    71      
    72      // touch is called from other bound packages to initialize this package
    73      public static void touch() {}
    74      
    75      private static native void _init();
    76      
    77      private static final class proxyI implements Seq.Proxy, I {
    78          private final int refnum;
    79          
    80          @Override public final int incRefnum() {
    81                Seq.incGoRef(refnum, this);
    82                return refnum;
    83          }
    84          
    85          proxyI(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
    86          
    87      }
    88      
    89      
    90      public static native void setABool(boolean v);
    91      public static native boolean getABool();
    92      
    93      public static native void setAFloat(double v);
    94      public static native double getAFloat();
    95      
    96      public static native void setAFloat32(float v);
    97      public static native float getAFloat32();
    98      
    99      public static native void setAFloat64(double v);
   100      public static native double getAFloat64();
   101      
   102      public static native void setAString(String v);
   103      public static native String getAString();
   104      
   105      public static native void setAStructPtr(S v);
   106      public static native S getAStructPtr();
   107      
   108      public static native void setAnInt(long v);
   109      public static native long getAnInt();
   110      
   111      public static native void setAnInt16(short v);
   112      public static native short getAnInt16();
   113      
   114      public static native void setAnInt32(int v);
   115      public static native int getAnInt32();
   116      
   117      public static native void setAnInt64(long v);
   118      public static native long getAnInt64();
   119      
   120      public static native void setAnInt8(byte v);
   121      public static native byte getAnInt8();
   122      
   123      public static native void setAnInterface(I v);
   124      public static native I getAnInterface();
   125      
   126  }