public abstract class AbstractConstructorEntityInstantiator<STATE> extends Object implements EntityInstantiator<STATE>
Constructor and Description |
---|
AbstractConstructorEntityInstantiator() |
Modifier and Type | Method and Description |
---|---|
<T> T |
createEntityFromState(STATE n,
Class<T> c,
MappingPolicy mappingPolicy) |
protected <T> StateBackedCreator<T,STATE> |
createFailingInstantiator(Class<STATE> stateType) |
protected <T> StateBackedCreator<T,STATE> |
createInstantiator(Class<T> type,
Class<STATE> stateType) |
protected <T> StateBackedCreator<T,STATE> |
createWithoutConstructorInvocation(Class<T> type,
Class<STATE> stateType) |
protected <T> Constructor<T> |
getDeclaredConstructor(Class<T> c) |
protected String |
getFailingMessageForClass(Class<?> entityClass,
Class<STATE> stateClass) |
protected <T> Constructor<T> |
getNoArgConstructor(Class<T> type) |
protected abstract Class<STATE> |
getStateInterface()
subclasses have to provide the concrete state interface
|
void |
setInstantiators(Map<Class<?>,StateBackedCreator<?,STATE>> instantiators) |
protected abstract void |
setState(Object entity,
STATE s)
Subclasses must implement to set state
|
protected <T> StateBackedCreator<T,STATE> |
stateTakingConstructorInstantiator(Class<T> type,
Class<STATE> stateType) |
public AbstractConstructorEntityInstantiator()
public <T> T createEntityFromState(STATE n, Class<T> c, MappingPolicy mappingPolicy)
createEntityFromState
in interface EntityInstantiator<STATE>
public void setInstantiators(Map<Class<?>,StateBackedCreator<?,STATE>> instantiators)
protected <T> StateBackedCreator<T,STATE> createInstantiator(Class<T> type, Class<STATE> stateType)
protected <T> StateBackedCreator<T,STATE> createFailingInstantiator(Class<STATE> stateType)
protected String getFailingMessageForClass(Class<?> entityClass, Class<STATE> stateClass)
protected <T> StateBackedCreator<T,STATE> createWithoutConstructorInvocation(Class<T> type, Class<STATE> stateType)
protected <T> Constructor<T> getNoArgConstructor(Class<T> type)
protected <T> StateBackedCreator<T,STATE> stateTakingConstructorInstantiator(Class<T> type, Class<STATE> stateType)
protected <T> Constructor<T> getDeclaredConstructor(Class<T> c)
protected abstract void setState(Object entity, STATE s)
entity
- s
- Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.