public abstract class AbstractBinding extends java.lang.Object implements IBinding
IBinding
implementations.Modifier | Constructor and Description |
---|---|
protected |
AbstractBinding(java.lang.String description,
ValueConverter valueConverter,
org.apache.hivemind.Location location) |
Modifier and Type | Method and Description |
---|---|
protected BindingException |
createReadOnlyBindingException(IBinding binding) |
protected void |
extendDescription(java.lang.StringBuffer buffer)
Does nothing, subclasses may override to add additional information.
|
java.lang.Object |
getComponent()
Returns the component to which this binding is connected; this is currently only used when
building certain exceptions.
|
java.lang.String |
getDescription()
Returns a description of how the binding is used; this description
is localized and incorporated into some exception messages.
|
org.apache.hivemind.Location |
getLocation() |
java.lang.Object |
getObject(java.lang.Class type)
Returns the value for the binding after performing some basic checks.
|
ValueConverter |
getValueConverter() |
boolean |
isInvariant()
Default implementation: returns true.
|
void |
setObject(java.lang.Object value)
Overridden in subclasses that are not invariant.
|
java.lang.String |
toString() |
protected AbstractBinding(java.lang.String description, ValueConverter valueConverter, org.apache.hivemind.Location location)
public org.apache.hivemind.Location getLocation()
getLocation
in interface org.apache.hivemind.Locatable
public void setObject(java.lang.Object value)
public boolean isInvariant()
isInvariant
in interface IBinding
public java.lang.Object getObject(java.lang.Class type)
IBinding
Note: In release 4.0, the parameterName parameter was removed.
public java.lang.Object getComponent()
protected BindingException createReadOnlyBindingException(IBinding binding)
public java.lang.String getDescription()
IBinding
getDescription
in interface IBinding
public ValueConverter getValueConverter()
public java.lang.String toString()
toString
in class java.lang.Object
protected void extendDescription(java.lang.StringBuffer buffer)