import java.util.List;

public class Test {
    public interface MyIface {

    }

    public static void main(String[] args) {
        Test t = new Test();
        t.test();
    }

    public void test() {
        create(loadById("foo"));
    }

    private <E extends MyIface> E loadById(String str) {
        return (E) new MyIface() {
        };
    }

    public void create(Object o) {
        System.out.println("Create object");
    }

    public void create(List<?> list) {
        System.out.println("Create list");
    }
} 