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

com.hina.analytics.android.plugin.visitor.UpdateSDKPluginVersionMV.kt Maven / Gradle / Ivy

The newest version!
package com.hina.analytics.android.plugin.visitor

import com.hina.analytics.android.plugin.ClassNameAnalytics
import com.hina.analytics.android.plugin.common.VersionConstant
import org.objectweb.asm.MethodVisitor
import org.objectweb.asm.commons.AdviceAdapter

class UpdateSDKPluginVersionMV(
    api: Int,
    private val mMethodVisitor: MethodVisitor,
    access: Int,
    name: String?,
    desc: String?,
    private val mClassNameAnalytics: ClassNameAnalytics,
) : AdviceAdapter(
    api,
    mMethodVisitor, access, name, desc
) {
    override fun visitFieldInsn(opcode: Int, owner: String, fieldName: String, descriptor: String) {
        if (mClassNameAnalytics.isHinaContext && "ANDROID_PLUGIN_VERSION" == fieldName && opcode == PUTSTATIC) {
            mMethodVisitor.visitLdcInsn(VersionConstant.VERSION)
        }
        super.visitFieldInsn(opcode, owner, fieldName, descriptor)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy