Refactoring. Convert Annotated to kotlin.
This commit is contained in:
+3
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,14 +26,10 @@ interface WrappedAnnotated : Annotated {
|
||||
val originalAnnotated: Annotated
|
||||
}
|
||||
|
||||
class AnnotatedWithFakeAnnotations(override val originalAnnotated: Annotated, private val actual: Annotations) : WrappedAnnotated {
|
||||
override fun getAnnotations() = actual
|
||||
}
|
||||
class AnnotatedWithFakeAnnotations(override val originalAnnotated: Annotated, override val annotations: Annotations) : WrappedAnnotated
|
||||
|
||||
class AnnotatedWithOnlyTargetedAnnotations(original: Annotated) : Annotated {
|
||||
private val annotations: Annotations = UseSiteTargetedAnnotations(original.annotations)
|
||||
|
||||
override fun getAnnotations() = annotations
|
||||
override val annotations: Annotations = UseSiteTargetedAnnotations(original.annotations)
|
||||
|
||||
private class UseSiteTargetedAnnotations(private val additionalAnnotations: Annotations) : Annotations {
|
||||
override fun isEmpty() = true
|
||||
|
||||
Reference in New Issue
Block a user