return (D) new JavascriptModelDefHandler((DefDescriptor<ModelDef>) descriptor, source).getDefinition();
case RESOURCE:
return (D) new ResourceDefHandler<>((DefDescriptor<ResourceDef>) descriptor,
(Source<ResourceDef>) source).createDefinition();
case INCLUDE:
return (D) new JavascriptIncludeDefHandler((DefDescriptor<IncludeDef>) descriptor,
(Source<IncludeDef>) source).getDefinition();
default:
return null;
}
}