All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description
getInstance(Object prototype)Deprecated.Factory method that performs validation.
getInstanceDeprecated.Factory method that performs validation.
Creates a Factory that will return a clone of the same prototype object each time the factory is used. The prototype will be cloned using one of these techniques (in order):
- public clone method
- public copy constructor
- serialization clone
WARNING: from v3.2.2 onwards this method will return a
Factorythat will throw an
UnsupportedOperationExceptionwhen trying to serialize or de-serialize it to prevent potential remote code execution exploits.
In order to re-enable serialization support the following system property can be used (via -Dproperty=true):