Ответ 1
Вам не нужно this
. YourClassName::close
вызовет метод close
объекта, переданного потребителю:
Arrays.stream(log.getHandlers()).forEach(YourClassName::close);
Существует четыре типа ссылок на методы (Источник):
Kind Example
---- -------
Reference to a static method ContainingClass::staticMethodName
Reference to an instance method of a particular object containingObject::instanceMethodName
Reference to an instance method of an arbitrary object of a particular type ContainingType::methodName
Reference to a constructor ClassName::new
В вашем случае вам нужен третий вид.