Structure extends com.sun.jna.Structure implements 
		Comparable<Structure<S, V, R>>,
		StructureType,
		StructureTypeDependent { public R byReference() { return setupClone(newByReference(), this); } protected  Structure(Pointer p); protected  Structure(); void setDependency(StructureType type); @Override void read(); @Override void write(); R byReference(); V byValue(); S clone(); @SuppressWarnings("unchecked") static S[] newArray(Class<S> structClass, int arrayLength); @Deprecated @SuppressWarnings("unchecked") @Override S[] toArray(int size); @Deprecated S[] toArray(); @Deprecated @SuppressWarnings("unchecked") R[] toReferenceArray(int size); @Deprecated @SuppressWarnings("unchecked") V[] toValueArray(int size); @Deprecated R[] toReferenceArray(); @Deprecated V[] toValueArray(); @Deprecated @SuppressWarnings("unchecked") @Override S[] toArray(com.sun.jna.Structure[] array); @SuppressWarnings("unchecked") S[] castToArray(int size); S[] castToArray(); @SuppressWarnings({ "unchecked", "deprecation" }) R[] castToReferenceArray(int size); @SuppressWarnings({ "unchecked", "deprecation" }) V[] castToValueArray(int size); R[] castToReferenceArray(); V[] castToValueArray(); @SuppressWarnings("unchecked") S[] castToArray(com.sun.jna.Structure[] array); int compareTo(Structure<S, V, R> o); S use(Pointer m); @SuppressWarnings("unchecked") S use(Pointer m, long byteOffset); S use(Buffer m); @SuppressWarnings("unchecked") S use(Buffer b, long byteOffset);  }
@Test public void testByRefClone() { TestStruct s = new TestStruct(); s.value = 10; TestStruct.ByReference r = s.byReference(); r.autoWrite(); assertEquals(s.value, r.value); }