org.glassfish.pfl.dynamic.copyobject.impl
Class FallbackObjectCopierImpl

java.lang.Object
  extended by org.glassfish.pfl.basic.contain.Pair<ObjectCopier,ObjectCopier>
      extended by org.glassfish.pfl.dynamic.copyobject.impl.FallbackObjectCopierImpl
All Implemented Interfaces:
ObjectCopier

public class FallbackObjectCopierImpl
extends org.glassfish.pfl.basic.contain.Pair<ObjectCopier,ObjectCopier>
implements ObjectCopier

Trys a first ObjectCopier. If the first throws a ReflectiveCopyException, falls back and tries a second ObjectCopier.


Field Summary
 
Fields inherited from class org.glassfish.pfl.basic.contain.Pair
_first, _second
 
Constructor Summary
FallbackObjectCopierImpl(ObjectCopier first, ObjectCopier second)
           
 
Method Summary
 Object copy(Object src)
          copy the object.
 
Methods inherited from class org.glassfish.pfl.basic.contain.Pair
equals, first, hashCode, second, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FallbackObjectCopierImpl

public FallbackObjectCopierImpl(ObjectCopier first,
                                ObjectCopier second)
Method Detail

copy

public Object copy(Object src)
            throws ReflectiveCopyException
Description copied from interface: ObjectCopier
copy the object. Equivalent to copy( obj, false ).

Specified by:
copy in interface ObjectCopier
Throws:
ReflectiveCopyException


Copyright © 2013 Oracle. All Rights Reserved.