public class ValueHolder extends java.lang.Object implements WeavedAttributeValueHolderInterface, java.lang.Cloneable, java.io.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.
| Type | Property and Description |
|---|---|
boolean |
isCoordinatedWith
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
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
value
Stores the wrapped object.
|
shouldToStringInstantiate| Constructor and Description |
|---|
ValueHolder()
PUBLIC:
Initialize the holder.
|
ValueHolder(java.lang.Object value)
PUBLIC:
Initialize the holder with an object.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
INTERNAL:
|
java.lang.Object |
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(java.lang.Object value)
PUBLIC:
Set the wrapped object.
|
boolean |
shouldAllowInstantiationDeferral()
INTERNAL:
Return if add/remove should trigger instantiation or avoid.
|
java.lang.String |
toString()
INTERNAL:
|
isCoordinatedWithProperty in interface WeavedAttributeValueHolderInterfacepublic ValueHolder()
public ValueHolder(java.lang.Object value)
public java.lang.Object clone()
clone in interface ValueHolderInterfaceclone in class java.lang.Objectpublic java.lang.Object getValue()
getValue in interface ValueHolderInterfacepublic boolean isCoordinatedWithProperty()
isCoordinatedWithProperty in interface WeavedAttributeValueHolderInterfacepublic boolean isNewlyWeavedValueHolder()
isNewlyWeavedValueHolder in interface WeavedAttributeValueHolderInterfacepublic boolean isInstantiated()
isInstantiated in interface ValueHolderInterfacepublic void setIsCoordinatedWithProperty(boolean coordinated)
setIsCoordinatedWithProperty in interface WeavedAttributeValueHolderInterfacepublic void setIsNewlyWeavedValueHolder(boolean isNew)
setIsNewlyWeavedValueHolder in interface WeavedAttributeValueHolderInterfacepublic void setValue(java.lang.Object value)
setValue in interface ValueHolderInterfacepublic boolean shouldAllowInstantiationDeferral()
shouldAllowInstantiationDeferral in interface WeavedAttributeValueHolderInterfacepublic java.lang.String toString()
toString in class java.lang.Object