MCPcopy Create free account
hub / github.com/GCMiner/GCMiner / object_init

Method object_init

src/main/java/com/ReadChain.java:91–100  ·  view source on GitHub ↗
(String classname)

Source from the content-addressed store, hash-verified

89 }
90
91 public <classname> Object object_init (String classname) throws Exception {
92
93 Class<?> target_classname = Class.forName(classname); //返回传入类对应的实例对象
94 Field f = Unsafe.class.getDeclaredField("theUnsafe");
95 f.setAccessible(true);
96 Unsafe unsafe = (Unsafe) f.get(null);
97
98 classname PropertyObject = (classname) unsafe.allocateInstance(target_classname);
99 return PropertyObject;
100 }
101
102 public Object isGadgetChain() {
103 ObjectMapper mapper = new ObjectMapper();

Callers 1

isGadgetChainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected