Skip to content

Instantly share code, notes, and snippets.

@Morfly
Last active July 15, 2021 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Morfly/d43e49efe4cda4515b603cfe5643b0de to your computer and use it in GitHub Desktop.
Save Morfly/d43e49efe4cda4515b603cfe5643b0de to your computer and use it in GitHub Desktop.
KSP function processor, process function
class FunctionProcessor(...) : SymbolProcessor {
override fun process(resolver: Resolver): List<KSAnnotated> {
val symbols = resolver
.getSymbolsWithAnnotation("com.morfly.Function")
.filterIsInstance<KSClassDeclaration>()
if (!symbols.iterator().hasNext()) return emptyList()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment