168 private static final class CppProxy
extends Venue
170 private final long nativeRef;
171 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
173 private CppProxy(
long nativeRef)
175 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
176 this.nativeRef = nativeRef;
179 private native
void nativeDestroy(
long nativeRef);
180 public void _djinni_private_destroy()
182 boolean destroyed = this.destroyed.getAndSet(
true);
183 if (!destroyed) nativeDestroy(this.nativeRef);
185 protected void finalize() throws
java.lang.Throwable
187 _djinni_private_destroy();
194 public Point getPoint()
196 assert !this.destroyed.get() :
"trying to use a destroyed object";
197 return native_getPoint(this.nativeRef);
199 private native
Point native_getPoint(
long _nativeRef);
202 public int getLocationId()
204 assert !this.destroyed.get() :
"trying to use a destroyed object";
205 return native_getLocationId(this.nativeRef);
207 private native
int native_getLocationId(
long _nativeRef);
210 public int getSublocationId()
212 assert !this.destroyed.get() :
"trying to use a destroyed object";
213 return native_getSublocationId(this.nativeRef);
215 private native
int native_getSublocationId(
long _nativeRef);
220 assert !this.destroyed.get() :
"trying to use a destroyed object";
221 return native_getId(this.nativeRef);
223 private native
int native_getId(
long _nativeRef);
226 public String getName()
228 assert !this.destroyed.get() :
"trying to use a destroyed object";
229 return native_getName(this.nativeRef);
231 private native String native_getName(
long _nativeRef);
234 public String getPhone()
236 assert !this.destroyed.get() :
"trying to use a destroyed object";
237 return native_getPhone(this.nativeRef);
239 private native String native_getPhone(
long _nativeRef);
242 public String getDescript()
244 assert !this.destroyed.get() :
"trying to use a destroyed object";
245 return native_getDescript(this.nativeRef);
247 private native String native_getDescript(
long _nativeRef);
250 public String getAlias()
252 assert !this.destroyed.get() :
"trying to use a destroyed object";
253 return native_getAlias(this.nativeRef);
255 private native String native_getAlias(
long _nativeRef);
258 public int getCategoryId()
260 assert !this.destroyed.get() :
"trying to use a destroyed object";
261 return native_getCategoryId(this.nativeRef);
263 private native
int native_getCategoryId(
long _nativeRef);
266 public String getImageUrl()
268 assert !this.destroyed.get() :
"trying to use a destroyed object";
269 return native_getImageUrl(this.nativeRef);
271 private native String native_getImageUrl(
long _nativeRef);