This commit is contained in:
hengyunabc
2018-08-31 11:49:48 +08:00
parent ebfb0c6f96
commit 3fbfab4288
235 changed files with 30452 additions and 0 deletions
@@ -0,0 +1,31 @@
package com.alibaba.arthas;
public class Pojo {
String name;
int age;
String hobby;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getHobby() {
return hobby;
}
public void setHobby(String hobby) {
this.hobby = hobby;
}
}
@@ -0,0 +1,57 @@
package com.alibaba.arthas;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
/**
* @author diecui1202 on 2017/9/13.
*/
public class Test {
public static final Map m = new HashMap();
public static final Map n = new HashMap();
public static final Map p = null;
static {
m.put("a", "aaa");
m.put("b", "bbb");
n.put(Type.RUN, "aaa");
n.put(Type.STOP, "bbb");
}
public static void main(String[] args) throws InterruptedException {
List<Pojo> list = new ArrayList<Pojo>();
for (int i = 0; i < 40; i ++) {
Pojo pojo = new Pojo();
pojo.setName("name " + i);
pojo.setAge(i + 2);
list.add(pojo);
}
System.out.println(p);
while (true) {
int random = new Random().nextInt(40);
String name = list.get(random).getName();
list.get(random).setName(null);
test(list);
list.get(random).setName(name);
Thread.sleep(1000l);
}
}
public static void test(List<Pojo> list) {
// do nothing
}
public static void invoke(String a) {
System.out.println(a);
}
}
@@ -0,0 +1,5 @@
package com.alibaba.arthas;
public enum Type {
RUN, STOP;
}