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

Kotlin-as-Java fixes for external invocation #2377

Closed
wants to merge 8 commits into from

Conversation

Kordyjan
Copy link
Contributor

This PR brings few improvements to Kotlin-as-Java, especially in cases when it is not used as a transformer:

  • java accessors retains information about the original property
  • companion objects are transformed to java classes (this change is irrelevant to the normal execution of dokka, as the companion property of DClass was ignored when the KaJ plugin was enabled)
  • generation of java accessors was unified for classes and objects
  • lateinit properties are retaining their fields

This is a follow-up PR to the #2353

BarkingBad and others added 8 commits February 22, 2022 09:53
This PR brings few improvements to Kotlin-as-Java, especially in cases when it
is not used as a transformer:

- java accessors retains information about original property
- companion objects are transformed to java classes (this change is
  irrelevant to normal execution of dokka, as `companion` property of
  `DClass` was ignored when KaJ plugin was enabled)
- generation of java accessors was unified for classes and objects
- lateinit properties are retainings their fields
Comment on lines +8 to +11
class OriginalProperty(val original: DProperty) : ExtraProperty<DFunction> {
override val key = OriginalProperty
companion object: ExtraProperty.Key<DFunction, OriginalProperty>
}
Copy link
Member

@IgnatBeresnev IgnatBeresnev Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't find any actual usages of this - is it something you'll need in the future or use in your plugins?

Also, Out of context, a bit unclear what Original is exactly. Original in relation to what?

After seeing where it's created, it starts to make sense, but maybe it's worth adding a simple KDoc like original property from which a function was created, before any merging or modificatoin took place to save some brain fuel

@IgnatBeresnev
Copy link
Member

Closing as stale, will revive if need arises

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

Successfully merging this pull request may close these issues.

3 participants