Skip to content

Commit 1ece12e

Browse files
committed
Add annotation element names
1 parent d4499a1 commit 1ece12e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

java/ql/src/utils/stub-generator/Stubs.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,15 @@ private string stubMember(Member m) {
400400

401401
private string stubAnnotation(Annotation a) {
402402
if exists(a.getAValue())
403-
then result = a.toString() + "(" + concat(stubAnnotationValue(a.getAValue()), ",") + ")"
404-
else result = a.toString()
403+
then
404+
result =
405+
a.getType().getName() + "(" +
406+
concat(string name, Expr value |
407+
value = a.getValue(name)
408+
|
409+
name + "=" + stubAnnotationValue(value), ","
410+
) + ")"
411+
else result = a.getType().getName()
405412
}
406413

407414
private string stubAnnotationSimpleValue(Expr value) {

0 commit comments

Comments
 (0)