From a674e84dda7b41bb4094d54a4144926717bca95d Mon Sep 17 00:00:00 2001 From: Hearen Date: Thu, 20 Sep 2018 23:47:37 +0800 Subject: [PATCH] getstatic translated --- site/src/site/sphinx/en/getstatic.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 site/src/site/sphinx/en/getstatic.md diff --git a/site/src/site/sphinx/en/getstatic.md b/site/src/site/sphinx/en/getstatic.md new file mode 100644 index 000000000..a6927f511 --- /dev/null +++ b/site/src/site/sphinx/en/getstatic.md @@ -0,0 +1,24 @@ +getstatic +========= + +Check the static fields of classes conveniently as `getstatic class_name field_name` + +Tip: if the *field* is a composite object, you can even use [`OGNL`](https://en.wikipedia.org/wiki/OGNL) to traverse, filter and access the internal properties of it. + +E.g. suppose `n` is a `Map` and the key is a `Enum` then if you want to get the key with a specific `Enum` value - `STOP` or `a`, you can achieve it as: + +``` +$ getstatic com.alibaba.arthas.Test n 'entrySet().iterator.{? #this.key.name()=="STOP"}' +field: n +@ArrayList[ + @Node[STOP=bbb], +] +Affect(row-cnt:1) cost in 68 ms. + + +$ getstatic com.alibaba.arthas.Test m 'entrySet().iterator.{? #this.key=="a"}' +field: m +@ArrayList[ + @Node[a=aaa], +] +```