Uast: KotlinUNestedAnnotation for processing nested annotations (IDEA-185890)
This commit is contained in:
committed by
xiexed
parent
1f81c0cdfe
commit
48ea52def1
@@ -0,0 +1,17 @@
|
||||
annotation class Annotation
|
||||
|
||||
@Annotation
|
||||
class A
|
||||
|
||||
annotation class AnnotationInner(val value: Annotation)
|
||||
|
||||
@AnnotationArray(Annotation())
|
||||
class B1
|
||||
|
||||
@AnnotationArray(value = Annotation())
|
||||
class B2
|
||||
|
||||
annotation class AnnotationArray(vararg val value: Annotation)
|
||||
|
||||
@AnnotationArray(Annotation())
|
||||
class C
|
||||
@@ -0,0 +1,30 @@
|
||||
UFile (package = )
|
||||
UClass (name = Annotation)
|
||||
UClass (name = A)
|
||||
UAnnotation (fqName = Annotation)
|
||||
UAnnotationMethod (name = A)
|
||||
UClass (name = AnnotationInner)
|
||||
UAnnotationMethod (name = value)
|
||||
UClass (name = B1)
|
||||
UAnnotation (fqName = AnnotationArray)
|
||||
UNamedExpression (name = value)
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Annotation))
|
||||
USimpleNameReferenceExpression (identifier = <init>)
|
||||
UAnnotationMethod (name = B1)
|
||||
UClass (name = B2)
|
||||
UAnnotation (fqName = AnnotationArray)
|
||||
UNamedExpression (name = value)
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Annotation))
|
||||
USimpleNameReferenceExpression (identifier = <init>)
|
||||
UAnnotationMethod (name = B2)
|
||||
UClass (name = AnnotationArray)
|
||||
UAnnotationMethod (name = value)
|
||||
UClass (name = C)
|
||||
UAnnotation (fqName = AnnotationArray)
|
||||
UNamedExpression (name = value)
|
||||
UCallExpression (kind = UastCallKind(name='constructor_call'), argCount = 0))
|
||||
UIdentifier (Identifier (Annotation))
|
||||
USimpleNameReferenceExpression (identifier = <init>)
|
||||
UAnnotationMethod (name = C)
|
||||
@@ -0,0 +1,26 @@
|
||||
public abstract annotation Annotation {
|
||||
}
|
||||
|
||||
public final class A {
|
||||
public fun A() = UastEmptyExpression
|
||||
}
|
||||
|
||||
public abstract annotation AnnotationInner {
|
||||
public abstract fun value() : Annotation = UastEmptyExpression
|
||||
}
|
||||
|
||||
public final class B1 {
|
||||
public fun B1() = UastEmptyExpression
|
||||
}
|
||||
|
||||
public final class B2 {
|
||||
public fun B2() = UastEmptyExpression
|
||||
}
|
||||
|
||||
public abstract annotation AnnotationArray {
|
||||
public abstract fun value() : Annotation[] = UastEmptyExpression
|
||||
}
|
||||
|
||||
public final class C {
|
||||
public fun C() = UastEmptyExpression
|
||||
}
|
||||
Reference in New Issue
Block a user