public class PluginValue extends ObjectValue
Value
consisting of plugin name and properties.
Plugins should be specified in the form:<plugin-name>(<prop1>=<val1>, ...)
<plugin-name>
<prop1>=<val1> ...
Defaults and aliases on plugin values apply only to the plugin name.Constructor and Description |
---|
PluginValue(java.lang.String prop,
boolean singleton) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
configure(java.lang.Object obj,
Configuration conf,
boolean fatal)
Configure the given object.
|
java.lang.String |
getClassName()
The plugin class name.
|
protected java.lang.String |
getInternalString()
Return the internal string form of this value.
|
java.lang.String |
getProperties()
The plugin properties.
|
java.lang.String |
getString()
Return a stringified version of this value.
|
java.lang.Class<java.lang.Object> |
getValueType()
Returns the type of the property that this Value represents.
|
java.lang.Object |
instantiate(java.lang.Class<?> type,
Configuration conf,
boolean fatal)
Instantiate the plugin as an instance of the given class.
|
boolean |
isSingleton()
Whether this value is a singleton.
|
protected void |
objectChanged()
Implement this method to synchronize internal data with the new
object value.
|
void |
set(java.lang.Object obj,
boolean derived)
The internal value.
|
void |
setClassName(java.lang.String name)
The plugin class name.
|
protected void |
setInternalString(java.lang.String str)
Set this value from the given string.
|
void |
setProperties(java.lang.String props)
The plugin properties.
|
void |
setString(java.lang.String str)
Set this value from the given string.
|
configure, get, instantiate, newInstance, set, setInternalObject
addEquivalentKey, addListener, alias, alias, assertChangeable, clone, equals, getAliases, getDefault, getEquivalentKeys, getInstantiatingGetter, getListeners, getLoadKey, getOriginalValue, getProperty, getPropertyKeys, getScope, hashCode, hide, isAliasListComprehensive, isDynamic, isHidden, isPrivate, makePrivate, matches, removeListener, setAlias, setAlias, setAliases, setAliasListComprehensive, setDefault, setDynamic, setInstantiatingGetter, setLoadKey, setObject, setProperty, setScope, toString, unalias, unalias, valueChanged
public boolean isSingleton()
public java.lang.String getClassName()
public void setClassName(java.lang.String name)
public java.lang.String getProperties()
public void setProperties(java.lang.String props)
public java.lang.Object instantiate(java.lang.Class<?> type, Configuration conf, boolean fatal)
instantiate
in class ObjectValue
public java.lang.Object configure(java.lang.Object obj, Configuration conf, boolean fatal)
configure
in class ObjectValue
public void set(java.lang.Object obj, boolean derived)
ObjectValue
set
in class ObjectValue
derived
- if true, this value was derived from other propertiespublic java.lang.String getString()
Value
public void setString(java.lang.String str)
Value
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.Class<java.lang.Object> getValueType()
Value
getValueType
in class ObjectValue
protected void objectChanged()
ObjectValue
objectChanged
in class ObjectValue
protected java.lang.String getInternalString()
Value
getInternalString
in class ObjectValue
protected void setInternalString(java.lang.String str)
Value
setInternalString
in class ObjectValue