Package net.sf.jguiraffe.gui.forms.bind
Class DummyBindingStrategy
- java.lang.Object
-
- net.sf.jguiraffe.gui.forms.bind.DummyBindingStrategy
-
- All Implemented Interfaces:
BindingStrategy
public final class DummyBindingStrategy extends Object implements BindingStrategy
A dummy implementation of the
BindingStrategy
interface.This strategy can be used when no specific (functional)
BindingStrategy
implementation is available or is needed (for instance as an application of the null object pattern). All methods are implemented as dummies that do not provide any specific functionality - refer to the documentation of the single methods for more details.It is not possible to create instances of this class. Instead the static
INSTANCE
field can be used. This instance can be shared between multiple threads.- Version:
- $Id: DummyBindingStrategy.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Field Summary
Fields Modifier and Type Field Description static DummyBindingStrategy
INSTANCE
Constant for the shared instance of this class that can be used.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
readProperty(Object model, String propertyName)
Reads a property from the given model object.void
writeProperty(Object model, String propertyName, Object value)
Writes a property of the given model object.
-
-
-
Field Detail
-
INSTANCE
public static final DummyBindingStrategy INSTANCE
Constant for the shared instance of this class that can be used.
-
-
Method Detail
-
readProperty
public Object readProperty(Object model, String propertyName)
Reads a property from the given model object. This is just a dummy implementation that returns always null.- Specified by:
readProperty
in interfaceBindingStrategy
- Parameters:
model
- the model objectpropertyName
- the name of the property- Returns:
- the value of this property
-
writeProperty
public void writeProperty(Object model, String propertyName, Object value)
Writes a property of the given model object. This is just a dummy implementation. No property is actually written.- Specified by:
writeProperty
in interfaceBindingStrategy
- Parameters:
model
- the model objectpropertyName
- the name of the propertyvalue
- the value of the property
-
-