addMethodsFromObject(methods, target);
}
private void addMethodsFromObject(Map<String, E> methods, Object target) {
for (Method method : target.getClass().getMethods()) {
LuaCallable callableMeta = method.getAnnotation(LuaCallable.class);
if (callableMeta != null) {
MethodDeclaration decl = new MethodDeclaration(method, callableMeta);
for (String name : decl.getNames())
methods.put(name, createDummyWrapper(target, decl));
}