class Bar { void fun(A param) { } } class Foo { void foo(Bar bar) { bar.fun( } }