Skip to content

Commit 653ffdb

Browse files
committed
Update docs and usage
1 parent 7d112b8 commit 653ffdb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Sources/JavaKit/Macros.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,9 @@ public macro JavaField(_ javaFieldName: String? = nil) = #externalMacro(module:
9999
/// The macro must be used within a specific JavaClass instance.
100100
///
101101
/// ```swift
102-
/// @JavaClass("org.swift.example.HelloSwift")
103-
/// struct HelloSwift {
104-
/// @JavaField
105-
/// var counter: Int32
102+
/// extension JavaClass<HelloSwift> {
103+
/// @JavaStaticField
104+
/// var initialValue: Double
106105
/// }
107106
/// ```
108107
@attached(accessor)

Sources/JavaKitExample/JavaKitExample.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ struct HelloSwift {
103103
}
104104

105105
extension JavaClass<HelloSwift> {
106-
@JavaField
106+
@JavaStaticField
107107
var initialValue: Double
108108
}
109109

110110
@JavaClass("com.example.swift.HelloSubclass", extends: HelloSwift.self)
111111
struct HelloSubclass {
112-
@JavaStaticField
112+
@JavaField
113113
var greeting: String
114114

115115
@JavaMethod

0 commit comments

Comments
 (0)