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, setInternalObjectaddEquivalentKey, 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, valueChangedpublic 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 ObjectValuepublic Object configure(Object obj, Configuration conf, boolean fatal)
configure in class ObjectValuepublic void set(Object obj, boolean derived)
ObjectValueset in class ObjectValuederived - if true, this value was derived from other propertiespublic String getString()
Valuepublic void setString(String str)
ValueoriginalString 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()
ValuegetValueType in class ObjectValueprotected void objectChanged()
ObjectValueobjectChanged in class ObjectValueprotected String getInternalString()
ValuegetInternalString in class ObjectValueprotected void setInternalString(String str)
ValuesetInternalString in class ObjectValueCopyright © 2006–2022 Apache Software Foundation. All rights reserved.