[英]Search with regex - is there a way to find classes that do not have a certain annotation in any of its methods?
I want to look in a certain directory and find in all of its sub directories all of the classes that derive from X and do not have annotation Y. 我想查看某个目录,并在其所有子目录中找到所有从X派生且没有注释Y的类。
If this isn't possible, I can manage with all classes that do not contain annotation Y. 如果这不可能,那么我可以管理所有不包含注释Y的类。
Is that possible with the regex search? 正则表达式搜索有可能吗?
This is possible using Structural Search. 使用结构搜索可以做到这一点。 Use a pattern like this: 使用这样的模式:
@$Y$
class $A$ extends $X$ {}
Edit Variables: 编辑变量:
X - text/regexp: X
, Apply constraint within type hierarchy
checked to find indirect subclasses Y - text/regexp: Y
, min/max occurrences: 0
X-文本/正则表达式: X
, Apply constraint within type hierarchy
以查找间接子类Y-文本/正则表达式: Y
,最小/最大出现次数: 0
To search a specific directory only, you will have to create a custom scope. 仅搜索特定目录,您将必须创建一个自定义范围。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.