File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
java/ql/src/utils/stub-generator Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -412,8 +412,20 @@ private string stubAnnotation(Annotation a) {
412
412
}
413
413
414
414
private string stubAnnotationSimpleValue ( Expr value ) {
415
- result = value .( FieldAccess ) .getField ( ) .getQualifiedName ( ) or
416
- result = value .( Literal ) .toString ( )
415
+ result = value .( FieldAccess ) .getField ( ) .getQualifiedName ( )
416
+ or
417
+ result = value .( Literal ) .getLiteral ( )
418
+ or
419
+ not value instanceof Literal and
420
+ (
421
+ result = value .( CompileTimeConstantExpr ) .getStringValue ( ) or
422
+ result = value .( CompileTimeConstantExpr ) .getBooleanValue ( ) .toString ( ) or
423
+ result = value .( CompileTimeConstantExpr ) .getIntValue ( ) .toString ( )
424
+ )
425
+ or
426
+ result = value .( Annotation ) .getType ( ) .getName ( )
427
+ or
428
+ result = value .( TypeLiteral ) .getReferencedType ( ) .getName ( ) + ".class"
417
429
}
418
430
419
431
private string stubAnnotationValue ( Expr value ) {
You can’t perform that action at this time.
0 commit comments