Commit 1c82f747 authored by Jacob Potter's avatar Jacob Potter

Make Djinni-generated CppProxy objects private

Fixes #121
parent 7b270670
...@@ -13,7 +13,7 @@ public abstract class SortItems { ...@@ -13,7 +13,7 @@ public abstract class SortItems {
@CheckForNull @CheckForNull
public static native SortItems createWithListener(@CheckForNull TextboxListener listener); public static native SortItems createWithListener(@CheckForNull TextboxListener listener);
public static final class CppProxy extends SortItems private static final class CppProxy extends SortItems
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
...@@ -168,7 +168,7 @@ class JavaGenerator(spec: Spec) extends Generator(spec) { ...@@ -168,7 +168,7 @@ class JavaGenerator(spec: Spec) extends Generator(spec) {
if (i.ext.cpp) { if (i.ext.cpp) {
w.wl w.wl
javaAnnotationHeader.foreach(w.wl) javaAnnotationHeader.foreach(w.wl)
w.wl(s"public static final class CppProxy$typeParamList extends $javaClass$typeParamList").braced { w.wl(s"private static final class CppProxy$typeParamList extends $javaClass$typeParamList").braced {
w.wl("private final long nativeRef;") w.wl("private final long nativeRef;")
w.wl("private final AtomicBoolean destroyed = new AtomicBoolean(false);") w.wl("private final AtomicBoolean destroyed = new AtomicBoolean(false);")
w.wl w.wl
......
...@@ -24,7 +24,7 @@ public abstract class ConstantsInterface { ...@@ -24,7 +24,7 @@ public abstract class ConstantsInterface {
public abstract void dummy(); public abstract void dummy();
public static final class CppProxy extends ConstantsInterface private static final class CppProxy extends ConstantsInterface
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
...@@ -13,7 +13,7 @@ public abstract class CppException { ...@@ -13,7 +13,7 @@ public abstract class CppException {
@CheckForNull @CheckForNull
public static native CppException get(); public static native CppException get();
public static final class CppProxy extends CppException private static final class CppProxy extends CppException
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
...@@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -8,7 +8,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
public abstract class ExternInterface1 { public abstract class ExternInterface1 {
public abstract com.dropbox.djinni.test.ClientReturnedRecord foo(com.dropbox.djinni.test.ClientInterface i); public abstract com.dropbox.djinni.test.ClientReturnedRecord foo(com.dropbox.djinni.test.ClientInterface i);
public static final class CppProxy extends ExternInterface1 private static final class CppProxy extends ExternInterface1
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
...@@ -67,7 +67,7 @@ public abstract class TestDuration { ...@@ -67,7 +67,7 @@ public abstract class TestDuration {
public static native long unbox(@CheckForNull java.time.Duration dt); public static native long unbox(@CheckForNull java.time.Duration dt);
public static final class CppProxy extends TestDuration private static final class CppProxy extends TestDuration
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
...@@ -69,7 +69,7 @@ public abstract class TestHelpers { ...@@ -69,7 +69,7 @@ public abstract class TestHelpers {
@Nonnull @Nonnull
public static native byte[] idBinary(@Nonnull byte[] b); public static native byte[] idBinary(@Nonnull byte[] b);
public static final class CppProxy extends TestHelpers private static final class CppProxy extends TestHelpers
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
...@@ -11,7 +11,7 @@ public abstract class Token { ...@@ -11,7 +11,7 @@ public abstract class Token {
@Nonnull @Nonnull
public abstract String whoami(); public abstract String whoami();
public static final class CppProxy extends Token private static final class CppProxy extends Token
{ {
private final long nativeRef; private final long nativeRef;
private final AtomicBoolean destroyed = new AtomicBoolean(false); private final AtomicBoolean destroyed = new AtomicBoolean(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment