All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mattshoe.shoebox.kernl.annotations.Annotations.kt Maven / Gradle / Ivy

Go to download

Kernl: A Kotlin Symbol Processing (KSP) library for automatic repository generation.

There is a newer version: 0.0.1-beta6
Show newest version
package org.mattshoe.shoebox.kernl.annotations

import org.mattshoe.shoebox.kernl.DefaultKernlPolicy
import org.mattshoe.shoebox.kernl.KernlPolicy
import kotlin.reflect.KClass


@Target(AnnotationTarget.ANNOTATION_CLASS)
@Retention(AnnotationRetention.SOURCE)
annotation class Kernl {

    @Target(AnnotationTarget.FUNCTION)
    @Retention(AnnotationRetention.SOURCE)
    annotation class NoCache(
        val name: String
    )

    @Target(AnnotationTarget.ANNOTATION_CLASS)
    @Retention(AnnotationRetention.SOURCE)
    annotation class SingleCache {
        @Target(AnnotationTarget.FUNCTION)
        @Retention(AnnotationRetention.SOURCE)
        annotation class InMemory(
            val name: String,
            val policy: KClass = DefaultKernlPolicy::class
        )

        @Target(AnnotationTarget.FUNCTION)
        @Retention(AnnotationRetention.SOURCE)
        annotation class Disk(
            val name: String,
            val policy: KClass = DefaultKernlPolicy::class
        )

    }

    @Target(AnnotationTarget.ANNOTATION_CLASS)
    @Retention(AnnotationRetention.SOURCE)
    annotation class AssociativeCache {
        @Target(AnnotationTarget.FUNCTION)
        @Retention(AnnotationRetention.SOURCE)
        annotation class InMemory(
            val name: String,
            val policy: KClass = DefaultKernlPolicy::class
        )

        @Target(AnnotationTarget.FUNCTION)
        @Retention(AnnotationRetention.SOURCE)
        annotation class Disk(
            val name: String,
            val policy: KClass = DefaultKernlPolicy::class
        )

    }
}








© 2015 - 2024 Weber Informatics LLC | Privacy Policy