Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _invoke_filter_list_method_by_name(j_filter_factory, name, filters):
filter_factory_class = j_filter_factory.getClass()
list_class = reflection_util.classForName("java.util.List")
class_array = java_gateway.new_array(java_pkg.java.lang.Class, 1)
class_array[0] = list_class
method = filter_factory_class.getMethod(name, class_array)
filter_list = java_pkg.java.util.ArrayList()
for filter in filters:
filter_list.append(filter)
objects_array = java_gateway.new_array(java_pkg.java.lang.Object, 1)
objects_array[0] = filter_list
return method.invoke(j_filter_factory, objects_array)