Refactoring. Convert Annotated to kotlin.

This commit is contained in:
Stanislav Erokhin
2016-05-19 19:00:51 +03:00
parent 450ea78b1d
commit 74bddcfb70
22 changed files with 47 additions and 78 deletions
@@ -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