public int optionLength(String option) {
        Object retVal;
        String methodName = "optionLength";
        Class[] paramTypes = new Class[1];
        Object[] params = new Object[1];
        paramTypes[0] = option.getClass();
        params[0] = option;
        try {
            retVal = invoke(methodName, new Integer(0), paramTypes, params);
        } catch (DocletInvokeException exc) {
            return -1;
        }
        if (retVal instanceof Integer) {
            return ((Integer)retVal).intValue();
        } else {
            messager.error(null, "main.must_return_int",
                           docletClassName, methodName);
            return -1;
        }
    }