001package org.jadira.reflection.cloning.api;
002
003import java.util.IdentityHashMap;
004
005/**
006 * This class is a placeholder to indicate the lack of CloneImplementor capability.
007 * It is default CloneImplementor implementation for @Cloneable instances 
008 */
009public class NoCloneImplementor implements CloneImplementor {
010
011        @Override
012        public <T> T newInstance(Class<T> c) {
013                throw new UnsupportedOperationException("Should not be invoked");
014        }
015
016        @Override
017        public boolean canClone(Class<?> clazz) {
018                throw new UnsupportedOperationException("Should not be invoked");
019        }
020
021        @Override
022        public <T> T clone(T obj, CloneDriver context,
023                        IdentityHashMap<Object, Object> referencesToReuse, long stackDepth) {
024                throw new UnsupportedOperationException("Should not be invoked");
025        }
026}