private void selectMethod(
        final Set<String> sortedMethodNames,
        final Map<String, Method> sortedMethods,
        final List<Method> unsortedMethods,
        final Method method)
    {
        final int mods = method.getModifiers();
        if (!Modifier.isPublic(mods) ||
            Modifier.isStatic(mods) ||
            method.getParameterTypes().length != 0 ||
            method.getReturnType().equals(Void.TYPE) ||
            ignoredMethods.contains(method.getName()))
        {
            return;
        }

        if (null == sortedMethodNames)
        {
            unsortedMethods.add(method);
        }
        else
        {
            if (sortedMethodNames.contains(method.getName()))
            {
                sortedMethods.put(method.getName(), method);
            }
            else
            {
                unsortedMethods.add(method);
            }
        }
    }
Select a list of methods from a given class.

@param clazz to select the method for.
@return the list of methods
sbe-tool/src/main/java/uk/co/real_logic/sbe/codec/java/MethodSelector.java