I would like to search Java annotations with another annotations inside. I don't know how many nested levels there are or I don't want to specify it. Finally, I would like to search for examples of @ApiImplicitParams
with param type body
and with @Example
annotations inside.
But first I am trying to match anything nested.
First I searched for
@ApiImplicitParams(...)
and it found me somethind. The very first result is
@ApiImplicitParams({ @ApiImplicitParam(name = "foo", value = "List of strings", paramType = "body", dataType = "Foo") })
and has @ApiImplicitParam
inside. Let's try to match it.
I tried
@ApiImplicitParams({@ApiImplicitParam(...) ...})
but it didn't find that case with one nesting and didn't find any cases with multiple @ApiImplicitParams
inside.
How to accomplish?
I believe the following query will meet your requirements here.
@ApiImplicitParams({...@ApiImplicitParam(...paramType = "body"...)...}) lang:Java
Some examples of matches --
A note on this --
The query provided above assumes one nested block, I'm afraid right now Sourcegraph doesn't have a good way to express an arbitrary level of nesting.
Hope that helps!