org.exolab.castor.mapping.handlers
Class TransientFieldHandler

java.lang.Object
  extended by org.exolab.castor.mapping.loader.FieldHandlerFriend
      extended by org.exolab.castor.mapping.ExtendedFieldHandler
          extended by org.exolab.castor.mapping.AbstractFieldHandler
              extended by org.exolab.castor.mapping.handlers.TransientFieldHandler
All Implemented Interfaces:
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

Author:
kvisco

Constructor Summary
TransientFieldHandler()
           
 
Method Summary
 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, 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
 

Constructor Detail

TransientFieldHandler

public TransientFieldHandler()
Method Detail

getValue

public java.lang.Object getValue(java.lang.Object target)
Description copied from class: AbstractFieldHandler
Returns the value of the field from the object.

Specified by:
getValue in interface FieldHandler
Specified by:
getValue in class AbstractFieldHandler
Parameters:
target - The object
Returns:
The value of the field

newInstance

public java.lang.Object newInstance(java.lang.Object target)
Description copied from class: AbstractFieldHandler
Creates a new instance of the object described by this field.

Specified by:
newInstance in interface FieldHandler
Specified by:
newInstance in class AbstractFieldHandler
Parameters:
target - The object for which the field is created
Returns:
A new instance of the field's value

newInstance

public java.lang.Object newInstance(java.lang.Object target,
                                    java.lang.Object[] args)
Description copied from class: AbstractFieldHandler
Creates a new instance of the object described by this field.

Specified by:
newInstance in class AbstractFieldHandler
Parameters:
target - The object for which the field is created
args - the set of constructor arguments
Returns:
A new instance of the field's value

setValue

public void setValue(java.lang.Object target,
                     java.lang.Object value)
Description copied from class: AbstractFieldHandler
Sets the value of the field on the object.

Specified by:
setValue in interface FieldHandler
Specified by:
setValue in class AbstractFieldHandler
Parameters:
target - The object
value - The new value

resetValue

public void resetValue(java.lang.Object target)
Description copied from class: AbstractFieldHandler
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 interface FieldHandler
Specified by:
resetValue in class AbstractFieldHandler
Parameters:
target - The object


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com