How to obtain Environment Generator

Unofficial Content
if ((GeneratorType)gxModel.Environment.Generator == GeneratorType.JavaWeb)
   UIServices.StartPage.OpenPage(webroot.ToLower() + startupObject.ToLower(), "Startup Object JAVA");
else
   UIServices.StartPage.OpenPage(webroot.ToLower() + startupObject + ".aspx", "Startup Object .NET");