-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Description
如果我需要替换的方法是抛异常的,那么就无法替换,或者插入log等。
比如我想创建文件方法前后添加log
方法如下
public boolean createNewFile() throws IOException {
SecurityManager security = System.getSecurityManager();
if (security != null) security.checkWrite(path);
if (isInvalid()) {
throw new IOException("Invalid file path");
}
return fs.createFileExclusively(path);
}
此时xml配置这样写
void java.io.File.createNewFile()
android.util.Log.e("@@@@@","java.io.FilecreateNewFile");
发现无效。
Metadata
Metadata
Assignees
Labels
No labels