|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.lib.conf.Value
public abstract class Value
A configuration value.
Constructor Summary | |
---|---|
Value()
Default constructor. |
|
Value(java.lang.String prop)
Constructor. |
Method Summary | |
---|---|
void |
addListener(ValueListener listener)
Listener for value changes. |
java.lang.String |
alias(java.lang.String str)
Alias the given setting. |
protected java.lang.String |
alias(java.lang.String str,
java.lang.String[] aliases,
boolean nullNotFound)
Alias the given setting. |
protected void |
assertChangeable()
Asserts if this receiver can be changed. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object other)
Use original value instead of
current value because they are one and the same
for non-dynamic Values and ensures that modifying dynamic Values do not
impact equality or hashCode contract. |
java.lang.String[] |
getAliases()
Aliases for the value in the form key1, value1, key2, value2, ... |
java.lang.String |
getDefault()
The default value for the property as a string. |
java.lang.String |
getInstantiatingGetter()
The name of the getter method for the instantiated value of this property(as opposed to the string value) |
protected abstract java.lang.String |
getInternalString()
Return the internal string form of this value. |
java.util.List<ValueListener> |
getListeners()
Gets unmodifable list of listeners for value changes. |
java.lang.String |
getLoadKey()
The key under which this value was loaded, or null. |
java.lang.String |
getOriginalValue()
Gets the original value. |
java.lang.String |
getProperty()
The property name that will be used when setting or getting this value in a Map . |
java.lang.Class |
getScope()
A class defining the scope in which this value is defined. |
java.lang.String |
getString()
Return a stringified version of this value. |
abstract java.lang.Class |
getValueType()
Returns the type of the property that this Value represents. |
int |
hashCode()
Use original value instead of
current value because they are one and the same
for non-dynamic Values and ensures that modifying dynamic Values do not
impact equality or hashCode contract. |
boolean |
isAliasListComprehensive()
Whether or not the alias list defines all possible settings for this value. |
boolean |
isDynamic()
Affirms if this receiver can be mutated even when the configuration it belongs to has been frozen . |
void |
removeListener(ValueListener listener)
|
void |
setAlias(java.lang.String key,
java.lang.String value)
Replaces an existing alias, or adds the given alias to the front of the alias list if it does not already exist. |
protected java.lang.String[] |
setAlias(java.lang.String key,
java.lang.String value,
java.lang.String[] aliases)
Set an alias into a current alias list, returning the new list. |
void |
setAliases(java.lang.String[] aliases)
Aliases for the value in the form key1, value1, key2, value2, ... |
void |
setAliasListComprehensive(boolean aliasListIsComprehensive)
Whether or not the alias list defines all possible settings for this value. |
void |
setDefault(java.lang.String def)
The default value for the propert as a string. |
void |
setDynamic(boolean flag)
Sets if this receiver can be mutated even when the configuration it belongs to has been frozen . |
void |
setInstantiatingGetter(java.lang.String getter)
The name of the getter method for the instantiated value of this property(as opposed to the string value). |
protected abstract void |
setInternalObject(java.lang.Object obj)
Set this value from an object. |
protected abstract void |
setInternalString(java.lang.String str)
Set this value from the given string. |
void |
setLoadKey(java.lang.String loadKey)
The key under which this value was loaded, or null. |
void |
setObject(java.lang.Object obj)
Set this value as an object. |
void |
setProperty(java.lang.String prop)
The property name that will be used when setting or getting this value in a Map . |
void |
setScope(java.lang.Class cls)
A class defining the scope in which this value is defined. |
void |
setString(java.lang.String val)
Set this value from the given string. |
java.lang.String |
unalias(java.lang.String str)
Unalias the given setting. |
protected java.lang.String |
unalias(java.lang.String str,
java.lang.String[] aliases,
boolean nullNotFound)
Unalias the given setting. |
void |
valueChanged()
Subclasses should call this method when their internal value changes. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Value()
public Value(java.lang.String prop)
setProperty(java.lang.String)
Method Detail |
---|
public java.lang.String getProperty()
Map
.
public void setProperty(java.lang.String prop)
Map
.
public java.lang.String getLoadKey()
public void setLoadKey(java.lang.String loadKey)
public java.lang.String[] getAliases()
public void setAliases(java.lang.String[] aliases)
To avoid potential side-effects, this method copies the array passed in.
public void setAlias(java.lang.String key, java.lang.String value)
protected java.lang.String[] setAlias(java.lang.String key, java.lang.String value, java.lang.String[] aliases)
public boolean isAliasListComprehensive()
public void setAliasListComprehensive(boolean aliasListIsComprehensive)
public java.lang.String alias(java.lang.String str)
protected java.lang.String alias(java.lang.String str, java.lang.String[] aliases, boolean nullNotFound)
public java.lang.String unalias(java.lang.String str)
protected java.lang.String unalias(java.lang.String str, java.lang.String[] aliases, boolean nullNotFound)
public java.lang.String getDefault()
public void setDefault(java.lang.String def)
public java.lang.String getInstantiatingGetter()
public void setInstantiatingGetter(java.lang.String getter)
this.
, then the getter will be looked up on the value
instance itself. Otherwise, the getter will be looked up on the
configuration instance.
public java.lang.Class getScope()
public void setScope(java.lang.Class cls)
public java.lang.String getString()
public void setString(java.lang.String val)
originalString
being null), then the
value is remembered as original. This original value is used
for equality and hashCode computation if this Value is
dynamic
.
public void setObject(java.lang.Object obj)
originalString
being null), then the
value is remembered as original. This original value is used
for equality and hashCode computation if this Value is
dynamic
.
public java.lang.String getOriginalValue()
public abstract java.lang.Class getValueType()
protected abstract java.lang.String getInternalString()
protected abstract void setInternalString(java.lang.String str)
protected abstract void setInternalObject(java.lang.Object obj)
public java.util.List<ValueListener> getListeners()
public void addListener(ValueListener listener)
public void removeListener(ValueListener listener)
public void valueChanged()
protected void assertChangeable()
public void setDynamic(boolean flag)
frozen
.
public boolean isDynamic()
frozen
.
public int hashCode()
original value
instead of
current value
because they are one and the same
for non-dynamic Values and ensures that modifying dynamic Values do not
impact equality or hashCode contract.
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
original value
instead of
current value
because they are one and the same
for non-dynamic Values and ensures that modifying dynamic Values do not
impact equality or hashCode contract.
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |