O - cloned object typepublic class ReflectionCloneBehavior<O> extends Object implements GlobalCloneBehavior<O>
GlobalCloneBehavior for any types of Object.Clone,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectionCloneBehavior.Policy
Behavior policy.
|
| Constructor and Description |
|---|
ReflectionCloneBehavior(ReflectionCloneBehavior.Policy policy,
ModifierType... ignoredModifiers)
Constructs new
ReflectionCloneBehavior ignoring fields with specified modifiers. |
| Modifier and Type | Method and Description |
|---|---|
O |
clone(RecursiveClone clone,
O object,
int depth)
Returns clone of the specified object.
|
boolean |
isStorable()
Return whether or not values cloned by this behavior are storable for recursive clone operation.
|
boolean |
supports(RecursiveClone clone,
Object object)
Returns whether or not this behavior supports cloning of the specified object.
|
public ReflectionCloneBehavior(@NotNull ReflectionCloneBehavior.Policy policy, @NotNull ModifierType... ignoredModifiers)
ReflectionCloneBehavior ignoring fields with specified modifiers.policy - behavior ReflectionCloneBehavior.PolicyignoredModifiers - modifiers of fields to ignorepublic boolean supports(@NotNull RecursiveClone clone, @NotNull Object object)
GlobalCloneBehaviorsupports in interface GlobalCloneBehavior<O>clone - RecursiveClone algorithmobject - object to clone, should never be nulltrue if this behavior supports cloning of the specified specified object, false otherwise@NotNull public O clone(@NotNull RecursiveClone clone, @NotNull O object, int depth)
GlobalCloneBehaviorclone in interface GlobalCloneBehavior<O>clone - RecursiveClone algorithmobject - object to clone, should never be nulldepth - clone calls stack depthpublic boolean isStorable()
GlobalCloneBehaviorisStorable in interface GlobalCloneBehavior<O>true if values cloned by this behavior are storable for recursive clone operation, false otherwiseCopyright © 2020. All rights reserved.