Skip to content

Commit 9550fa9

Browse files
committed
Updated java.net.* generated code
1 parent ed616dc commit 9550fa9

Some content is hidden

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

54 files changed

+1913
-94
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import AndroidJavaLang
3+
import JavaKit
4+
import JavaRuntime
5+
6+
extension Authenticator {
7+
@JavaClass("java.net.Authenticator$RequestorType")
8+
open class RequestorType: Enum {
9+
public enum RequestorTypeCases: Equatable {
10+
case PROXY
11+
case SERVER
12+
}
13+
14+
public var enumValue: RequestorTypeCases! {
15+
let classObj = self.javaClass
16+
if self.equals(classObj.PROXY?.as(JavaObject.self)) {
17+
return RequestorTypeCases.PROXY
18+
} else if self.equals(classObj.SERVER?.as(JavaObject.self)) {
19+
return RequestorTypeCases.SERVER
20+
} else {
21+
return nil
22+
}
23+
}
24+
25+
public convenience init(_ enumValue: RequestorTypeCases, environment: JNIEnvironment? = nil) {
26+
let _environment = if let environment {
27+
environment
28+
} else {
29+
try! JavaVirtualMachine.shared().environment()
30+
}
31+
let classObj = try! JavaClass<RequestorType>(environment: _environment)
32+
switch enumValue {
33+
case .PROXY:
34+
if let PROXY = classObj.PROXY {
35+
self.init(javaHolder: PROXY.javaHolder)
36+
} else {
37+
fatalError("Enum value PROXY was unexpectedly nil, please re-run Java2Swift on the most updated Java class")
38+
}
39+
case .SERVER:
40+
if let SERVER = classObj.SERVER {
41+
self.init(javaHolder: SERVER.javaHolder)
42+
} else {
43+
fatalError("Enum value SERVER was unexpectedly nil, please re-run Java2Swift on the most updated Java class")
44+
}
45+
}
46+
}
47+
}
48+
}
49+
extension JavaClass<Authenticator.RequestorType> {
50+
@JavaStaticField(isFinal: true)
51+
public var PROXY: Authenticator.RequestorType!
52+
53+
@JavaStaticField(isFinal: true)
54+
public var SERVER: Authenticator.RequestorType!
55+
56+
@JavaStaticMethod
57+
public func values() -> [Authenticator.RequestorType?]
58+
59+
@JavaStaticMethod
60+
public func valueOf(_ arg0: String) -> Authenticator.RequestorType!
61+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import JavaKit
3+
import JavaKitNetwork
4+
import JavaRuntime
5+
6+
@JavaClass("java.net.Authenticator")
7+
open class Authenticator: JavaObject {
8+
@JavaMethod
9+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
10+
11+
@JavaMethod
12+
open func getPasswordAuthentication() -> PasswordAuthentication!
13+
14+
@JavaMethod
15+
open func requestPasswordAuthenticationInstance(_ arg0: String, _ arg1: InetAddress?, _ arg2: Int32, _ arg3: String, _ arg4: String, _ arg5: String, _ arg6: URL?, _ arg7: Authenticator.RequestorType?) -> PasswordAuthentication!
16+
17+
@JavaMethod
18+
open func getRequestingHost() -> String
19+
20+
@JavaMethod
21+
open func getRequestingSite() -> InetAddress!
22+
23+
@JavaMethod
24+
open func getRequestingPort() -> Int32
25+
26+
@JavaMethod
27+
open func getRequestingProtocol() -> String
28+
29+
@JavaMethod
30+
open func getRequestingPrompt() -> String
31+
32+
@JavaMethod
33+
open func getRequestingScheme() -> String
34+
35+
@JavaMethod
36+
open func getRequestingURL() -> URL!
37+
38+
@JavaMethod
39+
open func getRequestorType() -> Authenticator.RequestorType!
40+
}
41+
extension JavaClass<Authenticator> {
42+
@JavaStaticMethod
43+
public func requestPasswordAuthentication(_ arg0: InetAddress?, _ arg1: Int32, _ arg2: String, _ arg3: String, _ arg4: String) -> PasswordAuthentication!
44+
45+
@JavaStaticMethod
46+
public func requestPasswordAuthentication(_ arg0: String, _ arg1: InetAddress?, _ arg2: Int32, _ arg3: String, _ arg4: String, _ arg5: String) -> PasswordAuthentication!
47+
48+
@JavaStaticMethod
49+
public func requestPasswordAuthentication(_ arg0: Authenticator?, _ arg1: String, _ arg2: InetAddress?, _ arg3: Int32, _ arg4: String, _ arg5: String, _ arg6: String, _ arg7: URL?, _ arg8: Authenticator.RequestorType?) -> PasswordAuthentication!
50+
51+
@JavaStaticMethod
52+
public func requestPasswordAuthentication(_ arg0: String, _ arg1: InetAddress?, _ arg2: Int32, _ arg3: String, _ arg4: String, _ arg5: String, _ arg6: URL?, _ arg7: Authenticator.RequestorType?) -> PasswordAuthentication!
53+
54+
@JavaStaticMethod
55+
public func getDefault() -> Authenticator!
56+
57+
@JavaStaticMethod
58+
public func setDefault(_ arg0: Authenticator?)
59+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import JavaKit
3+
import JavaRuntime
4+
5+
@JavaClass("java.net.BindException")
6+
open class BindException: SocketException {
7+
@JavaMethod
8+
@_nonoverride public convenience init(_ arg0: String, environment: JNIEnvironment? = nil)
9+
10+
@JavaMethod
11+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import AndroidJavaIO
3+
import JavaKit
4+
import JavaRuntime
5+
6+
@JavaClass("java.net.CacheRequest")
7+
open class CacheRequest: JavaObject {
8+
@JavaMethod
9+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
10+
11+
@JavaMethod
12+
open func getBody() throws -> OutputStream!
13+
14+
@JavaMethod
15+
open func abort()
16+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import AndroidJavaIO
3+
import AndroidJavaUtil
4+
import JavaKit
5+
import JavaKitCollection
6+
import JavaRuntime
7+
8+
@JavaClass("java.net.CacheResponse")
9+
open class CacheResponse: JavaObject {
10+
@JavaMethod
11+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
12+
13+
@JavaMethod
14+
open func getHeaders() throws -> Map<JavaString, List<JavaString>>!
15+
16+
@JavaMethod
17+
open func getBody() throws -> InputStream!
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import JavaKit
3+
import JavaRuntime
4+
5+
@JavaClass("java.net.ContentHandler")
6+
open class ContentHandler: JavaObject {
7+
@JavaMethod
8+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
9+
10+
@JavaMethod
11+
open func getContent(_ arg0: URLConnection?) throws -> JavaObject!
12+
13+
@JavaMethod
14+
open func getContent(_ arg0: URLConnection?, _ arg1: [JavaClass?]) throws -> JavaObject!
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import JavaKit
3+
import JavaRuntime
4+
5+
@JavaInterface("java.net.ContentHandlerFactory")
6+
public struct ContentHandlerFactory {
7+
@JavaMethod
8+
public func createContentHandler(_ arg0: String) -> ContentHandler!
9+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import AndroidJavaUtil
3+
import JavaKit
4+
import JavaKitCollection
5+
import JavaKitNetwork
6+
import JavaRuntime
7+
8+
@JavaClass("java.net.CookieHandler")
9+
open class CookieHandler: JavaObject {
10+
@JavaMethod
11+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
12+
13+
@JavaMethod
14+
open func get(_ arg0: URI?, _ arg1: Map<JavaString, List<JavaString>>?) throws -> Map<JavaString, List<JavaString>>!
15+
16+
@JavaMethod
17+
open func put(_ arg0: URI?, _ arg1: Map<JavaString, List<JavaString>>?) throws
18+
}
19+
extension JavaClass<CookieHandler> {
20+
@JavaStaticMethod
21+
public func getDefault() -> CookieHandler!
22+
23+
@JavaStaticMethod
24+
public func setDefault(_ arg0: CookieHandler?)
25+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import AndroidJavaUtil
3+
import JavaKit
4+
import JavaKitCollection
5+
import JavaKitNetwork
6+
import JavaRuntime
7+
8+
@JavaClass("java.net.CookieManager")
9+
open class CookieManager: CookieHandler {
10+
@JavaMethod
11+
@_nonoverride public convenience init(_ arg0: CookieStore?, _ arg1: CookiePolicy?, environment: JNIEnvironment? = nil)
12+
13+
@JavaMethod
14+
@_nonoverride public convenience init(environment: JNIEnvironment? = nil)
15+
16+
@JavaMethod
17+
open func setCookiePolicy(_ arg0: CookiePolicy?)
18+
19+
@JavaMethod
20+
open func getCookieStore() -> CookieStore!
21+
22+
@JavaMethod
23+
open override func get(_ arg0: URI?, _ arg1: Map<JavaString, List<JavaString>>?) throws -> Map<JavaString, List<JavaString>>!
24+
25+
@JavaMethod
26+
open override func put(_ arg0: URI?, _ arg1: Map<JavaString, List<JavaString>>?) throws
27+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Auto-generated by Java-to-Swift wrapper generator.
2+
import JavaKit
3+
import JavaKitNetwork
4+
import JavaRuntime
5+
6+
@JavaInterface("java.net.CookiePolicy")
7+
public struct CookiePolicy {
8+
@JavaMethod
9+
public func shouldAccept(_ arg0: URI?, _ arg1: HttpCookie?) -> Bool
10+
}
11+
extension JavaClass<CookiePolicy> {
12+
@JavaStaticField(isFinal: true)
13+
public var ACCEPT_ALL: CookiePolicy!
14+
15+
@JavaStaticField(isFinal: true)
16+
public var ACCEPT_NONE: CookiePolicy!
17+
18+
@JavaStaticField(isFinal: true)
19+
public var ACCEPT_ORIGINAL_SERVER: CookiePolicy!
20+
}

0 commit comments

Comments
 (0)