Package org.apache.wicket.injection
Class NoopFieldValueFactory
- java.lang.Object
-
- org.apache.wicket.injection.NoopFieldValueFactory
-
- All Implemented Interfaces:
IFieldValueFactory
public class NoopFieldValueFactory extends Object implements IFieldValueFactory
Implementation of field value factory that ignores all fields- Author:
- Igor Vaynberg (ivaynberg)
-
-
Constructor Summary
Constructors Constructor Description NoopFieldValueFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getFieldValue(Field field, Object fieldOwner)
Returns the value the field will be set toboolean
supportsField(Field field)
Returns true if the factory can generate a value for the field, false otherwise.
-
-
-
Constructor Detail
-
NoopFieldValueFactory
public NoopFieldValueFactory()
-
-
Method Detail
-
getFieldValue
public Object getFieldValue(Field field, Object fieldOwner)
Description copied from interface:IFieldValueFactory
Returns the value the field will be set to- Specified by:
getFieldValue
in interfaceIFieldValueFactory
- Parameters:
field
- field being injectedfieldOwner
- instance of object being injected- Returns:
- new field value
- See Also:
IFieldValueFactory.getFieldValue(java.lang.reflect.Field, java.lang.Object)
-
supportsField
public boolean supportsField(Field field)
Description copied from interface:IFieldValueFactory
Returns true if the factory can generate a value for the field, false otherwise. If this method returns false, getFieldValue() will not be called on this factory- Specified by:
supportsField
in interfaceIFieldValueFactory
- Parameters:
field
- field- Returns:
- true if the factory can generate a value for the field, false otherwise
- See Also:
IFieldValueFactory.supportsField(java.lang.reflect.Field)
-
-