68 private static final class CppProxy
extends Venue
70 private final long nativeRef;
71 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
73 private CppProxy(
long nativeRef)
75 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
76 this.nativeRef = nativeRef;
79 private native
void nativeDestroy(
long nativeRef);
80 public void _djinni_private_destroy()
82 boolean destroyed = this.destroyed.getAndSet(
true);
83 if (!destroyed) nativeDestroy(this.nativeRef);
85 protected void finalize() throws
java.lang.Throwable
87 _djinni_private_destroy();
94 public Point getPoint()
96 assert !this.destroyed.get() :
"trying to use a destroyed object";
97 return native_getPoint(this.nativeRef);
99 private native
Point native_getPoint(
long _nativeRef);
102 public int getLocationId()
104 assert !this.destroyed.get() :
"trying to use a destroyed object";
105 return native_getLocationId(this.nativeRef);
107 private native
int native_getLocationId(
long _nativeRef);
110 public int getSublocationId()
112 assert !this.destroyed.get() :
"trying to use a destroyed object";
113 return native_getSublocationId(this.nativeRef);
115 private native
int native_getSublocationId(
long _nativeRef);
120 assert !this.destroyed.get() :
"trying to use a destroyed object";
121 return native_getId(this.nativeRef);
123 private native
int native_getId(
long _nativeRef);
126 public String getName()
128 assert !this.destroyed.get() :
"trying to use a destroyed object";
129 return native_getName(this.nativeRef);
131 private native String native_getName(
long _nativeRef);
134 public String getPhone()
136 assert !this.destroyed.get() :
"trying to use a destroyed object";
137 return native_getPhone(this.nativeRef);
139 private native String native_getPhone(
long _nativeRef);
142 public String getDescript()
144 assert !this.destroyed.get() :
"trying to use a destroyed object";
145 return native_getDescript(this.nativeRef);
147 private native String native_getDescript(
long _nativeRef);
150 public String getAlias()
152 assert !this.destroyed.get() :
"trying to use a destroyed object";
153 return native_getAlias(this.nativeRef);
155 private native String native_getAlias(
long _nativeRef);
158 public int getCategoryId()
160 assert !this.destroyed.get() :
"trying to use a destroyed object";
161 return native_getCategoryId(this.nativeRef);
163 private native
int native_getCategoryId(
long _nativeRef);
166 public String getImageUrl()
168 assert !this.destroyed.get() :
"trying to use a destroyed object";
169 return native_getImageUrl(this.nativeRef);
171 private native String native_getImageUrl(
long _nativeRef);