MutableWrapper
instead (primarily due to the complications described above).@Deprecated public class DefinitionCloner extends com.rits.cloning.Cloner
Cloner
directly. To avoid duplicating configuration code everywhere,
we're introducing this wrapper which pre-configures it to work nicely with our definition objects.
Specifically, it prevents cloning Context
.
Note: Initially we wanted to avoid cloning all proxy Callback
fields of definitions, which we
use extensively in the i18n mechanism. But that leads to the cloned object to still delegate method calls to the original
due to proxy specifics.Constructor and Description |
---|
DefinitionCloner()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected <T> T |
cloneInternal(T o,
Map<Object,Object> clones)
Deprecated.
Doesn't clone classes with
Singleton , LazySingleton , SessionScoped or LocalScoped annotation. |
allFields, considerImmutable, copyPropertiesOfInheritedClass, deepClone, deepCloneDontCloneInstances, dontClone, dontCloneInstanceOf, fastClone, fastCloneOrNewInstance, getDumpCloned, getImmutableAnnotation, isCloneAnonymousParent, isCloningEnabled, isDumpClonedClasses, isNullTransient, newInstance, nullInsteadOfClone, registerCloningStrategy, registerConstant, registerConstant, registerFastCloner, registerFastCloners, registerImmutable, registerInaccessibleClassToBeFastCloned, registerKnownConstants, registerKnownJdkImmutableClasses, registerStaticFields, setCloneAnonymousParent, setCloneSynthetics, setCloningEnabled, setDontCloneInstanceOf, setDumpCloned, setDumpClonedClasses, setExtraImmutables, setExtraNullInsteadOfClone, setExtraStaticFields, setNullTransient, shallowClone, shared, standard, unregisterFastCloner
protected <T> T cloneInternal(T o, Map<Object,Object> clones) throws IllegalAccessException
Singleton
, LazySingleton
, SessionScoped
or LocalScoped
annotation.cloneInternal
in class com.rits.cloning.Cloner
IllegalAccessException
Copyright © 2020 Magnolia International Ltd.. All rights reserved.