inline fun <reified U : Any> PolymorphicDomainObjectContainer<in U>.maybeCreate(name: String): U
Creates a domain object with the specified name and type if it does not exists, and adds it to the container.
name
- the name of the domain object to be created
InvalidUserDataException
- if a domain object with the specified name already
exists or the container does not support creating a domain object with the specified
type
ClassCastException
- if a domain object with the specified name exists with a different type
Parameters
Return
the created domain object