import java.util.function.Supplier; class Test { { Supplier sup = this::get; } private String get() { return null; } }