*/
public static LowLevelAppDescriptor transform(WebAppDescriptor wad) {
// TODO need to check contraints on wad
if (wad.getInitParams().get(PackagesResourceConfig.PROPERTY_PACKAGES) != null) {
String packages = wad.getInitParams().get(PackagesResourceConfig.PROPERTY_PACKAGES);
PackagesResourceConfig packagesResourceConfig = new PackagesResourceConfig(packages);
populateResourceConfigFeatures(packagesResourceConfig, wad.getInitParams());
return new LowLevelAppDescriptor.Builder(packagesResourceConfig).build();
} else if (wad.getInitParams().get(ClassNamesResourceConfig.PROPERTY_CLASSNAMES) != null) {
String classes = wad.getInitParams().get(ClassNamesResourceConfig.PROPERTY_CLASSNAMES);
ClassNamesResourceConfig classNamesResourceConfig = new ClassNamesResourceConfig(classes);