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

com.ybo.trackingplugin.tasks.utils.impl.patterns.producers.KotlinParamPatternProducer.kt Maven / Gradle / Ivy

Go to download

gradle plugin allowing to add automatic logs (or other process) at the start of each traced method

There is a newer version: 0.6.2
Show newest version
package com.ybo.trackingplugin.tasks.utils.impl.patterns.producers

import com.ybo.trackingplugin.tasks.data.PatternToSearch
import com.ybo.trackingplugin.tasks.utils.PatternProducer
import com.ybo.trackingplugin.tasks.utils.impl.patterns.KotlinMethodPatternName
import com.ybo.trackingplugin.tasks.utils.impl.patterns.KotlinParamHigherOrderFunctionPattern
import com.ybo.trackingplugin.tasks.utils.impl.patterns.KotlinParamPattern
import com.ybo.trackingplugin.tasks.utils.impl.patterns.KotlinParamPatternName

class KotlinParamPatternProducer(
    private val methodType: KotlinMethodPatternName,
) : PatternProducer {
    override fun produce(): List> {
        return when (methodType) {
            KotlinMethodPatternName.KotlinHigherOrderFunctionWithNoParams,
            KotlinMethodPatternName.KotlinHigherOrderFunctionWithParams,
            -> listOf(
                KotlinParamHigherOrderFunctionPattern(),
            )

            KotlinMethodPatternName.KotlinExtensionFunction,
            KotlinMethodPatternName.KotlinNormalMethod,
            -> listOf(
                KotlinParamPattern(),
            )
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy