protected <T extends Object, U extends Object> IMappedElementDescriptor<T> createMappedDescriptor(
     final T domainObject) {
   IMappedElementDescriptor<T> _xblockexpression = null;
   {
     XDiagramConfig.Registry _instance = XDiagramConfig.Registry.getInstance();
     Iterable<? extends XDiagramConfig> _configurations = _instance.getConfigurations();
     final Function1<XDiagramConfig, Iterable<? extends AbstractMapping<T>>> _function =
         (XDiagramConfig it) -> {
           return it.<T>getMappings(domainObject);
         };
     Iterable<Iterable<? extends AbstractMapping<T>>> _map =
         IterableExtensions.map(_configurations, _function);
     Iterable<AbstractMapping<T>> _flatten = Iterables.<AbstractMapping<T>>concat(_map);
     final AbstractMapping<T> mapping = IterableExtensions.<AbstractMapping<T>>head(_flatten);
     XDiagramConfig _config = mapping.getConfig();
     IMappedElementDescriptorProvider _domainObjectProvider = _config.getDomainObjectProvider();
     _xblockexpression =
         _domainObjectProvider.<T>createMappedElementDescriptor(domainObject, mapping);
   }
   return _xblockexpression;
 }
 public <T extends Object> IMappedElementDescriptor<T> getDescriptor(
     final T domainObject, final AbstractMapping<T> mapping) {
   XDiagramConfig _config = mapping.getConfig();
   IMappedElementDescriptorProvider _domainObjectProvider = _config.getDomainObjectProvider();
   return _domainObjectProvider.<T>createMappedElementDescriptor(domainObject, mapping);
 }