A modernizing Java Reflection with Kotlin.
English | 简体中文
| HighCapable |
|---|
This project belongs to the organization above. Click the link to follow us and discover more awesome projects.
This is a modern Java reflection API implemented using Kotlin, designed to provide a cleaner and easier-to-use API while retaining the power of Java reflection.
The project icon is designed by MaiTungTM and is named from KotlinJavaReflection, meaning Java reflection implemented using Kotlin.
It was firstborn in the YukiHookAPI, and was later decoupled into the YukiReflection project.
As you can see, KavaRef is an entirely new API set refactored around the design principles of YukiReflection. It carries no affiliation and has
officially replaced YukiReflection as the new reflection solution.
Target Java code
public class World {
private void sayHello(String content) {
System.out.println("Hello " + content + "!");
}
}Calling with
KavaRef
val myWorld = World()
World::class.resolve().firstMethod {
name = "sayHello"
parameters(String::class)
}.of(myWorld).invoke("KavaRef")| KavaRef Documentation |
|---|
You can go to the documentation page for more detailed tutorials and content.
- Add dependencies: Add
kavaref-coreand the corresponding platform modules to your project. - Sync the project: After a Gradle sync, you can start using
KavaRef.
In the opened page, select the Quick Start section in the sidebar to continue reading.
Apache License Version 2.0
Copyright (C) 2019 HighCapable
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright © 2019 HighCapable