-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTime.swift
More file actions
181 lines (125 loc) · 6.92 KB
/
Time.swift
File metadata and controls
181 lines (125 loc) · 6.92 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
import java_swift
import java_util
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// class java.sql.Time ///
open class Time: java_util.Date {
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 TimeJNIClass: jclass?
/// static final long java.sql.Time.serialVersionUID
/// private static final sun.util.calendar.BaseCalendar java.util.Date.gcal
/// private static sun.util.calendar.BaseCalendar java.util.Date.jcal
/// private transient long java.util.Date.fastTime
/// private transient sun.util.calendar.BaseCalendar$Date java.util.Date.cdate
/// private static int java.util.Date.defaultCenturyStart
/// private static final long java.util.Date.serialVersionUID
/// private static final java.lang.String[] java.util.Date.wtb
/// private static final int[] java.util.Date.ttb
/// public java.sql.Time(int,int,int)
private static var new_MethodID_1: jmethodID?
public convenience init( hour: Int, minute: Int, second: Int ) {
var __args = [jvalue]( repeating: jvalue(), count: 3 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: hour, locals: &__locals )
__args[1] = JNIType.toJava( value: minute, locals: &__locals )
__args[2] = JNIType.toJava( value: second, locals: &__locals )
let __object = JNIMethod.NewObject( className: "java/sql/Time", classCache: &Time.TimeJNIClass, methodSig: "(III)V", methodCache: &Time.new_MethodID_1, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _hour: Int, _ _minute: Int, _ _second: Int ) {
self.init( hour: _hour, minute: _minute, second: _second )
}
/// public java.sql.Time(long)
private static var new_MethodID_2: jmethodID?
public convenience init( time: Int64 ) {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: time, locals: &__locals )
let __object = JNIMethod.NewObject( className: "java/sql/Time", classCache: &Time.TimeJNIClass, methodSig: "(J)V", methodCache: &Time.new_MethodID_2, args: &__args, locals: &__locals )
self.init( javaObject: __object )
JNI.DeleteLocalRef( __object )
}
public convenience init( _ _time: Int64 ) {
self.init( time: _time )
}
/// public java.lang.String java.sql.Time.toString()
/// public static java.sql.Time java.sql.Time.valueOf(java.lang.String)
private static var valueOf_MethodID_3: jmethodID?
open class func valueOf( s: String? ) -> Time! {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: s, locals: &__locals )
let __return = JNIMethod.CallStaticObjectMethod( className: "java/sql/Time", classCache: &TimeJNIClass, methodName: "valueOf", methodSig: "(Ljava/lang/String;)Ljava/sql/Time;", methodCache: &valueOf_MethodID_3, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? Time( javaObject: __return ) : nil
}
open class func valueOf( _ _s: String? ) -> Time! {
return valueOf( s: _s )
}
/// public static java.sql.Time java.sql.Time.valueOf(java.time.LocalTime)
private static var valueOf_MethodID_4: jmethodID?
open class func valueOf( time: /* java.time.LocalTime */ UnclassedObject? ) -> Time! {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: time, locals: &__locals )
let __return = JNIMethod.CallStaticObjectMethod( className: "java/sql/Time", classCache: &TimeJNIClass, methodName: "valueOf", methodSig: "(Ljava/time/LocalTime;)Ljava/sql/Time;", methodCache: &valueOf_MethodID_4, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? Time( javaObject: __return ) : nil
}
open class func valueOf( _ _time: /* java.time.LocalTime */ UnclassedObject? ) -> Time! {
return valueOf( time: _time )
}
/// public void java.sql.Time.setDate(int)
private static var setDate_MethodID_5: jmethodID?
open func setDate( i: Int ) {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: i, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "setDate", methodSig: "(I)V", methodCache: &Time.setDate_MethodID_5, args: &__args, locals: &__locals )
}
override open func setDate( _ _i: Int ) {
setDate( i: _i )
}
/// public java.time.Instant java.sql.Time.toInstant()
/// public int java.sql.Time.getYear()
/// public int java.sql.Time.getMonth()
/// public void java.sql.Time.setYear(int)
private static var setYear_MethodID_6: jmethodID?
open func setYear( i: Int ) {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: i, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "setYear", methodSig: "(I)V", methodCache: &Time.setYear_MethodID_6, args: &__args, locals: &__locals )
}
override open func setYear( _ _i: Int ) {
setYear( i: _i )
}
/// public void java.sql.Time.setMonth(int)
private static var setMonth_MethodID_7: jmethodID?
open func setMonth( i: Int ) {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
__args[0] = JNIType.toJava( value: i, locals: &__locals )
JNIMethod.CallVoidMethod( object: javaObject, methodName: "setMonth", methodSig: "(I)V", methodCache: &Time.setMonth_MethodID_7, args: &__args, locals: &__locals )
}
override open func setMonth( _ _i: Int ) {
setMonth( i: _i )
}
/// public int java.sql.Time.getDay()
/// public void java.sql.Time.setTime(long)
/// public int java.sql.Time.getDate()
/// public java.time.LocalTime java.sql.Time.toLocalTime()
private static var toLocalTime_MethodID_8: jmethodID?
open func toLocalTime() -> /* java.time.LocalTime */ UnclassedObject! {
var __args = [jvalue]( repeating: jvalue(), count: 1 )
var __locals = [jobject]()
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "toLocalTime", methodSig: "()Ljava/time/LocalTime;", methodCache: &Time.toLocalTime_MethodID_8, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
return __return != nil ? /* java.time.LocalTime */ UnclassedObject( javaObject: __return ) : nil
}
}