org.glassfish.pfl.dynamic.copyobject.spi
Interface ObjectCopier

All Known Implementing Classes:
FallbackObjectCopierImpl, JavaStreamObjectCopierImpl, ObjectCopierImpl

public interface ObjectCopier

Provides an interface for a variety of means to copy an arbitrary object. Any implementation of this interface must return an exact copy of obj, preserving all aliasing across all objects reachable from obj. ReflectiveCopyException must be thrown if the implementation cannot copy obj for some reason. Note that a trivial implementation of this interface is possible (always return obj), but this is often not the desired implementation.


Method Summary
 Object copy(Object obj)
          copy the object.
 

Method Detail

copy

Object copy(Object obj)
            throws ReflectiveCopyException
copy the object. Equivalent to copy( obj, false ).

Throws:
ReflectiveCopyException


Copyright © 2013 Oracle. All Rights Reserved.