void () { doTest(aClass -> { final PsiElementFactory factory = JavaPsiFacade.getElementFactory(aClass.getProject()); final PsiFile context = aClass.getContainingFile(); return new TypeParameterInfo[]{ new New("T", factory.createTypeFromText("Some", context), PsiIntersectionType.createIntersection(factory.createTypeFromText("java.lang.Runnable", context), factory.createTypeFromText("java.io.Serializable", context))) }; }); }