Created
December 18, 2020 07:32
-
-
Save andretietz/107a46dd01dcfe7e5d852b6e836fc70c to your computer and use it in GitHub Desktop.
Sample for multiple files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target(FUNCTION, PROPERTY_GETTER, PROPERTY_SETTER) | |
@Retention(RUNTIME) | |
annotation class SomeAnnotation( | |
val value: String | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeCustomAdapterFactory( | |
private val registration: MutableMap<Int, String> = mutableMapOf() | |
) : CallAdapter.Factory() { | |
private fun isAnnotated(annotations: Array<Annotation>): SomeAnnotation? { | |
for (annotation in annotations) { | |
if (SomeAnnotation::class == annotation.annotationClass) return annotation as SomeAnnotation | |
} | |
return null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment