protected ResourceReference newResourceReference(Class<?> scope, final String name, Locale locale, String style, int cacheDuration, ResourceSpec[] resourceSpecs, IResourcePreProcessor preProcessor) {
ResourceReference ref;
if (resourceSpecs.length > 1) {
if (doCompress(name)) {
if (doMinifyCss(name)) {
ref = new CompressedMergedCssResourceReference(name, locale, style, resourceSpecs, cacheDuration, preProcessor);
} else if (doMinifyJs(name)) {
ref = new CompressedMergedJsResourceReference(name, locale, style, resourceSpecs, cacheDuration, preProcessor);
} else {
ref = new CompressedMergedResourceReference(name, locale, style, resourceSpecs, cacheDuration, preProcessor);
}