com.hina.analytics.android.plugin.visitor.UpdateSDKPluginVersionMV.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of auto-plugin Show documentation
Show all versions of auto-plugin Show documentation
The official Android SDK Plugin for Hina Data Track.
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