private boolean registerWrapperMethod(Method method) {
        boolean isStatic = Modifier.isStatic(method.getModifiers());
        int arity = method.getParameterTypes().length;
        MethodHandle mh;
        try {
            Class<?>[] wptypes = new Class<?>[arity];
            Arrays.fill(wptypes, IndyObject.class);
            if (method.isVarArgs())
                wptypes[arity - 1] = IndyObject[].class;
            // get wrapper method
            method = targetClass.getMethod(method.getName(), wptypes);
            mh = lookup.unreflect(method);
        } catch (NoSuchMethodException e) {
            return false;
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
        Symbol name = getMethodName(method, isStatic);
        Symbol className = isStatic ? NIL : namespace;
        if (bindings.isReadOnly(name, className, arity))
            return true; // already registered.
        String signature = signature(method);
        bindings.bind(name, className, arity, new JavaMethod(signature, mh), getFlags(method));
        if (log.isDebugEnabled()) {
            log.debug("  WrapperMethod: {}", signature);
            log.debug("    Registered as {}.", name);
        }
        return true;
    }