-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAtomicBoolean.swift
More file actions
153 lines (108 loc) · 6.55 KB
/
AtomicBoolean.swift
File metadata and controls
153 lines (108 loc) · 6.55 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
import java_swift
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// class java.util.concurrent.atomic.AtomicBoolean ///
open class AtomicBoolean: 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 AtomicBooleanJNIClass: jclass?
/// private static final long java.util.concurrent.atomic.AtomicBoolean.serialVersionUID
/// private static final sun.misc.Unsafe java.util.concurrent.atomic.AtomicBoolean.unsafe
/// private static final long java.util.concurrent.atomic.AtomicBoolean.valueOffset
/// private volatile int java.util.concurrent.atomic.AtomicBoolean.value
/// public java.util.concurrent.atomic.AtomicBoolean()
private static var new_MethodID_1: jmethodID?
public convenience init() {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __object = JNIMethod.NewObject( className: "java/util/concurrent/atomic/AtomicBoolean", classCache: &AtomicBoolean.AtomicBooleanJNIClass, methodSig: "()V", methodCache: &AtomicBoolean.new_MethodID_1, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
/// public java.util.concurrent.atomic.AtomicBoolean(boolean)
private static var new_MethodID_2: jmethodID?
public convenience init( initialValue: Bool ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( z: jboolean(initialValue ? JNI_TRUE : JNI_FALSE) )
let __object = JNIMethod.NewObject( className: "java/util/concurrent/atomic/AtomicBoolean", classCache: &AtomicBoolean.AtomicBooleanJNIClass, methodSig: "(Z)V", methodCache: &AtomicBoolean.new_MethodID_2, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _initialValue: Bool ) {
self.init( initialValue: _initialValue )
}
/// public final boolean java.util.concurrent.atomic.AtomicBoolean.compareAndSet(boolean,boolean)
private static var compareAndSet_MethodID_3: jmethodID?
open func compareAndSet( expect: Bool, update: Bool ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( z: jboolean(expect ? JNI_TRUE : JNI_FALSE) )
__args[1] = jvalue( z: jboolean(update ? JNI_TRUE : JNI_FALSE) )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "compareAndSet", methodSig: "(ZZ)Z", methodCache: &AtomicBoolean.compareAndSet_MethodID_3, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
open func compareAndSet( _ _expect: Bool, _ _update: Bool ) -> Bool {
return compareAndSet( expect: _expect, update: _update )
}
/// public final boolean java.util.concurrent.atomic.AtomicBoolean.get()
private static var get_MethodID_4: jmethodID?
open func get() -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "get", methodSig: "()Z", methodCache: &AtomicBoolean.get_MethodID_4, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
/// public final boolean java.util.concurrent.atomic.AtomicBoolean.getAndSet(boolean)
private static var getAndSet_MethodID_5: jmethodID?
open func getAndSet( newValue: Bool ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( z: jboolean(newValue ? JNI_TRUE : JNI_FALSE) )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "getAndSet", methodSig: "(Z)Z", methodCache: &AtomicBoolean.getAndSet_MethodID_5, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
open func getAndSet( _ _newValue: Bool ) -> Bool {
return getAndSet( newValue: _newValue )
}
/// public final void java.util.concurrent.atomic.AtomicBoolean.lazySet(boolean)
private static var lazySet_MethodID_6: jmethodID?
open func lazySet( newValue: Bool ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( z: jboolean(newValue ? JNI_TRUE : JNI_FALSE) )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "lazySet", methodSig: "(Z)V", methodCache: &AtomicBoolean.lazySet_MethodID_6, args: &__args, locals: &__locals )
}
open func lazySet( _ _newValue: Bool ) {
lazySet( newValue: _newValue )
}
/// public final void java.util.concurrent.atomic.AtomicBoolean.set(boolean)
private static var set_MethodID_7: jmethodID?
open func set( newValue: Bool ) {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( z: jboolean(newValue ? JNI_TRUE : JNI_FALSE) )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "set", methodSig: "(Z)V", methodCache: &AtomicBoolean.set_MethodID_7, args: &__args, locals: &__locals )
}
open func set( _ _newValue: Bool ) {
set( newValue: _newValue )
}
/// public java.lang.String java.util.concurrent.atomic.AtomicBoolean.toString()
// Skipping method: false true false false false
/// public boolean java.util.concurrent.atomic.AtomicBoolean.weakCompareAndSet(boolean,boolean)
private static var weakCompareAndSet_MethodID_8: jmethodID?
open func weakCompareAndSet( expect: Bool, update: Bool ) -> Bool {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 2 )
__args[0] = jvalue( z: jboolean(expect ? JNI_TRUE : JNI_FALSE) )
__args[1] = jvalue( z: jboolean(update ? JNI_TRUE : JNI_FALSE) )
let __return = JNIMethod.CallBooleanMethod( object: javaObject, methodName: "weakCompareAndSet", methodSig: "(ZZ)Z", methodCache: &AtomicBoolean.weakCompareAndSet_MethodID_8, args: &__args, locals: &__locals )
return __return != jboolean(JNI_FALSE)
}
open func weakCompareAndSet( _ _expect: Bool, _ _update: Bool ) -> Bool {
return weakCompareAndSet( expect: _expect, update: _update )
}
}