List of usage examples for java.lang CloneNotSupportedException CloneNotSupportedException
public CloneNotSupportedException()
CloneNotSupportedException
with no detail message. From source file:org.marketcetera.util.except.ExceptUtilsTest.java
@Test public void wrap() { wrapHelper(new CloneNotSupportedException(), false); wrapHelper(new InterruptedException(), true); wrapHelper(new InterruptedIOException(), true); wrapHelper(new ClosedByInterruptException(), true); wrapHelper(new FileLockInterruptionException(), true); wrapHelper(new InterruptedNamingException(), true); wrapHelper(new I18NInterruptedException(), true); wrapHelper(new I18NInterruptedRuntimeException(), true); }
From source file:net.yorch.android.V3SDK.java
/** * Not permit clone the instance// w w w .j a va 2 s.c om */ public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
From source file:com.antsdb.saltedfish.util.UberUtil.java
@SuppressWarnings("unchecked") public static <T> T clone(final T obj) throws CloneNotSupportedException { if (obj == null) { return null; }// w ww . j av a 2s . c om if (obj instanceof Cloneable) { Class<?> clazz = obj.getClass(); Method m; try { m = clazz.getMethod("clone", (Class[]) null); } catch (NoSuchMethodException ex) { throw new NoSuchMethodError(ex.getMessage()); } try { return (T) m.invoke(obj, (Object[]) null); } catch (InvocationTargetException ex) { Throwable cause = ex.getCause(); if (cause instanceof CloneNotSupportedException) { throw ((CloneNotSupportedException) cause); } else { throw new Error("Unexpected exception", cause); } } catch (IllegalAccessException ex) { throw new IllegalAccessError(ex.getMessage()); } } else { throw new CloneNotSupportedException(); } }
From source file:com.ibm.bi.dml.runtime.functionobjects.Builtin.java
public Object clone() throws CloneNotSupportedException { // cloning is not supported for singleton classes throw new CloneNotSupportedException(); }
From source file:net.jradius.session.JRadiusSessionManager.java
public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
From source file:com.ibm.xsp.webdav.WebDavManager.java
/** * (non-Javadoc)/* w w w .j ava2 s .com*/ * * @see java.lang.Object#clone() */ @Override protected Object clone() throws CloneNotSupportedException { // Singletons must NOT be cloned throw new CloneNotSupportedException(); }
From source file:org.apache.openjpa.kernel.BrokerImpl.java
public Object clone() throws CloneNotSupportedException { if (_initializeWasInvoked) throw new CloneNotSupportedException(); else {/*from w ww .j a va 2s.c o m*/ return super.clone(); } }
From source file:net.sf.maltcms.chromaui.charts.FastHeatMapPlot.java
/** * Returns a clone of the plot.//from w w w . ja va2 s. c o m * * @return A clone. * * @throws CloneNotSupportedException if some component of the plot does not * support cloning. */ @Override public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); // FastHeatmapPlot clone = (FastHeatmapPlot) super.clone(); // if (this.dataImage != null) { // // clone.dataImage = this.dataImage. // } // if (this.domainAxis != null) { // clone.domainAxis = (ValueAxis) this.domainAxis.clone(); // clone.domainAxis.setPlot(clone); // clone.domainAxis.addChangeListener(clone); // } // if (this.rangeAxis != null) { // clone.rangeAxis = (ValueAxis) this.rangeAxis.clone(); // clone.rangeAxis.setPlot(clone); // clone.rangeAxis.addChangeListener(clone); // } // return clone; }
From source file:com.gdo.servlet.RpcWrapper.java
@Override public Object clone() throws CloneNotSupportedException { throw new CloneNotSupportedException(); }
From source file:org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.java
@Override public POCast clone() throws CloneNotSupportedException { POCast clone = new POCast( new OperatorKey(mKey.scope, NodeIdGenerator.getGenerator().getNextNodeId(mKey.scope))); clone.cloneHelper(this); clone.funcSpec = funcSpec;/*from w w w.ja v a 2 s . c om*/ clone.fieldSchema = fieldSchema; try { clone.instantiateFunc(); } catch (IOException e) { CloneNotSupportedException cnse = new CloneNotSupportedException(); cnse.initCause(e); throw cnse; } return clone; }