Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @MustBeDocumented
- @Target(AnnotationTarget.CLASS)
- @Retention(AnnotationRetention.RUNTIME)
- annotation class MyAnnotation
- abstract class MyFactory<in t: Any> {
- ...
- abstract fun genericMethod(model: T): Int
- ...
- }
- class MyFactoryImplementation<MyAnnotationType> {
- ...
- override fun genericMethod(model: MyAnnotation): Int {
- return when (model) {
- is UsesAnnotation -> 1
- else -> 0
- }
- ...
- }
- @MyAnnotation
- class UsesAnnotation
Add Comment
Please, Sign In to add comment