32 public abstract ArrayList<GraphEdge>
getEdges();
36 private final long nativeRef;
37 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
39 private CppProxy(
long nativeRef)
41 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
42 this.nativeRef = nativeRef;
45 private native
void nativeDestroy(
long nativeRef);
46 public void _djinni_private_destroy()
48 boolean destroyed = this.destroyed.getAndSet(
true);
49 if (!destroyed) nativeDestroy(this.nativeRef);
51 protected void finalize() throws
java.lang.Throwable
53 _djinni_private_destroy();
60 public ArrayList<GraphEdge> getEdges()
62 assert !this.destroyed.get() :
"trying to use a destroyed object";
63 return native_getEdges(this.nativeRef);
65 private native ArrayList<GraphEdge> native_getEdges(
long _nativeRef);