Skip to content

Instantly share code, notes, and snippets.

@malvinstn
Last active February 19, 2019 14:15
Show Gist options
  • Save malvinstn/c318abe09d2727162477733b2ad8f677 to your computer and use it in GitHub Desktop.
Save malvinstn/c318abe09d2727162477733b2ad8f677 to your computer and use it in GitHub Desktop.
@AutoService(Processor::class)
class AnalyticsEventProcessor : KotlinAbstractProcessor(), KotlinMetadataUtils {
companion object {
private val ANNOTATION = AnalyticsEvent::class.java
}
override fun getSupportedAnnotationTypes() = setOf(ANNOTATION.canonicalName)
override fun getSupportedSourceVersion(): SourceVersion = SourceVersion.latestSupported()
override fun process(
annotations: Set<TypeElement>,
roundEnv: RoundEnvironment
): Boolean {
// Process annotated elements here.
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment