Log.severe(t, "Can't get adapter %s methods (possible sideness fail), bailing out", adapterClass);
return result;
}
for (Method method : clsMethods) {
MethodDeclaration decl = createDeclaration(method);
if (decl == null) continue;
Map<String, Method> allProxyArgs = Maps.newHashMap();
Class<?>[] luaArgs = decl.getLuaArgTypes();
final ProxyArg proxyArg = method.getAnnotation(ProxyArg.class);
if (proxyArg != null) addProxyArgs(allProxyArgs, method.getName(), luaArgs, proxyArg);
final ProxyArgs proxyArgs = method.getAnnotation(ProxyArgs.class);
if (proxyArgs != null) for (ProxyArg arg : proxyArgs.value())
addProxyArgs(allProxyArgs, method.getName(), luaArgs, arg);
E exec = factory.createExecutor(method, decl, ImmutableMap.copyOf(allProxyArgs));
if (!isFreeform(method, clsIsFreeform)) {
final String[] methodPrefixes = getPrefixes(method, classPrefixes);
if (methodPrefixes != null) namesFromAnnotation(methodPrefixes, decl);
else nameDefaultParameters(decl);
}
validateArgTypes(decl);
for (String proxyArgName : allProxyArgs.keySet())
decl.declareJavaArgType(proxyArgName, IMethodProxy.class);
decl.validate();
result.add(exec);
}
return result;