// "Create Method 'f'" "true" class A { { f(A::foo); } private void f(Object foo) { //To change body of created methods use File | Settings | File Templates. } static int foo() { return 42; } }