Kotlin Extension for the Java Annotation Processor
fun ExecutableElement.isOptional(): Boolean
fun VariableElement.isOptional(): Boolean
fun Iterable<Element>.getFields(): List<VariableElement>
fun Iterable<Element>.filterFields(fieldPredicate: (VariableElement) -> Boolean): List<VariableElement>
fun Set<Element>.getFields(): Set<VariableElement>
fun Set<Element>.filterFields(fieldPredicate: (VariableElement) -> Boolean): Set<VariableElement>
fun Iterable<Element>.getConstructors(): List<ExecutableElement>
fun Iterable<Element>.filterConstructors(constructorPredicate: (ExecutableElement) -> Boolean): List<ExecutableElement>
fun Set<Element>.getConstructors(): Set<ExecutableElement>: Set<ExecutableElement>
fun Set<Element>.filterConstructors(constructorPredicate: (ExecutableElement) -> Boolean): Set<ExecutableElement>
fun Iterable<Element>.getMethods(): List<ExecutableElement>
fun Iterable<Element>.filterMethods(methodPredicate: (ExecutableElement) -> Boolean): List<ExecutableElement>
fun Set<Element>.getMethods(): Set<ExecutableElement>
fun Set<Element>.filterMethods(methodPredicate: (ExecutableElement) -> Boolean): Set<ExecutableElement>
fun Iterable<Element>.getTypes(): List<TypeElement>
fun Iterable<Element>.filterTypes(typePredicate: (TypeElement) -> Boolean): List<TypeElement>
fun Set<Element>.getTypes(): Set<TypeElement>
fun Set<Element>.filterTypes(typePredicate: (TypeElement) -> Boolean): Set<TypeElement>
fun Iterable<Element>.getPackages(): List<PackageElement>
fun Iterable<Element>.filterPackages(packagePredicate: (PackageElement) -> Boolean): List<PackageElement>
fun Set<Element>.getPackages(): Set<PackageElement>
fun Set<Element>.filterPackages(packagePredicate: (PackageElement) -> Boolean): Set<PackageElement>
fun Messager.error(error: CharSequence, element: Element, annotationMirror: AnnotationMirror, annotationValue: AnnotationValue)
fun Messager.warning(error: CharSequence, element: Element, annotationMirror: AnnotationMirror, annotationValue: AnnotationValue)
fun Messager.note(error: CharSequence, element: Element, annotationMirror: AnnotationMirror, annotationValue: AnnotationValue)
fun Messager.other(error: CharSequence, element: Element, annotationMirror: AnnotationMirror, annotationValue: AnnotationValue)
fun Element.toPrintable()
- Configure your project to consume GitHub packages
- Generate an access token with
read packages
permission, more details here: GitHub Help - Add the maven repository to your
Project
dependencies;username
is your user ID andpassword
is the key generated previously
- Generate an access token with
allprojects {
repositories {
maven {
url = uri("https://maven.pkg.github.com/iFanie/KTAP")
credentials {
username = ...
password = ...
}
}
}
}
- Add the dependency to your
Module
dependencies {
implementation 'dev.fanie:ktap:0.0.5'
}