mirror of
https://github.com/github/codeql.git
synced 2026-03-15 20:16:45 +01:00
Handle more annotation element value types
This commit is contained in:
@@ -412,8 +412,20 @@ private string stubAnnotation(Annotation a) {
|
||||
}
|
||||
|
||||
private string stubAnnotationSimpleValue(Expr value) {
|
||||
result = value.(FieldAccess).getField().getQualifiedName() or
|
||||
result = value.(Literal).toString()
|
||||
result = value.(FieldAccess).getField().getQualifiedName()
|
||||
or
|
||||
result = value.(Literal).getLiteral()
|
||||
or
|
||||
not value instanceof Literal and
|
||||
(
|
||||
result = value.(CompileTimeConstantExpr).getStringValue() or
|
||||
result = value.(CompileTimeConstantExpr).getBooleanValue().toString() or
|
||||
result = value.(CompileTimeConstantExpr).getIntValue().toString()
|
||||
)
|
||||
or
|
||||
result = value.(Annotation).getType().getName()
|
||||
or
|
||||
result = value.(TypeLiteral).getReferencedType().getName() + ".class"
|
||||
}
|
||||
|
||||
private string stubAnnotationValue(Expr value) {
|
||||
|
||||
Reference in New Issue
Block a user