Support loading Java annotations with TYPE_PARAMETER target
This commit is contained in:
+5
@@ -19,8 +19,10 @@ package org.jetbrains.kotlin.load.java.lazy.descriptors
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
import org.jetbrains.kotlin.descriptors.SupertypeLoopChecker
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.AbstractLazyTypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.load.java.components.TypeUsage
|
||||
import org.jetbrains.kotlin.load.java.lazy.LazyJavaAnnotations
|
||||
import org.jetbrains.kotlin.load.java.lazy.LazyJavaResolverContext
|
||||
import org.jetbrains.kotlin.load.java.lazy.types.LazyJavaTypeResolver
|
||||
import org.jetbrains.kotlin.load.java.lazy.types.toAttributes
|
||||
@@ -42,6 +44,9 @@ class LazyJavaTypeParameterDescriptor(
|
||||
index,
|
||||
SourceElement.NO_SOURCE, c.components.supertypeLoopChecker
|
||||
) {
|
||||
private val annotations = LazyJavaAnnotations(c, javaTypeParameter)
|
||||
|
||||
override fun getAnnotations() = annotations
|
||||
|
||||
override fun resolveUpperBounds(): List<KotlinType> {
|
||||
val bounds = javaTypeParameter.upperBounds
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.name.FqName;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface JavaClass extends JavaClassifier, JavaTypeParameterListOwner, JavaModifierListOwner, JavaAnnotationOwner {
|
||||
public interface JavaClass extends JavaClassifier, JavaTypeParameterListOwner, JavaModifierListOwner {
|
||||
@NotNull
|
||||
Collection<JavaClass> getInnerClasses();
|
||||
|
||||
|
||||
+1
-1
@@ -16,5 +16,5 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.java.structure;
|
||||
|
||||
public interface JavaClassifier extends JavaNamedElement {
|
||||
public interface JavaClassifier extends JavaNamedElement, JavaAnnotationOwner {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user