|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.beanlib.provider.replicator.ReplicatorTemplate
net.sf.beanlib.provider.replicator.BeanReplicator
public class BeanReplicator
Default implementation of BeanReplicatorSpi.
| Nested Class Summary | |
|---|---|
private static class |
BeanReplicator.Factory
Factory for BeanReplicator |
| Field Summary | |
|---|---|
private static BeanReplicator.Factory |
factory
|
| Fields inherited from class net.sf.beanlib.provider.replicator.ReplicatorTemplate |
|---|
log |
| Constructor Summary | |
|---|---|
BeanReplicator()
Convenient constructor to make use of the default BeanTransformer. |
|
BeanReplicator(BeanTransformerSpi beanTransformer)
Convenient constructor for passing in a bean transformer. |
|
| Method Summary | ||
|---|---|---|
static BeanReplicator |
newBeanReplicatable()
Convenient factory method to use the default BeanTransformer. |
|
static BeanReplicator |
newBeanReplicatable(BeanTransformerSpi beanTransformer)
|
|
|
replicateBean(V from)
Replicates a given JavaBean object. |
|
|
replicateBean(V from,
Class<T> toClass)
Replicates the properties of a JavaBean object to an instance of a target class, which is selected from the given "from" and "to" classes, giving priority to the one which is more specific whenever possible. |
|
protected
|
replicateBean(V from,
Class<T> toClass,
V originalFrom)
Replicates the properties of a JavaBean object to an instance of a target class, which is selected from the given "from" and "to" classes, giving priority to the one which is more specific whenever possible. |
|
| Methods inherited from class net.sf.beanlib.provider.replicator.ReplicatorTemplate |
|---|
chooseClass, createToInstance, createToInstance, createToInstanceWithComparator, getTargetCloned, newInstanceAsPrivileged, populateBean, putTargetCloned, replicate, replicate, replicateByBeanReplicatable, transform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final BeanReplicator.Factory factory
| Constructor Detail |
|---|
public BeanReplicator(BeanTransformerSpi beanTransformer)
public BeanReplicator()
BeanTransformer.
| Method Detail |
|---|
public static BeanReplicator newBeanReplicatable(BeanTransformerSpi beanTransformer)
public static BeanReplicator newBeanReplicatable()
BeanTransformer.
public <V> V replicateBean(V from)
V - from typefrom - from bean to be replicated.
public <V,T> T replicateBean(V from,
Class<T> toClass)
replicateBean in interface BeanReplicatorSpiV - from typeT - target typefrom - from bean (after unenhancement) to be replicatedtoClass - target class to be instantiated
protected <V,T> T replicateBean(V from,
Class<T> toClass,
V originalFrom)
V - from typeT - target typefrom - from bean (after unenhancement) to be replicatedtoClass - target class to be instantiatedoriginalFrom - the original from bean before any "unehancement"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||