if (mappings.length == 0) {
urlMappings.addAll(mappingEvaluator.evaluateMappings(DefaultUrlMappings.getMappings()));
}
else {
for (GrailsClass mapping : mappings) {
GrailsUrlMappingsClass mappingClass = (GrailsUrlMappingsClass) mapping;
List grailsClassMappings;
if (Script.class.isAssignableFrom(mappingClass.getClazz())) {
grailsClassMappings = mappingEvaluator.evaluateMappings(mappingClass.getClazz());
}
else {
grailsClassMappings = mappingEvaluator.evaluateMappings(mappingClass.getMappingsClosure());
}
urlMappings.addAll(grailsClassMappings);
if (mappingClass.getExcludePatterns() != null) {
excludePatterns.addAll(mappingClass.getExcludePatterns());
}
}
}
DefaultUrlMappingsHolder defaultUrlMappingsHolder = new DefaultUrlMappingsHolder(urlMappings, excludePatterns, true);