net.sf.beanlib.jaxb2
Class Jaxb2ImmutableReplicator
java.lang.Object
net.sf.beanlib.provider.replicator.ImmutableReplicator
net.sf.beanlib.jaxb2.Jaxb2ImmutableReplicator
- All Implemented Interfaces:
- ImmutableReplicatorSpi
public class Jaxb2ImmutableReplicator
- extends ImmutableReplicator
Implementation of ImmutableReplicatorSpi
with support of Jaxb2 generated enums.
- Author:
- Hanson Char
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
public static final Jaxb2ImmutableReplicator.Factory factory
Jaxb2ImmutableReplicator
protected Jaxb2ImmutableReplicator()
newImmutableReplicatable
public static Jaxb2ImmutableReplicator newImmutableReplicatable(BeanTransformerSpi beanTransformer)
replicateImmutable
public <V,T> T replicateImmutable(V immutableFrom,
Class<T> toClass)
- Description copied from interface:
ImmutableReplicatorSpi
- Returns a replicated immutable object.
- Specified by:
replicateImmutable
in interface ImmutableReplicatorSpi
- Overrides:
replicateImmutable
in class ImmutableReplicator
- Type Parameters:
V
- source immutable object typeT
- target class type- Parameters:
immutableFrom
- source immutable objecttoClass
- target class
toValue
private <V,T> T toValue(V immutableFrom,
Class<T> toClass)