-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAtomicLongArray.swift
More file actions
357 lines (262 loc) · 15.9 KB
/
AtomicLongArray.swift
File metadata and controls
357 lines (262 loc) · 15.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
import java_swift
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// class java.util.concurrent.atomic.AtomicLongArray ///
open class AtomicLongArray: java_swift.JavaObject, /* interface java.io.Serializable */ UnavailableProtocol {
public convenience init?( casting object: java_swift.JavaObject, _ file: StaticString = #file, _ line: Int = #line ) {
self.init( javaObject: nil )
object.withJavaObject {
self.javaObject = $0
}
}
private static var AtomicLongArrayJNIClass: jclass?
/// private static final int java.util.concurrent.atomic.AtomicLongArray.base
/// private static final long java.util.concurrent.atomic.AtomicLongArray.serialVersionUID
/// private static final int java.util.concurrent.atomic.AtomicLongArray.shift
/// private static final sun.misc.Unsafe java.util.concurrent.atomic.AtomicLongArray.unsafe
/// private final long[] java.util.concurrent.atomic.AtomicLongArray.array
/// public java.util.concurrent.atomic.AtomicLongArray(int)
private static var new_MethodID_1: jmethodID?
public convenience init( length: Int ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( i: jint(length) )
let __object = JNIMethod.NewObject( className: "java/util/concurrent/atomic/AtomicLongArray", classCache: &AtomicLongArray.AtomicLongArrayJNIClass, methodSig: "(I)V", methodCache: &AtomicLongArray.new_MethodID_1, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _length: Int ) {
self.init( length: _length )
}
/// public java.util.concurrent.atomic.AtomicLongArray(long[])
private static var new_MethodID_2: jmethodID?
public convenience init( array: [Int64]? ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: array, locals: &__locals )
let __object = JNIMethod.NewObject( className: "java/util/concurrent/atomic/AtomicLongArray", classCache: &AtomicLongArray.AtomicLongArrayJNIClass, methodSig: "([J)V", methodCache: &AtomicLongArray.new_MethodID_2, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _array: [Int64]? ) {
self.init( array: _array )
}
/// private static long java.util.concurrent.atomic.AtomicLongArray.byteOffset(int)
/// public final long java.util.concurrent.atomic.AtomicLongArray.accumulateAndGet(int,long,java.util.function.LongBinaryOperator)
private static var accumulateAndGet_MethodID_3: jmethodID?
open func accumulateAndGet( i: Int, x: Int64, accumulatorFunction: LongBinaryOperator? ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 3 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: x )
__args[2] = JNIType.toJava( value: accumulatorFunction, locals: &__locals )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "accumulateAndGet", methodSig: "(IJLjava/util/function/LongBinaryOperator;)J", methodCache: &AtomicLongArray.accumulateAndGet_MethodID_3, args: &__args, locals: &__locals )
return __return
}
open func accumulateAndGet( _ _i: Int, _ _x: Int64, _ _accumulatorFunction: LongBinaryOperator? ) -> Int64 {
return accumulateAndGet( i: _i, x: _x, accumulatorFunction: _accumulatorFunction )
}
/// public long java.util.concurrent.atomic.AtomicLongArray.addAndGet(int,long)
private static var addAndGet_MethodID_4: jmethodID?
open func addAndGet( i: Int, delta: Int64 ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: delta )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "addAndGet", methodSig: "(IJ)J", methodCache: &AtomicLongArray.addAndGet_MethodID_4, args: &__args, locals: &__locals )
return __return
}
open func addAndGet( _ _i: Int, _ _delta: Int64 ) -> Int64 {
return addAndGet( i: _i, delta: _delta )
}
/// private long java.util.concurrent.atomic.AtomicLongArray.checkedByteOffset(int)
/// public final boolean java.util.concurrent.atomic.AtomicLongArray.compareAndSet(int,long,long)
private static var compareAndSet_MethodID_5: jmethodID?
open func compareAndSet( i: Int, expect: Int64, update: Int64 ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 3 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: expect )
__args[2] = jvalue( j: update )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "compareAndSet", methodSig: "(IJJ)Z", methodCache: &AtomicLongArray.compareAndSet_MethodID_5, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
open func compareAndSet( _ _i: Int, _ _expect: Int64, _ _update: Int64 ) -> Bool {
return compareAndSet( i: _i, expect: _expect, update: _update )
}
/// private boolean java.util.concurrent.atomic.AtomicLongArray.compareAndSetRaw(long,long,long)
/// public final long java.util.concurrent.atomic.AtomicLongArray.decrementAndGet(int)
private static var decrementAndGet_MethodID_6: jmethodID?
open func decrementAndGet( i: Int ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( i: jint(i) )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "decrementAndGet", methodSig: "(I)J", methodCache: &AtomicLongArray.decrementAndGet_MethodID_6, args: &__args, locals: &__locals )
return __return
}
open func decrementAndGet( _ _i: Int ) -> Int64 {
return decrementAndGet( i: _i )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.get(int)
private static var get_MethodID_7: jmethodID?
open func get( i: Int ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( i: jint(i) )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "get", methodSig: "(I)J", methodCache: &AtomicLongArray.get_MethodID_7, args: &__args, locals: &__locals )
return __return
}
open func get( _ _i: Int ) -> Int64 {
return get( i: _i )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.getAndAccumulate(int,long,java.util.function.LongBinaryOperator)
private static var getAndAccumulate_MethodID_8: jmethodID?
open func getAndAccumulate( i: Int, x: Int64, accumulatorFunction: LongBinaryOperator? ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 3 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: x )
__args[2] = JNIType.toJava( value: accumulatorFunction, locals: &__locals )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "getAndAccumulate", methodSig: "(IJLjava/util/function/LongBinaryOperator;)J", methodCache: &AtomicLongArray.getAndAccumulate_MethodID_8, args: &__args, locals: &__locals )
return __return
}
open func getAndAccumulate( _ _i: Int, _ _x: Int64, _ _accumulatorFunction: LongBinaryOperator? ) -> Int64 {
return getAndAccumulate( i: _i, x: _x, accumulatorFunction: _accumulatorFunction )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.getAndAdd(int,long)
private static var getAndAdd_MethodID_9: jmethodID?
open func getAndAdd( i: Int, delta: Int64 ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: delta )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "getAndAdd", methodSig: "(IJ)J", methodCache: &AtomicLongArray.getAndAdd_MethodID_9, args: &__args, locals: &__locals )
return __return
}
open func getAndAdd( _ _i: Int, _ _delta: Int64 ) -> Int64 {
return getAndAdd( i: _i, delta: _delta )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.getAndDecrement(int)
private static var getAndDecrement_MethodID_10: jmethodID?
open func getAndDecrement( i: Int ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( i: jint(i) )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "getAndDecrement", methodSig: "(I)J", methodCache: &AtomicLongArray.getAndDecrement_MethodID_10, args: &__args, locals: &__locals )
return __return
}
open func getAndDecrement( _ _i: Int ) -> Int64 {
return getAndDecrement( i: _i )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.getAndIncrement(int)
private static var getAndIncrement_MethodID_11: jmethodID?
open func getAndIncrement( i: Int ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( i: jint(i) )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "getAndIncrement", methodSig: "(I)J", methodCache: &AtomicLongArray.getAndIncrement_MethodID_11, args: &__args, locals: &__locals )
return __return
}
open func getAndIncrement( _ _i: Int ) -> Int64 {
return getAndIncrement( i: _i )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.getAndSet(int,long)
private static var getAndSet_MethodID_12: jmethodID?
open func getAndSet( i: Int, newValue: Int64 ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: newValue )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "getAndSet", methodSig: "(IJ)J", methodCache: &AtomicLongArray.getAndSet_MethodID_12, args: &__args, locals: &__locals )
return __return
}
open func getAndSet( _ _i: Int, _ _newValue: Int64 ) -> Int64 {
return getAndSet( i: _i, newValue: _newValue )
}
/// public final long java.util.concurrent.atomic.AtomicLongArray.getAndUpdate(int,java.util.function.LongUnaryOperator)
private static var getAndUpdate_MethodID_13: jmethodID?
open func getAndUpdate( i: Int, updateFunction: LongUnaryOperator? ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = JNIType.toJava( value: updateFunction, locals: &__locals )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "getAndUpdate", methodSig: "(ILjava/util/function/LongUnaryOperator;)J", methodCache: &AtomicLongArray.getAndUpdate_MethodID_13, args: &__args, locals: &__locals )
return __return
}
open func getAndUpdate( _ _i: Int, _ _updateFunction: LongUnaryOperator? ) -> Int64 {
return getAndUpdate( i: _i, updateFunction: _updateFunction )
}
/// private long java.util.concurrent.atomic.AtomicLongArray.getRaw(long)
/// public final long java.util.concurrent.atomic.AtomicLongArray.incrementAndGet(int)
private static var incrementAndGet_MethodID_14: jmethodID?
open func incrementAndGet( i: Int ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( i: jint(i) )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "incrementAndGet", methodSig: "(I)J", methodCache: &AtomicLongArray.incrementAndGet_MethodID_14, args: &__args, locals: &__locals )
return __return
}
open func incrementAndGet( _ _i: Int ) -> Int64 {
return incrementAndGet( i: _i )
}
/// public final void java.util.concurrent.atomic.AtomicLongArray.lazySet(int,long)
private static var lazySet_MethodID_15: jmethodID?
open func lazySet( i: Int, newValue: Int64 ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: newValue )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "lazySet", methodSig: "(IJ)V", methodCache: &AtomicLongArray.lazySet_MethodID_15, args: &__args, locals: &__locals )
}
open func lazySet( _ _i: Int, _ _newValue: Int64 ) {
lazySet( i: _i, newValue: _newValue )
}
/// public final int java.util.concurrent.atomic.AtomicLongArray.length()
private static var length_MethodID_16: jmethodID?
open func length() -> Int {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "length", methodSig: "()I", methodCache: &AtomicLongArray.length_MethodID_16, args: &__args, locals: &__locals )
return Int(__return)
}
/// public final void java.util.concurrent.atomic.AtomicLongArray.set(int,long)
private static var set_MethodID_17: jmethodID?
open func set( i: Int, newValue: Int64 ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: newValue )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "set", methodSig: "(IJ)V", methodCache: &AtomicLongArray.set_MethodID_17, args: &__args, locals: &__locals )
}
open func set( _ _i: Int, _ _newValue: Int64 ) {
set( i: _i, newValue: _newValue )
}
/// public java.lang.String java.util.concurrent.atomic.AtomicLongArray.toString()
// Skipping method: false true false false false
/// public final long java.util.concurrent.atomic.AtomicLongArray.updateAndGet(int,java.util.function.LongUnaryOperator)
private static var updateAndGet_MethodID_18: jmethodID?
open func updateAndGet( i: Int, updateFunction: LongUnaryOperator? ) -> Int64 {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( i: jint(i) )
__args[1] = JNIType.toJava( value: updateFunction, locals: &__locals )
let __return = JNIMethod.CallLongMethod( object: javaObject, methodName: "updateAndGet", methodSig: "(ILjava/util/function/LongUnaryOperator;)J", methodCache: &AtomicLongArray.updateAndGet_MethodID_18, args: &__args, locals: &__locals )
return __return
}
open func updateAndGet( _ _i: Int, _ _updateFunction: LongUnaryOperator? ) -> Int64 {
return updateAndGet( i: _i, updateFunction: _updateFunction )
}
/// public final boolean java.util.concurrent.atomic.AtomicLongArray.weakCompareAndSet(int,long,long)
private static var weakCompareAndSet_MethodID_19: jmethodID?
open func weakCompareAndSet( i: Int, expect: Int64, update: Int64 ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 3 )
__args[0] = jvalue( i: jint(i) )
__args[1] = jvalue( j: expect )
__args[2] = jvalue( j: update )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "weakCompareAndSet", methodSig: "(IJJ)Z", methodCache: &AtomicLongArray.weakCompareAndSet_MethodID_19, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
open func weakCompareAndSet( _ _i: Int, _ _expect: Int64, _ _update: Int64 ) -> Bool {
return weakCompareAndSet( i: _i, expect: _expect, update: _update )
}
}