ClassGeneratingEntityInstantiator
.@Deprecated public enum BytecodeGeneratingEntityInstantiator extends Enum<BytecodeGeneratingEntityInstantiator> 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
.Modifier and Type | Class and Description |
---|---|
static interface |
BytecodeGeneratingEntityInstantiator.ObjectInstantiator
Deprecated.
|
Enum Constant and Description |
---|
INSTANCE
Deprecated.
|
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.
|
static BytecodeGeneratingEntityInstantiator |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static BytecodeGeneratingEntityInstantiator[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BytecodeGeneratingEntityInstantiator INSTANCE
public static BytecodeGeneratingEntityInstantiator[] values()
for (BytecodeGeneratingEntityInstantiator c : BytecodeGeneratingEntityInstantiator.values()) System.out.println(c);
public static BytecodeGeneratingEntityInstantiator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic <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–2019 Pivotal Software, Inc.. All rights reserved.