Package org.apache.openjpa.lib.conf
Class ObjectValue
- java.lang.Object
-
- org.apache.openjpa.lib.conf.Value
-
- org.apache.openjpa.lib.conf.ObjectValue
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
PluginListValue
,PluginValue
,SpecificationPlugin
public class ObjectValue extends Value
An objectValue
.- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description ObjectValue(java.lang.String prop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
configure(java.lang.Object obj, Configuration conf)
Configure the given object.java.lang.Object
configure(java.lang.Object obj, Configuration conf, boolean fatal)
Configure the given object.java.lang.Object
get()
The internal value.protected java.lang.String
getInternalString()
Return the internal string form of this value.java.lang.Class<?>
getValueType()
Returns the type of the property that this Value represents.java.lang.Object
instantiate(java.lang.Class<?> type, Configuration conf)
Instantiate the object as an instance of the given class.java.lang.Object
instantiate(java.lang.Class<?> type, Configuration conf, boolean fatal)
Instantiate the object as an instance of the given class.java.lang.Object
newInstance(java.lang.String clsName, java.lang.Class<?> type, Configuration conf, boolean fatal)
Allow subclasses to instantiate additional plugins.protected void
objectChanged()
Implement this method to synchronize internal data with the new object value.void
set(java.lang.Object obj)
The internal value.void
set(java.lang.Object obj, boolean derived)
The internal value.protected void
setInternalObject(java.lang.Object obj)
Set this value from an object.protected void
setInternalString(java.lang.String str)
Set this value from the given string.-
Methods inherited from class org.apache.openjpa.lib.conf.Value
addEquivalentKey, addListener, alias, alias, assertChangeable, clone, equals, getAliases, getDefault, getEquivalentKeys, getInstantiatingGetter, getListeners, getLoadKey, getOriginalValue, getProperty, getPropertyKeys, getScope, getString, hashCode, hide, isAliasListComprehensive, isDynamic, isHidden, isPrivate, makePrivate, matches, removeListener, setAlias, setAlias, setAliases, setAliasListComprehensive, setDefault, setDynamic, setInstantiatingGetter, setLoadKey, setObject, setProperty, setScope, setString, toString, unalias, unalias, valueChanged
-
-
-
-
Method Detail
-
set
public void set(java.lang.Object obj)
The internal value.
-
set
public void set(java.lang.Object obj, boolean derived)
The internal value.- Parameters:
derived
- if true, this value was derived from other properties
-
instantiate
public java.lang.Object instantiate(java.lang.Class<?> type, Configuration conf)
Instantiate the object as an instance of the given class. Equivalent toinstantiate(type, conf, true)
.
-
instantiate
public java.lang.Object instantiate(java.lang.Class<?> type, Configuration conf, boolean fatal)
Instantiate the object as an instance of the given class.
-
configure
public java.lang.Object configure(java.lang.Object obj, Configuration conf)
Configure the given object.
-
configure
public java.lang.Object configure(java.lang.Object obj, Configuration conf, boolean fatal)
Configure the given object.
-
newInstance
public java.lang.Object newInstance(java.lang.String clsName, java.lang.Class<?> type, Configuration conf, boolean fatal)
Allow subclasses to instantiate additional plugins. This method does not perform configuration.
-
getValueType
public java.lang.Class<?> getValueType()
Description copied from class:Value
Returns the type of the property that this Value represents.- Specified by:
getValueType
in classValue
-
objectChanged
protected void objectChanged()
Implement this method to synchronize internal data with the new object value.
-
getInternalString
protected java.lang.String getInternalString()
Description copied from class:Value
Return the internal string form of this value.- Specified by:
getInternalString
in classValue
-
setInternalString
protected void setInternalString(java.lang.String str)
Description copied from class:Value
Set this value from the given string.- Specified by:
setInternalString
in classValue
-
setInternalObject
protected void setInternalObject(java.lang.Object obj)
Description copied from class:Value
Set this value from an object.- Specified by:
setInternalObject
in classValue
-
-