class OCInvocationCallbacks {

    protected Method methodForSelector(String selectorName) {
        if (null == selectorName) {
            logging.severe("methodForSelector called with null selectorName");
            return null;
        }
        int parameterCount = countColons(selectorName);
        String methodName = methodNameForSelector(selectorName);
        try {
            Method[] methods = javaObject.getClass().getMethods();
            for (Method method : methods) {
                if (method.getName().equals(methodName) && method.getParameterTypes().length == parameterCount) {
                    boolean match = true;
                    if(null == stringForType(method.getReturnType())) {
                        match = false;
                    }
                    if(match) {
                        for (Class<?> parameterType : method.getParameterTypes()) {
                            if(null == stringForType(parameterType)) {
                                match = false;
                                break;
                            }
                        }
                    }
                    if(match) {
                        return method;
                    }
                }
            }
            logging.fine("No method " + methodName + " for selector:" + selectorName);
            return null;
        } catch (Exception e) {
            logging.log(Level.SEVERE, "Exception finding methodForSelector", e);
            return null;
        }
    }

    public  OCInvocationCallbacks(Object javaObject);

}