158 private static final class CppProxy
extends Venue
160 private final long nativeRef;
161 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
163 private CppProxy(
long nativeRef)
165 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
166 this.nativeRef = nativeRef;
169 private native
void nativeDestroy(
long nativeRef);
170 public void _djinni_private_destroy()
172 boolean destroyed = this.destroyed.getAndSet(
true);
173 if (!destroyed) nativeDestroy(this.nativeRef);
175 protected void finalize() throws
java.lang.Throwable
177 _djinni_private_destroy();
184 public Point getPoint()
186 assert !this.destroyed.get() :
"trying to use a destroyed object";
187 return native_getPoint(this.nativeRef);
189 private native
Point native_getPoint(
long _nativeRef);
192 public int getLocationId()
194 assert !this.destroyed.get() :
"trying to use a destroyed object";
195 return native_getLocationId(this.nativeRef);
197 private native
int native_getLocationId(
long _nativeRef);
200 public int getSublocationId()
202 assert !this.destroyed.get() :
"trying to use a destroyed object";
203 return native_getSublocationId(this.nativeRef);
205 private native
int native_getSublocationId(
long _nativeRef);
210 assert !this.destroyed.get() :
"trying to use a destroyed object";
211 return native_getId(this.nativeRef);
213 private native
int native_getId(
long _nativeRef);
216 public String getName()
218 assert !this.destroyed.get() :
"trying to use a destroyed object";
219 return native_getName(this.nativeRef);
221 private native String native_getName(
long _nativeRef);
224 public String getPhone()
226 assert !this.destroyed.get() :
"trying to use a destroyed object";
227 return native_getPhone(this.nativeRef);
229 private native String native_getPhone(
long _nativeRef);
232 public String getDescript()
234 assert !this.destroyed.get() :
"trying to use a destroyed object";
235 return native_getDescript(this.nativeRef);
237 private native String native_getDescript(
long _nativeRef);
240 public String getAlias()
242 assert !this.destroyed.get() :
"trying to use a destroyed object";
243 return native_getAlias(this.nativeRef);
245 private native String native_getAlias(
long _nativeRef);
248 public int getCategoryId()
250 assert !this.destroyed.get() :
"trying to use a destroyed object";
251 return native_getCategoryId(this.nativeRef);
253 private native
int native_getCategoryId(
long _nativeRef);
256 public String getImageUrl()
258 assert !this.destroyed.get() :
"trying to use a destroyed object";
259 return native_getImageUrl(this.nativeRef);
261 private native String native_getImageUrl(
long _nativeRef);