42 private static final class CppProxy
extends GraphVertex
44 private final long nativeRef;
45 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
47 private CppProxy(
long nativeRef)
49 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
50 this.nativeRef = nativeRef;
53 private native
void nativeDestroy(
long nativeRef);
54 public void _djinni_private_destroy()
56 boolean destroyed = this.destroyed.getAndSet(
true);
57 if (!destroyed) nativeDestroy(this.nativeRef);
59 protected void finalize() throws
java.lang.Throwable
61 _djinni_private_destroy();
70 assert !this.destroyed.get() :
"trying to use a destroyed object";
71 return native_getId(this.nativeRef);
73 private native
int native_getId(
long _nativeRef);
76 public Point getPoint()
78 assert !this.destroyed.get() :
"trying to use a destroyed object";
79 return native_getPoint(this.nativeRef);
81 private native
Point native_getPoint(
long _nativeRef);
84 public String getName()
86 assert !this.destroyed.get() :
"trying to use a destroyed object";
87 return native_getName(this.nativeRef);
89 private native String native_getName(
long _nativeRef);
92 public boolean getIsExternal()
94 assert !this.destroyed.get() :
"trying to use a destroyed object";
95 return native_getIsExternal(this.nativeRef);
97 private native
boolean native_getIsExternal(
long _nativeRef);
100 public boolean getIsElevation()
102 assert !this.destroyed.get() :
"trying to use a destroyed object";
103 return native_getIsElevation(this.nativeRef);
105 private native
boolean native_getIsElevation(
long _nativeRef);