Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 public class CU_Sample implements Cloneable {
 
     public Object clone() throws CloneNotSupportedException {
         return super.clone();
     }
 
     class CU_FP implements Cloneable {
     	@Override
        public CU_FP clone() {
            try {
                return (CU_FPsuper.clone();
            } catch (CloneNotSupportedException cnse) {
                throw new Error("Won't happen");
            }
        }
    }
    class Unrelated implements Cloneable {
    	@Override
        public String clone() {
            try {
                return (Stringsuper.clone();
            } catch (CloneNotSupportedException cnse) {
                throw new Error("Won't happen");
            }
        }
    }
    class FPCloneInterface implements CloneableRunnable {
    	@Override
        public Runnable clone() {
            try {
                return (Runnablesuper.clone();
            } catch (CloneNotSupportedException cnse) {
                throw new Error("Won't happen");
            }
        }
    	@Override
        public void run() {
        }
    }
    class FPActuallyThrow implements Cloneable {
    	@Override
        public FPActuallyThrow clone() throws CloneNotSupportedException {
            throw new CloneNotSupportedException("Silly");
        }
    }
New to GrepCode? Check out our FAQ X