public MethodDef getMethod(String name) { for (MethodDef m : methods) { if (m.getNameString().matches(name)) { return m; } } throw new RuntimeException("No Method Found With Name: " + name); }
public MethodDef getMethod(String name, Type[] params) { for (MethodDef m : methods) { if (m.matchesDef(name, params)) { return m; } } throw new RuntimeException( "No Method Found With Name: " + name + ", Params: " + Arrays.toString(params)); }