Skip to content

Commit d12fe75

Browse files
committed
Initial commit
0 parents  commit d12fe75

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+28857
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*/xcuserdata/*

Info.plist

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
<key>NSHumanReadableCopyright</key>
24+
<string>Copyright © 2016 John Holdsworth. All rights reserved.</string>
25+
<key>NSPrincipalClass</key>
26+
<string></string>
27+
</dict>
28+
</plist>

LICENSE

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
This representation of the Java apis is generated from the Apple distribution of the Java VM
3+
which are provided under the provisions of "Fair Use" but your use is ultimately subject
4+
to the original License Agreement.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
7+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
8+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
9+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
10+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Package.swift

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// Package.swift
3+
// SwiftJava
4+
//
5+
// Created by John Holdsworth on 20/07/2016.
6+
// Copyright (c) 2016 John Holdsworth. All rights reserved.
7+
//
8+
9+
import PackageDescription
10+
11+
let package = Package(
12+
name: "java_sql",
13+
dependencies: [
14+
.Package(url: "https://github.com/SwiftJava/java_util.git", versions: Version(1,0,0)..<Version(2,0,0)),
15+
]
16+
)

Sources/Array.swift

+275
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
2+
import java_swift
3+
import java_lang
4+
import java_util
5+
6+
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
7+
8+
/// JAVA_HOME: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home ///
9+
/// Tue Dec 20 11:30:32 GMT 2016 ///
10+
11+
/// interface java.sql.Array ///
12+
13+
public protocol Array: JavaProtocol {
14+
15+
/// public abstract java.lang.Object java.sql.Array.getArray(long,int) throws java.sql.SQLException
16+
17+
func getArray( arg0: Int64, arg1: Int ) throws /* java.sql.SQLException */ -> java_lang.JavaObject!
18+
func getArray( _ _arg0: Int64, _ _arg1: Int ) throws /* java.sql.SQLException */ -> java_lang.JavaObject!
19+
20+
/// public abstract java.lang.Object java.sql.Array.getArray(long,int,java.util.Map) throws java.sql.SQLException
21+
22+
func getArray( arg0: Int64, arg1: Int, arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject!
23+
func getArray( _ _arg0: Int64, _ _arg1: Int, _ _arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject!
24+
25+
/// public abstract java.lang.Object java.sql.Array.getArray() throws java.sql.SQLException
26+
27+
func getArray() throws /* java.sql.SQLException */ -> java_lang.JavaObject!
28+
29+
/// public abstract java.lang.Object java.sql.Array.getArray(java.util.Map) throws java.sql.SQLException
30+
31+
func getArray( arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject!
32+
func getArray( _ _arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject!
33+
34+
/// public abstract java.lang.String java.sql.Array.getBaseTypeName() throws java.sql.SQLException
35+
36+
func getBaseTypeName() throws /* java.sql.SQLException */ -> String!
37+
38+
/// public abstract int java.sql.Array.getBaseType() throws java.sql.SQLException
39+
40+
func getBaseType() throws /* java.sql.SQLException */ -> Int
41+
42+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet() throws java.sql.SQLException
43+
44+
func getResultSet() throws /* java.sql.SQLException */ -> ResultSet!
45+
46+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet(java.util.Map) throws java.sql.SQLException
47+
48+
func getResultSet( arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet!
49+
func getResultSet( _ _arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet!
50+
51+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet(long,int) throws java.sql.SQLException
52+
53+
func getResultSet( arg0: Int64, arg1: Int ) throws /* java.sql.SQLException */ -> ResultSet!
54+
func getResultSet( _ _arg0: Int64, _ _arg1: Int ) throws /* java.sql.SQLException */ -> ResultSet!
55+
56+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet(long,int,java.util.Map) throws java.sql.SQLException
57+
58+
func getResultSet( arg0: Int64, arg1: Int, arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet!
59+
func getResultSet( _ _arg0: Int64, _ _arg1: Int, _ _arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet!
60+
61+
/// public abstract void java.sql.Array.free() throws java.sql.SQLException
62+
63+
func free() throws /* java.sql.SQLException */
64+
65+
}
66+
67+
open class ArrayForward: JNIObjectForward, Array {
68+
69+
private static var ArrayJNIClass: jclass?
70+
71+
/// public abstract java.lang.Object java.sql.Array.getArray(long,int) throws java.sql.SQLException
72+
73+
private static var getArray_MethodID_12: jmethodID?
74+
75+
open func getArray( arg0: Int64, arg1: Int ) throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
76+
var __args = [jvalue]( repeating: jvalue(), count: 2 )
77+
var __locals = [jobject]()
78+
__args[0] = JNIType.encode( value: arg0, locals: &__locals )
79+
__args[1] = JNIType.encode( value: arg1, locals: &__locals )
80+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getArray", methodSig: "(JI)Ljava/lang/Object;", methodCache: &ArrayForward.getArray_MethodID_12, args: &__args, locals: &__locals )
81+
defer { JNI.DeleteLocalRef( __return ) }
82+
if let throwable = JNI.ExceptionCheck() {
83+
throw SQLException( javaObject: throwable )
84+
}
85+
return __return != nil ? java_lang.JavaObject( javaObject: __return ) : nil
86+
}
87+
88+
open func getArray( _ _arg0: Int64, _ _arg1: Int ) throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
89+
return try getArray( arg0: _arg0, arg1: _arg1 )
90+
}
91+
92+
/// public abstract java.lang.Object java.sql.Array.getArray(long,int,java.util.Map) throws java.sql.SQLException
93+
94+
private static var getArray_MethodID_13: jmethodID?
95+
96+
open func getArray( arg0: Int64, arg1: Int, arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
97+
var __args = [jvalue]( repeating: jvalue(), count: 3 )
98+
var __locals = [jobject]()
99+
__args[0] = JNIType.encode( value: arg0, locals: &__locals )
100+
__args[1] = JNIType.encode( value: arg1, locals: &__locals )
101+
__args[2] = jvalue( l: arg2?.localJavaObject( &__locals ) )
102+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getArray", methodSig: "(JILjava/util/Map;)Ljava/lang/Object;", methodCache: &ArrayForward.getArray_MethodID_13, args: &__args, locals: &__locals )
103+
defer { JNI.DeleteLocalRef( __return ) }
104+
if let throwable = JNI.ExceptionCheck() {
105+
throw SQLException( javaObject: throwable )
106+
}
107+
return __return != nil ? java_lang.JavaObject( javaObject: __return ) : nil
108+
}
109+
110+
open func getArray( _ _arg0: Int64, _ _arg1: Int, _ _arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
111+
return try getArray( arg0: _arg0, arg1: _arg1, arg2: _arg2 )
112+
}
113+
114+
/// public abstract java.lang.Object java.sql.Array.getArray() throws java.sql.SQLException
115+
116+
private static var getArray_MethodID_14: jmethodID?
117+
118+
open func getArray() throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
119+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
120+
var __locals = [jobject]()
121+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getArray", methodSig: "()Ljava/lang/Object;", methodCache: &ArrayForward.getArray_MethodID_14, args: &__args, locals: &__locals )
122+
defer { JNI.DeleteLocalRef( __return ) }
123+
if let throwable = JNI.ExceptionCheck() {
124+
throw SQLException( javaObject: throwable )
125+
}
126+
return __return != nil ? java_lang.JavaObject( javaObject: __return ) : nil
127+
}
128+
129+
130+
/// public abstract java.lang.Object java.sql.Array.getArray(java.util.Map) throws java.sql.SQLException
131+
132+
private static var getArray_MethodID_15: jmethodID?
133+
134+
open func getArray( arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
135+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
136+
var __locals = [jobject]()
137+
__args[0] = jvalue( l: arg0?.localJavaObject( &__locals ) )
138+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getArray", methodSig: "(Ljava/util/Map;)Ljava/lang/Object;", methodCache: &ArrayForward.getArray_MethodID_15, args: &__args, locals: &__locals )
139+
defer { JNI.DeleteLocalRef( __return ) }
140+
if let throwable = JNI.ExceptionCheck() {
141+
throw SQLException( javaObject: throwable )
142+
}
143+
return __return != nil ? java_lang.JavaObject( javaObject: __return ) : nil
144+
}
145+
146+
open func getArray( _ _arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> java_lang.JavaObject! {
147+
return try getArray( arg0: _arg0 )
148+
}
149+
150+
/// public abstract java.lang.String java.sql.Array.getBaseTypeName() throws java.sql.SQLException
151+
152+
private static var getBaseTypeName_MethodID_16: jmethodID?
153+
154+
open func getBaseTypeName() throws /* java.sql.SQLException */ -> String! {
155+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
156+
var __locals = [jobject]()
157+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getBaseTypeName", methodSig: "()Ljava/lang/String;", methodCache: &ArrayForward.getBaseTypeName_MethodID_16, args: &__args, locals: &__locals )
158+
if let throwable = JNI.ExceptionCheck() {
159+
throw SQLException( javaObject: throwable )
160+
}
161+
return JNIType.decode( type: String(), from: __return )
162+
}
163+
164+
165+
/// public abstract int java.sql.Array.getBaseType() throws java.sql.SQLException
166+
167+
private static var getBaseType_MethodID_17: jmethodID?
168+
169+
open func getBaseType() throws /* java.sql.SQLException */ -> Int {
170+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
171+
var __locals = [jobject]()
172+
let __return = JNIMethod.CallIntMethod( object: javaObject, methodName: "getBaseType", methodSig: "()I", methodCache: &ArrayForward.getBaseType_MethodID_17, args: &__args, locals: &__locals )
173+
if let throwable = JNI.ExceptionCheck() {
174+
throw SQLException( javaObject: throwable )
175+
}
176+
return JNIType.decode( type: Int(), from: __return )
177+
}
178+
179+
180+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet() throws java.sql.SQLException
181+
182+
private static var getResultSet_MethodID_18: jmethodID?
183+
184+
open func getResultSet() throws /* java.sql.SQLException */ -> ResultSet! {
185+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
186+
var __locals = [jobject]()
187+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getResultSet", methodSig: "()Ljava/sql/ResultSet;", methodCache: &ArrayForward.getResultSet_MethodID_18, args: &__args, locals: &__locals )
188+
defer { JNI.DeleteLocalRef( __return ) }
189+
if let throwable = JNI.ExceptionCheck() {
190+
throw SQLException( javaObject: throwable )
191+
}
192+
return __return != nil ? ResultSetForward( javaObject: __return ) : nil
193+
}
194+
195+
196+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet(java.util.Map) throws java.sql.SQLException
197+
198+
private static var getResultSet_MethodID_19: jmethodID?
199+
200+
open func getResultSet( arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet! {
201+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
202+
var __locals = [jobject]()
203+
__args[0] = jvalue( l: arg0?.localJavaObject( &__locals ) )
204+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getResultSet", methodSig: "(Ljava/util/Map;)Ljava/sql/ResultSet;", methodCache: &ArrayForward.getResultSet_MethodID_19, args: &__args, locals: &__locals )
205+
defer { JNI.DeleteLocalRef( __return ) }
206+
if let throwable = JNI.ExceptionCheck() {
207+
throw SQLException( javaObject: throwable )
208+
}
209+
return __return != nil ? ResultSetForward( javaObject: __return ) : nil
210+
}
211+
212+
open func getResultSet( _ _arg0: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet! {
213+
return try getResultSet( arg0: _arg0 )
214+
}
215+
216+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet(long,int) throws java.sql.SQLException
217+
218+
private static var getResultSet_MethodID_20: jmethodID?
219+
220+
open func getResultSet( arg0: Int64, arg1: Int ) throws /* java.sql.SQLException */ -> ResultSet! {
221+
var __args = [jvalue]( repeating: jvalue(), count: 2 )
222+
var __locals = [jobject]()
223+
__args[0] = JNIType.encode( value: arg0, locals: &__locals )
224+
__args[1] = JNIType.encode( value: arg1, locals: &__locals )
225+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getResultSet", methodSig: "(JI)Ljava/sql/ResultSet;", methodCache: &ArrayForward.getResultSet_MethodID_20, args: &__args, locals: &__locals )
226+
defer { JNI.DeleteLocalRef( __return ) }
227+
if let throwable = JNI.ExceptionCheck() {
228+
throw SQLException( javaObject: throwable )
229+
}
230+
return __return != nil ? ResultSetForward( javaObject: __return ) : nil
231+
}
232+
233+
open func getResultSet( _ _arg0: Int64, _ _arg1: Int ) throws /* java.sql.SQLException */ -> ResultSet! {
234+
return try getResultSet( arg0: _arg0, arg1: _arg1 )
235+
}
236+
237+
/// public abstract java.sql.ResultSet java.sql.Array.getResultSet(long,int,java.util.Map) throws java.sql.SQLException
238+
239+
private static var getResultSet_MethodID_21: jmethodID?
240+
241+
open func getResultSet( arg0: Int64, arg1: Int, arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet! {
242+
var __args = [jvalue]( repeating: jvalue(), count: 3 )
243+
var __locals = [jobject]()
244+
__args[0] = JNIType.encode( value: arg0, locals: &__locals )
245+
__args[1] = JNIType.encode( value: arg1, locals: &__locals )
246+
__args[2] = jvalue( l: arg2?.localJavaObject( &__locals ) )
247+
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "getResultSet", methodSig: "(JILjava/util/Map;)Ljava/sql/ResultSet;", methodCache: &ArrayForward.getResultSet_MethodID_21, args: &__args, locals: &__locals )
248+
defer { JNI.DeleteLocalRef( __return ) }
249+
if let throwable = JNI.ExceptionCheck() {
250+
throw SQLException( javaObject: throwable )
251+
}
252+
return __return != nil ? ResultSetForward( javaObject: __return ) : nil
253+
}
254+
255+
open func getResultSet( _ _arg0: Int64, _ _arg1: Int, _ _arg2: java_util.Map? ) throws /* java.sql.SQLException */ -> ResultSet! {
256+
return try getResultSet( arg0: _arg0, arg1: _arg1, arg2: _arg2 )
257+
}
258+
259+
/// public abstract void java.sql.Array.free() throws java.sql.SQLException
260+
261+
private static var free_MethodID_22: jmethodID?
262+
263+
open func free() throws /* java.sql.SQLException */ {
264+
var __args = [jvalue]( repeating: jvalue(), count: 1 )
265+
var __locals = [jobject]()
266+
JNIMethod.CallVoidMethod( object: javaObject, methodName: "free", methodSig: "()V", methodCache: &ArrayForward.free_MethodID_22, args: &__args, locals: &__locals )
267+
if let throwable = JNI.ExceptionCheck() {
268+
throw SQLException( javaObject: throwable )
269+
}
270+
}
271+
272+
273+
}
274+
275+

0 commit comments

Comments
 (0)