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

Method getMethod

src/main/java/com/volmit/adapt/util/Violator.java:151–169  ·  view source on GitHub ↗
(Class<?> c, String name, Class<?>... pars)

Source from the content-addressed store, hash-verified

149 }
150
151 public static Method getMethod(Class<?> c, String name, Class<?>... pars) throws Throwable {
152 String iv = "";
153 String mx = "";
154
155 for (Class<?> i : pars) {
156 mx += "," + i.getCanonicalName();
157 }
158
159 mx = mx.length() >= 1 ? mx.substring(1) : mx;
160 iv = id(c, null) + "." + name + "(" + mx + ")";
161
162 if (!h(iv)) {
163 Method f = c.getMethod(name, pars);
164 f.setAccessible(true);
165 p(iv, f);
166 }
167
168 return (Method) g(iv);
169 }
170
171 @SuppressWarnings("unchecked")
172 public static <T> T construct(Class<?> c, Object... parameters) {

Callers 4

getMethod · 0.95
invokeMethod · 0.95
getPlayerAmountMethod · 0.45

Calls 5

idMethod · 0.95
hMethod · 0.95
pMethod · 0.95
gMethod · 0.95
lengthMethod · 0.45

Tested by

no test coverage detected