net.sf.beanlib.provider.replicator
Class ImmutableReplicator
java.lang.Object
net.sf.beanlib.provider.replicator.ImmutableReplicator
- All Implemented Interfaces:
- ImmutableReplicatorSpi
- Direct Known Subclasses:
- HeteroImmutableReplicator, Jaxb2ImmutableReplicator
public class ImmutableReplicator
- extends Object
- implements ImmutableReplicatorSpi
Default implementation of ImmutableReplicatorSpi
.
- Author:
- Joe D. Velopar
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
public static final ImmutableReplicator.Factory factory
ImmutableReplicator
protected ImmutableReplicator()
newImmutableReplicatable
public static ImmutableReplicator 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
- Type Parameters:
V
- source immutable object typeT
- target class type- Parameters:
immutableFrom
- source immutable objecttoClass
- target class
getDefaultPrimitiveValue
public static <T> T getDefaultPrimitiveValue(Class<T> primitiveClass)
sameType
private static boolean sameType(Class lhs,
Class rhs)