hazelcast/hazelcast — pull request #1411 by jerrinot (2013-12-18 23:12:19+00:00)
Title: static factory for ServiceConfig

Registering a new Service implemented via SPI is currently a bit cumbersome:
```
Config config = new Config();
ServiceConfig serviceConfig = new ServiceConfig();
serviceConfig.setName(LongMaxUpdaterService.SERVICE_NAME)
serviceConfig.setClassName(LongMaxUpdaterService.class.getName())
serviceConfig.setEnabled(true);
config.getServicesConfig().addServiceConfig(serviceConfig);
```

with this patch it can be as simple as
```
Config config = new Config();
config.getServicesConfig().addServiceConfig(fromClass(LongMaxUpdaterService.class));
```

I'm not sure if this is a right approach, alternative might be either annotation (a bit alien concept to HZ) or a new interface, eg. NamedService (that would require additional changes in API)