-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathAppendable.swift
More file actions
95 lines (67 loc) · 4.42 KB
/
Appendable.swift
File metadata and controls
95 lines (67 loc) · 4.42 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
import java_swift
/// generated by: genswift.java 'java/lang|java/util|java/sql|java/awt|javax/swing' ///
/// interface java.lang.Appendable ///
public protocol Appendable: JavaProtocol {
/// public abstract java.lang.Appendable java.lang.Appendable.append(java.lang.CharSequence) throws java.io.IOException
func append( csq: CharSequence? ) throws /* java.io.IOException */ -> Appendable!
/// public abstract java.lang.Appendable java.lang.Appendable.append(java.lang.CharSequence,int,int) throws java.io.IOException
func append( csq: CharSequence?, start: Int, end: Int ) throws /* java.io.IOException */ -> Appendable!
/// public abstract java.lang.Appendable java.lang.Appendable.append(char) throws java.io.IOException
func append( c: UInt16 ) throws /* java.io.IOException */ -> Appendable!
}
open class AppendableForward: JNIObjectForward, Appendable {
private static var AppendableJNIClass: jclass?
/// public abstract java.lang.Appendable java.lang.Appendable.append(java.lang.CharSequence) throws java.io.IOException
private static var append_MethodID_4: jmethodID?
open func append( csq: CharSequence? ) throws /* java.io.IOException */ -> Appendable! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = JNIType.toJava( value: csq, locals: &__locals )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "append", methodSig: "(Ljava/lang/CharSequence;)Ljava/lang/Appendable;", methodCache: &AppendableForward.append_MethodID_4, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw /* class java.io.IOException */ UnavailableObject( javaObject: throwable )
}
return __return != nil ? AppendableForward( javaObject: __return ) : nil
}
open func append( _ _csq: CharSequence? ) throws /* java.io.IOException */ -> Appendable! {
return try append( csq: _csq )
}
/// public abstract java.lang.Appendable java.lang.Appendable.append(java.lang.CharSequence,int,int) throws java.io.IOException
private static var append_MethodID_5: jmethodID?
open func append( csq: CharSequence?, start: Int, end: Int ) throws /* java.io.IOException */ -> Appendable! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 3 )
__args[0] = JNIType.toJava( value: csq, locals: &__locals )
__args[1] = jvalue( i: jint(start) )
__args[2] = jvalue( i: jint(end) )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "append", methodSig: "(Ljava/lang/CharSequence;II)Ljava/lang/Appendable;", methodCache: &AppendableForward.append_MethodID_5, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw /* class java.io.IOException */ UnavailableObject( javaObject: throwable )
}
return __return != nil ? AppendableForward( javaObject: __return ) : nil
}
open func append( _ _csq: CharSequence?, _ _start: Int, _ _end: Int ) throws /* java.io.IOException */ -> Appendable! {
return try append( csq: _csq, start: _start, end: _end )
}
/// public abstract java.lang.Appendable java.lang.Appendable.append(char) throws java.io.IOException
private static var append_MethodID_6: jmethodID?
open func append( c: UInt16 ) throws /* java.io.IOException */ -> Appendable! {
var __locals = [jobject]()
var __args = [jvalue]( repeating: jvalue(), count: 1 )
__args[0] = jvalue( c: c )
let __return = JNIMethod.CallObjectMethod( object: javaObject, methodName: "append", methodSig: "(C)Ljava/lang/Appendable;", methodCache: &AppendableForward.append_MethodID_6, args: &__args, locals: &__locals )
defer { JNI.DeleteLocalRef( __return ) }
if let throwable = JNI.ExceptionCheck() {
defer { JNI.DeleteLocalRef( throwable ) }
throw /* class java.io.IOException */ UnavailableObject( javaObject: throwable )
}
return __return != nil ? AppendableForward( javaObject: __return ) : nil
}
open func append( _ _c: UInt16 ) throws /* java.io.IOException */ -> Appendable! {
return try append( c: _c )
}
}