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

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

import com.ybo.trackingplugin.tasks.data.TraceAnnotationMark
import com.ybo.trackingplugin.tasks.utils.CodeGenerator
import com.ybo.trackingplugin.toB64

class _CodeGeneratorJava : CodeGenerator() {
    override fun generate(
        params: String,
        tracerFactoryString: String,
        insideMethodIndentation: String,
        methodName: String,
        tag: String,
        alterationOffset: Int,
        mark: TraceAnnotationMark,
    ): String {
        return "/*$tag*/ $tracePerformerPackage.INSTANCE.trace(" +
            "new " + tracerFactoryString + "(), " +
            "\"" + methodName.toB64() + "\", " +
            "true, " +
            "\"" + mark.longVersion.toB64() + "\"," +
            "new Object[]{" + params + "}, " +
            alterationOffset +
            ");\n" +
            insideMethodIndentation
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy