org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator
through
EntityInstantiators
.@Deprecated public class ClassGeneratingEntityInstantiator extends Object implements EntityInstantiator
EntityInstantiator
that can generate byte code to speed-up dynamic object instantiation. Uses the
PersistentEntity
's PreferredConstructor
to instantiate an instance of the entity by dynamically
generating factory methods with appropriate constructor invocations via ASM. If we cannot generate byte code for a
type, we gracefully fall-back to the ReflectionEntityInstantiator
.Constructor and Description |
---|
ClassGeneratingEntityInstantiator()
Deprecated.
Creates a new
ClassGeneratingEntityInstantiator . |
Modifier and Type | Method and Description |
---|---|
<T,E extends PersistentEntity<? extends T,P>,P extends PersistentProperty<P>> |
createInstance(E entity,
ParameterValueProvider<P> provider)
Deprecated.
Creates a new instance of the given entity using the given source to pull data from.
|
public ClassGeneratingEntityInstantiator()
ClassGeneratingEntityInstantiator
.public <T,E extends PersistentEntity<? extends T,P>,P extends PersistentProperty<P>> T createInstance(E entity, ParameterValueProvider<P> provider)
EntityInstantiator
createInstance
in interface EntityInstantiator
entity
- will not be null.provider
- will not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.