org.apache.commons.collections.functors
Class CloneTransformer
java.lang.Object
org.apache.commons.collections.functors.CloneTransformer
- Serializable, Transformer
public class CloneTransformer
extends java.lang.Object
Transformer implementation that returns a clone of the input object.
Clone is performed using
PrototypeFactory.getInstance(input).create()
.
WARNING: This class will throw an
UnsupportedOperationException
when trying to serialize or
de-serialize an instance to prevent potential remote code execution exploits.
In order to re-enable serialization support for
CloneTransformer
the following system property can be used (via -Dproperty=true):
org.apache.commons.collections.enableUnsafeSerialization
$Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
INSTANCE
public static final Transformer INSTANCE
Singleton predicate instance
getInstance
public static Transformer getInstance()
Factory returning the singleton instance.
transform
public Object transform(Object input)
Transforms the input to result by cloning it.
- transform in interface Transformer
input
- the input object to transform
Copyright © 2001-2015 Apache Software Foundation. All Rights Reserved.