Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc authored and actions-user committed Nov 15, 2022
1 parent ca08cf5 commit 14374b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions site/docs/doc/sc.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
| `[c:]` | 指定 class 的 ClassLoader 的 hashcode |
| `[classLoaderClass:]` | 指定执行表达式的 ClassLoader 的 class name |
| `[n:]` | 具有详细信息的匹配类的最大数量(默认为 100) |
|`[cs <arg>]` | 指定 class 的 ClassLoader#toString() 返回值。长格式`[classLoaderStr <arg>]`|
| `[cs <arg>]` | 指定 class 的 ClassLoader#toString() 返回值。长格式`[classLoaderStr <arg>]` |

::: tip
class-pattern 支持全限定名,如 com.taobao.test.AAA,也支持 com/taobao/test/AAA 这样的格式,这样,我们从异常堆栈里面把类名拷贝过来的时候,不需要在手动把`/`替换为`.`啦。
Expand Down Expand Up @@ -107,7 +107,7 @@ sc 默认开启了子类匹配功能,也就是说所有当前类的子类也
Affect(row-cnt:1) cost in 19 ms.
```

- 通过 ClassLoader#toString 查找类(前提:有一个toString()返回值是`apo`的类加载器,加载的类中包含`demo.MathGame`, `demo.MyBar`,` demo.MyFoo`3个类
- 通过 ClassLoader#toString 查找类(前提:有一个 toString()返回值是`apo`的类加载器,加载的类中包含`demo.MathGame`, `demo.MyBar`,` demo.MyFoo`3 个类

```bash
$ sc -cs apo *demo*
Expand Down
2 changes: 1 addition & 1 deletion site/docs/en/doc/sc.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Search classes loaded by JVM.
| `[c:]` | The hash code of the special class's classLoader |
| `[classLoaderClass:]` | The class name of the ClassLoader that executes the expression. |
| `[n:]` | Maximum number of matching classes with details (100 by default) |
|`[cs <arg>]` | Specify the return value of class's ClassLoader#toString(). Long format is`[classLoaderStr <arg>]`|
| `[cs <arg>]` | Specify the return value of class's ClassLoader#toString(). Long format is`[classLoaderStr <arg>]` |

::: tip
_class-patten_ supports full qualified class name, e.g. com.taobao.test.AAA and com/taobao/test/AAA. It also supports the format of 'com/taobao/test/AAA', so that it is convenient to directly copy class name from the exception stack trace without replacing '/' to '.'.
Expand Down

0 comments on commit 14374b0

Please sign in to comment.