关于sc命令检索出接口实现类问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 37.6k
- Forks
- 7.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 4
Description
1、我实现了一个类public class MyTransformer implements ClassFileTransformer
官方文档仅说明“sc 默认开启了子类匹配功能,也就是说所有当前类的子类也会被搜索出来,想要精确的匹配,请打开options disable-sub-class true开关"
2、使用arthas工具搜索ClassFileTransformer直接把MyTransformer也搜出来了,这是什么原因?难道除了继承外,实现接口也会别关联检索出来吗?
[arthas@31096]$ sc ClassFileTransformer
com.loki.JavaAgent.MyTransformer
com.taobao.arthas.core.advisor.TransformerManager$1
com.taobao.arthas.core.command.klass100.ClassDumpTransformer
java.lang.instrument.ClassFileTransformer
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported sc *ClassFileTransformer* command and compare its results with options disable-sub-class true. Read the sc command's documented matching behavior and determine whether interface implementations are intentionally included; done means the behavior is explained and the documentation or matching behavior is corrected if it is not intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100