-
Notifications
You must be signed in to change notification settings - Fork 13
Updating reflect.lite to the new kotlinx.metadata.jvm #19
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
Conversation
* See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/annotations.html) | ||
* for more information. | ||
*/ | ||
public interface KAnnotatedElement { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, since the end goal is to re-implement the interfaces from the reflect library, the approach is good.
Looking more closely, I don't think these interfaces are what we want. |
On the second thought, the approach of having our own copies of the interfaces can also be good. The So, maybe we should keep our own copies for now. Reverting to the ones from the standard library shouldn't be difficult if we want to later. |
import kotlinx.reflect.lite.misc.* | ||
import kotlinx.reflect.lite.name.* | ||
|
||
object JavaToKotlinClassMap { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be internal, right? What do you think about enabling the API mode now so that there's no chance that objects like this will leak to the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is definitely internal. I'll add explicitApi
check 👌🏻
|
||
val FQ_NAMES = FqNames() | ||
class FqNames { | ||
val array = FqName("kotlin.Array") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll add the note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do, it will make reviewing the PR a lot easier. I'll easily see what is just a copy-paste of code that may be boilerplate-y is just used for its facilities, and what is the actual crux of the solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more relevant than ever. I'm quite lost in the codebase now.
Added KotlinCommonMetadata for reading metadata from .kotlin_builtins file
c830d2f
to
a5276f0
Compare
- fix valueParameters for accessors - support access to private properties via the javaField
Implemented: - KProperty<*>.javaGetter - KMutableProperty<*>.javaSetter - KFunction<*>.javaMethod - KCallable<*>.isAccessible
…te and kotlin.reflect on the expected use-case from "incorrectNumberOfArguments" test
…classes: `Class<T>.kotlin` and `KClass<T>.java` API
84ba630
to
da0fd7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
No description provided.