com.threerings.util
Class DeepUtil.ReflectiveObjectHandler

java.lang.Object
  extended by com.threerings.util.DeepUtil.ObjectHandler<Object>
      extended by com.threerings.util.DeepUtil.ReflectiveObjectHandler
Enclosing class:
DeepUtil

protected static class DeepUtil.ReflectiveObjectHandler
extends DeepUtil.ObjectHandler<Object>

Handles an object according to its reflected fields.


Field Summary
protected  Field[] _fields
          The fields to copy and compare.
protected  DeepUtil.FieldHandler[] _handlers
          The handlers for each field.
 
Constructor Summary
DeepUtil.ReflectiveObjectHandler(Class<?> clazz)
           
 
Method Summary
 Object copy(Object source, Object dest, Object outer)
          Performs a deep copy from source to dest.
 boolean equals(Object o1, Object o2)
          Compares two objects for equality.
 int hashCode(Object object)
          Computes the hash code of an object's fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_fields

protected Field[] _fields
The fields to copy and compare.


_handlers

protected DeepUtil.FieldHandler[] _handlers
The handlers for each field.

Constructor Detail

DeepUtil.ReflectiveObjectHandler

public DeepUtil.ReflectiveObjectHandler(Class<?> clazz)
Method Detail

copy

public Object copy(Object source,
                   Object dest,
                   Object outer)
            throws IllegalAccessException
Description copied from class: DeepUtil.ObjectHandler
Performs a deep copy from source to dest.

Specified by:
copy in class DeepUtil.ObjectHandler<Object>
Throws:
IllegalAccessException

equals

public boolean equals(Object o1,
                      Object o2)
               throws IllegalAccessException
Description copied from class: DeepUtil.ObjectHandler
Compares two objects for equality.

Specified by:
equals in class DeepUtil.ObjectHandler<Object>
Throws:
IllegalAccessException

hashCode

public int hashCode(Object object)
             throws IllegalAccessException
Computes the hash code of an object's fields.

Specified by:
hashCode in class DeepUtil.ObjectHandler<Object>
Throws:
IllegalAccessException