87 private static final class CppProxy
extends GraphVertex
89 private final long nativeRef;
90 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
92 private CppProxy(
long nativeRef)
94 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
95 this.nativeRef = nativeRef;
98 private native
void nativeDestroy(
long nativeRef);
99 public void _djinni_private_destroy()
101 boolean destroyed = this.destroyed.getAndSet(
true);
102 if (!destroyed) nativeDestroy(this.nativeRef);
104 protected void finalize() throws
java.lang.Throwable
106 _djinni_private_destroy();
115 assert !this.destroyed.get() :
"trying to use a destroyed object";
116 return native_getId(this.nativeRef);
118 private native
int native_getId(
long _nativeRef);
121 public Point getPoint()
123 assert !this.destroyed.get() :
"trying to use a destroyed object";
124 return native_getPoint(this.nativeRef);
126 private native
Point native_getPoint(
long _nativeRef);
129 public String getName()
131 assert !this.destroyed.get() :
"trying to use a destroyed object";
132 return native_getName(this.nativeRef);
134 private native String native_getName(
long _nativeRef);
137 public boolean getIsExternal()
139 assert !this.destroyed.get() :
"trying to use a destroyed object";
140 return native_getIsExternal(this.nativeRef);
142 private native
boolean native_getIsExternal(
long _nativeRef);
145 public boolean getIsElevation()
147 assert !this.destroyed.get() :
"trying to use a destroyed object";
148 return native_getIsElevation(this.nativeRef);
150 private native
boolean native_getIsElevation(
long _nativeRef);