Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaKit support for static fields (wrapping Java types in Swift) #39

Open
DougGregor opened this issue Oct 2, 2024 · 0 comments · May be fixed by #61
Open

JavaKit support for static fields (wrapping Java types in Swift) #39

DougGregor opened this issue Oct 2, 2024 · 0 comments · May be fixed by #61
Labels

Comments

@DougGregor
Copy link
Member

DougGregor commented Oct 2, 2024

Right now, there is no way to express a static field in JavaKit. It should probably be represented as

extension JavaClass<TheSwiftType> {
  @JavaStaticField
  var theStaticField: Int32
}

We need to both introduce this macro (like with @JavaStaticMethod) and update the JavaToSwift tool to walk static fields of classes to emit these in the JavaClass extension, like it currently does for static methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants