Class TransientFieldHandler
- java.lang.Object
-
- org.exolab.castor.mapping.loader.FieldHandlerFriend
-
- org.exolab.castor.mapping.ExtendedFieldHandler
-
- org.exolab.castor.mapping.AbstractFieldHandler
-
- org.exolab.castor.mapping.handlers.TransientFieldHandler
-
- All Implemented Interfaces:
ConfigurableFieldHandler
,FieldHandler
public class TransientFieldHandler extends AbstractFieldHandler
A dummy FieldHandler for "transient" fields. This allows us to create a FieldDescriptor, but not use a real FieldHandler- Version:
- $Revision: 6231 $ $Date: 2005-01-17 14:35:07 -0700 (Mon, 17 Jan 2005) $
- Author:
- kvisco
-
-
Field Summary
-
Fields inherited from class org.exolab.castor.mapping.AbstractFieldHandler
_properties
-
-
Constructor Summary
Constructors Constructor Description TransientFieldHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValue(java.lang.Object target)
Returns the value of the field from the object.java.lang.Object
newInstance(java.lang.Object target)
Creates a new instance of the object described by this field.java.lang.Object
newInstance(java.lang.Object target, java.lang.Object[] args)
Creates a new instance of the object described by this field.void
resetValue(java.lang.Object target)
Sets the value of the field to a default value.void
setValue(java.lang.Object target, java.lang.Object value)
Sets the value of the field on the object.-
Methods inherited from class org.exolab.castor.mapping.AbstractFieldHandler
getFieldDescriptor, hasValue, setConfiguration, setFieldDescriptor
-
Methods inherited from class org.exolab.castor.mapping.ExtendedFieldHandler
checkValidity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.exolab.castor.mapping.FieldHandler
checkValidity
-
-
-
-
Method Detail
-
getValue
public java.lang.Object getValue(java.lang.Object target)
Description copied from class:FieldHandlerFriend
Returns the value of the field from the object.- Specified by:
getValue
in interfaceFieldHandler
- Specified by:
getValue
in classFieldHandlerFriend
- Parameters:
target
- The object- Returns:
- The value of the field
- See Also:
FieldHandler.getValue(java.lang.Object)
-
newInstance
public java.lang.Object newInstance(java.lang.Object target)
Description copied from class:FieldHandlerFriend
Creates a new instance of the object described by this field.- Specified by:
newInstance
in interfaceFieldHandler
- Specified by:
newInstance
in classFieldHandlerFriend
- Parameters:
target
- The object for which the field is created- Returns:
- A new instance of the field's value
- See Also:
FieldHandler.newInstance(java.lang.Object)
-
newInstance
public java.lang.Object newInstance(java.lang.Object target, java.lang.Object[] args)
Description copied from class:ExtendedFieldHandler
Creates a new instance of the object described by this field.- Specified by:
newInstance
in classExtendedFieldHandler
- Parameters:
target
- The object for which the field is createdargs
- the set of constructor arguments- Returns:
- A new instance of the field's value
- See Also:
ExtendedFieldHandler.newInstance(java.lang.Object, java.lang.Object[])
-
setValue
public void setValue(java.lang.Object target, java.lang.Object value)
Description copied from class:FieldHandlerFriend
Sets the value of the field on the object.- Specified by:
setValue
in interfaceFieldHandler
- Specified by:
setValue
in classFieldHandlerFriend
- Parameters:
target
- The objectvalue
- The new value- See Also:
FieldHandler.setValue(java.lang.Object, java.lang.Object)
-
resetValue
public void resetValue(java.lang.Object target)
Description copied from class:FieldHandlerFriend
Sets the value of the field to a default value.Reference fields are set to null, primitive fields are set to their default value, collection fields are emptied of all elements.
- Specified by:
resetValue
in interfaceFieldHandler
- Specified by:
resetValue
in classFieldHandlerFriend
- Parameters:
target
- The object- See Also:
FieldHandler.resetValue(java.lang.Object)
-
-