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(String prop,
boolean singleton) |
Modifier and Type | Method and Description |
---|---|
Object |
configure(Object obj,
Configuration conf,
boolean fatal)
Configure the given object.
|
String |
getClassName()
The plugin class name.
|
protected String |
getInternalString()
Return the internal string form of this value.
|
String |
getProperties()
The plugin properties.
|
String |
getString()
Return a stringified version of this value.
|
Class<Object> |
getValueType()
Returns the type of the property that this Value represents.
|
Object |
instantiate(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(Object obj,
boolean derived)
The internal value.
|
void |
setClassName(String name)
The plugin class name.
|
protected void |
setInternalString(String str)
Set this value from the given string.
|
void |
setProperties(String props)
The plugin properties.
|
void |
setString(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 PluginValue(String prop, boolean singleton)
public boolean isSingleton()
public String getClassName()
public void setClassName(String name)
public String getProperties()
public void setProperties(String props)
public Object instantiate(Class<?> type, Configuration conf, boolean fatal)
instantiate
in class ObjectValue
public Object configure(Object obj, Configuration conf, boolean fatal)
configure
in class ObjectValue
public void set(Object obj, boolean derived)
ObjectValue
set
in class ObjectValue
derived
- if true, this value was derived from other propertiespublic String getString()
Value
public void setString(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 Class<Object> getValueType()
Value
getValueType
in class ObjectValue
protected void objectChanged()
ObjectValue
objectChanged
in class ObjectValue
protected String getInternalString()
Value
getInternalString
in class ObjectValue
protected void setInternalString(String str)
Value
setInternalString
in class ObjectValue
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.