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

com.ybo.trackingplugin.tasks.utils.impl.patterns.KotlinMethodHigherOrderFunctionPattern.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

import com.ybo.trackingplugin.tasks.data.TraceAnnotationMark

internal open class KotlinMethodHigherOrderFunctionPattern(
    override val markToLookFor: TraceAnnotationMark,
) : KotlinMethodPattern(markToLookFor) {

    override val name = KotlinMethodPatternName.KotlinHigherOrderFunctionWithParams
    override val paramsWithCapture: String = "([\\w\\s:\\.,\\(\\)]*)"
    open val arrow = "->"
    override fun regex(): Regex {
        return Regex(
            ".*(\\w*).*" +
                "$fillerAnnotations*\\s*" +
                "(${getTraceAnnotation()})\\s*" +
                "$fillerAnnotations*\\s*" +
                "\\{" +
                paramsWithCapture +
                "$arrow[\\t ]*\\n" +
                "($insideIndentation)",
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy