MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / invoke

Method invoke

src/main/java/com/volmit/adapt/util/V.java:100–116  ·  view source on GitHub ↗
(String method, Object... parameters)

Source from the content-addressed store, hash-verified

98 }
99
100 public Object invoke(String method, Object... parameters) {
101 List<Class<?>> par = new ArrayList<>();
102
103 for (Object i : parameters) {
104 par.add(i.getClass());
105 }
106
107 try {
108 return (local ? Violator.getDeclaredMethod(o.getClass(), method, par.toArray(new Class<?>[par.size()])) : Violator.getMethod(o.getClass(), method, par.toArray(new Class<?>[par.size()]))).invoke(o, parameters);
109 } catch (Throwable e) {
110 if (!suppress) {
111 e.printStackTrace();
112 }
113 }
114
115 return null;
116 }
117
118 public void set(String field, Object value) {
119 try {

Callers 12

onMethod · 0.80
sendPacketsMethod · 0.80
getEntityFlagsMethod · 0.80
createFlagWatcherItemMethod · 0.80
setMetadataMethod · 0.80
getChannelMethod · 0.80
writeMethod · 0.80
handlePacketBundleMethod · 0.80
TeamDataMethod · 0.80
spawnParticleMethod · 0.80
getPlayerAmountMethod · 0.80
populateMapMethod · 0.80

Calls 4

getDeclaredMethodMethod · 0.95
getMethodMethod · 0.95
addMethod · 0.65
sizeMethod · 0.65

Tested by

no test coverage detected