com.airsaid.sample.plugin.visitor.annotaiton.ExpandableAnnotationHandler.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sample-plugin Show documentation
Show all versions of sample-plugin Show documentation
A Gradle Plugin to help generate android sample apk.
package com.airsaid.sample.plugin.visitor.annotaiton
import com.airsaid.sample.plugin.visitor.SampleClassVisitor
class ExpandableAnnotationHandler(private val classList: List) : AnnotationHandler() {
override fun accept(classVisitor: SampleClassVisitor, desc: String, visible: Boolean): Boolean {
if (classList.any { it == desc }) {
whenFoundClass?.invoke(classVisitor)
return true
}
return false
}
override fun visit(name: String, value: Any?) = Unit
}