brooklyncentral/brooklyn — pull request #619 by aledsage (2013-03-21 12:28:51+00:00)
Title: Add AbstractEntity.addChild(EntitySpec)

- Use that in preference to:
`addChild(getEntityManager().createEntity(spec))`
Or:
`getEntityManager().createEntity(spec.parent(this))`

- Adds `EntitySpecs.spec(Map, Class)` convenience

This introduces some ugly casts where previously the code was doing `getEntityManager().createEntity(EntitySpecs.spec(clazz).parent(this))`, but worth putting up with that for consistency - we'll fix the cast when we get rid of groovy in AbstractEntity in 0.6.