class SearchUtils {

    public static List<MethodNode> findMethodsWithParameter(Collection<MethodNode> methodNodes, Type expectedParamType) {
        Validate.notNull(methodNodes);
        Validate.notNull(expectedParamType);
        Validate.noNullElements(methodNodes);
        Validate.isTrue(expectedParamType.getSort() != Type.METHOD && expectedParamType.getSort() != Type.VOID);

        List<MethodNode> ret = new ArrayList<>();
        for (MethodNode methodNode : methodNodes) {
            Type methodDescType = Type.getType(methodNode.desc);
            Type[] methodParamTypes = methodDescType.getArgumentTypes();

            if (Arrays.asList(methodParamTypes).contains(expectedParamType)) {
                ret.add(methodNode);
            }
        }

        return ret;
    }

    private  SearchUtils();

}