public class EntityInstantiators extends Object
EntityInstantiator
instances for a given type falling back to a
default one.Constructor and Description |
---|
EntityInstantiators()
Creates a new
EntityInstantiators using the default fallback instantiator and no custom ones. |
EntityInstantiators(EntityInstantiator fallback)
Creates a new
EntityInstantiators using the given EntityInstantiator as fallback. |
EntityInstantiators(EntityInstantiator defaultInstantiator,
Map<Class<?>,EntityInstantiator> customInstantiators)
Creates a new
EntityInstantiator using the given fallback EntityInstantiator and the given custom
ones. |
EntityInstantiators(Map<Class<?>,EntityInstantiator> customInstantiators)
Creates a new
EntityInstantiators using the default fallback instantiator and the given custom ones. |
Modifier and Type | Method and Description |
---|---|
EntityInstantiator |
getInstantiatorFor(PersistentEntity<?,?> entity)
Returns the
EntityInstantiator to be used to create the given PersistentEntity . |
public EntityInstantiators()
EntityInstantiators
using the default fallback instantiator and no custom ones.public EntityInstantiators(EntityInstantiator fallback)
EntityInstantiators
using the given EntityInstantiator
as fallback.fallback
- must not be null.public EntityInstantiators(Map<Class<?>,EntityInstantiator> customInstantiators)
EntityInstantiators
using the default fallback instantiator and the given custom ones.customInstantiators
- must not be null.public EntityInstantiators(EntityInstantiator defaultInstantiator, Map<Class<?>,EntityInstantiator> customInstantiators)
EntityInstantiator
using the given fallback EntityInstantiator
and the given custom
ones.defaultInstantiator
- must not be null.customInstantiators
- must not be null.public EntityInstantiator getInstantiatorFor(PersistentEntity<?,?> entity)
EntityInstantiator
to be used to create the given PersistentEntity
.entity
- must not be null.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.