public class ValueHolder<T> extends Object implements WeavedAttributeValueHolderInterface<T>, Cloneable, Serializable
Purpose: Act as a place holder for a variable that required a value holder interface. This class should be used to initialze an objects attributes that are using indirection is their mappings.
| Modifier and Type | Field and Description |
|---|---|
protected T |
value
Stores the wrapped object.
|
shouldToStringInstantiate| Constructor and Description |
|---|
ValueHolder()
PUBLIC:
Initialize the holder.
|
ValueHolder(T value)
PUBLIC:
Initialize the holder with an object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
INTERNAL:
|
T |
getValue()
PUBLIC:
Return the wrapped object.
|
boolean |
isCoordinatedWithProperty()
Used as part of the implementation of WeavedAttributeValueHolderInterface
Used to track whether a valueholder that has been weaved into a class is coordinated
with the underlying property
|
boolean |
isInstantiated()
PUBLIC:
Return a boolean indicating whether the
wrapped object has been set or not.
|
boolean |
isNewlyWeavedValueHolder()
Used as part of the implementation of WeavedAttributeValueHolderInterface
Used to determine if this ValueHolder was added instantiated as part of
the constructor of a weaved class
|
void |
setIsCoordinatedWithProperty(boolean coordinated)
Used as part of the implementation of WeavedAttributeValueHolderInterface
Used to track whether a valueholder that has been weaved into a class is coordinated
with the underlying property
This method will be called internall when the state of Coordination between the
weaved valueholder and the underlying value is known
|
void |
setIsNewlyWeavedValueHolder(boolean isNew)
Used as part of the implementation of WeavedAttributeValueHolderInterface
Used to determine if this ValueHolder was added instantiated as part of
the constructor of a weaved class
This method will be called when a ValueHolder is instantiated in a weaved class
|
void |
setValue(T value)
PUBLIC:
Set the wrapped object.
|
boolean |
shouldAllowInstantiationDeferral()
INTERNAL:
Return if add/remove should trigger instantiation or avoid.
|
String |
toString()
INTERNAL:
|
protected T value
public ValueHolder()
public ValueHolder(T value)
public Object clone()
clone in interface ValueHolderInterface<T>clone in class Objectpublic T getValue()
getValue in interface ValueHolderInterface<T>public boolean isCoordinatedWithProperty()
isCoordinatedWithProperty in interface WeavedAttributeValueHolderInterface<T>public boolean isNewlyWeavedValueHolder()
isNewlyWeavedValueHolder in interface WeavedAttributeValueHolderInterface<T>public boolean isInstantiated()
isInstantiated in interface ValueHolderInterface<T>public void setIsCoordinatedWithProperty(boolean coordinated)
setIsCoordinatedWithProperty in interface WeavedAttributeValueHolderInterface<T>public void setIsNewlyWeavedValueHolder(boolean isNew)
setIsNewlyWeavedValueHolder in interface WeavedAttributeValueHolderInterface<T>public void setValue(T value)
setValue in interface ValueHolderInterface<T>public boolean shouldAllowInstantiationDeferral()
shouldAllowInstantiationDeferral in interface WeavedAttributeValueHolderInterface<T>Copyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.