Skip to content
Automatically scan and register classes for reflection using a provider interface
Java Kotlin
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build/tmp/jar
gradle/wrapper
src/main/java/se/davison/graal/autoreflection
.gitignore
LICENSE
README.md
build.gradle.kts
gradlew
gradlew.bat
settings.gradle

README.md

graal-auto-reflection

Automatically scan and register classes for reflection using a provider interface

##Installation

  1. Add Jitpack to repos in gradle.build.kts

    repositories {
       maven {
           url = uri("https://jitpack.io")
       }
    }
  2. Add dependency

    dependencies {
        compile("com.github.richarddd:graal-auto-reflection:-SNAPSHOT")
    }

##Usage

@Suppress("ReplaceJavaStaticMethodWithKotlinAnalog")
class ReflectionData : ReflectionProvider {
    override fun packages(classGraph: ClassGraph) =
        Arrays.asList(
            "com.mongodb.internal.connection",
            "com.mongodb.crypt.capi",
            "org.litote.kmongo.pojo",
            "kotlin.reflect"
        )
    
    override fun classNames(classGraph: ClassGraph) =
            Arrays.asList("com.example.MyClass")

    override fun classes(classGraph: ClassGraph) =
        Arrays.asList(UnixServerAddress::class.java)
}
You can’t perform that action at this time.