0
设置属性我有一个源代码文件,其中包含,除其他外,下面几行:ANT:使用的loadFile如果某些多线条图案被发现
public boolean isBetaVersion() {
return true;
}
我尝试读取ANT文件和设置物业根据上述方法是否返回true
或别的东西:
<loadfile srcfile="path/to/MyFile.java" property="isBetaBuild">
<filterchain>
<striplinebreaks/>
<linecontainsregexp>
<regexp pattern=".*\sisBetaVersion()\s\{\sreturn\strue.*"/>
</linecontainsregexp>
</filterchain>
</loadfile>
,但它永远不匹配(不幸的是,我是一个完整的正则表达式,小白)。任何人有一个想法可能是错的?提前致谢。