Example usage for java.lang Object clone

List of usage examples for java.lang Object clone

Introduction

In this page you can find the example usage for java.lang Object clone.

Prototype

@HotSpotIntrinsicCandidate
protected native Object clone() throws CloneNotSupportedException;

Source Link

Document

Creates and returns a copy of this object.

Usage

From source file:org.orekit.errors.OrekitException.java

/** Simple constructor.
 * Build an exception from a cause and with a translated and formatted message
 * @param cause underlying cause//from  www .  j  av  a 2  s .c o m
 * @param specifier format specifier (to be translated)
 * @param parts parts to insert in the format (no translation)
 */
public OrekitException(final Throwable cause, final Localizable specifier, final Object... parts) {
    super(cause);
    this.context = null;
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}

From source file:org.osk.errors.OskException.java

/** Simple constructor.
 * Build an exception with a translated and formatted message
 * @param specifier format specifier (to be translated)
 * @param parts parts to insert in the format (no translation)
 *//*from w ww.java  2  s  .  c  o  m*/
public OskException(final Localizable specifier, final Object... parts) {
    this.context = null;
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}

From source file:org.osk.errors.OskException.java

/** Simple constructor.
 * Build an exception from a cause and with a translated and formatted message
 * @param cause underlying cause/*  w w  w . j a va2 s  . c o m*/
 * @param specifier format specifier (to be translated)
 * @param parts parts to insert in the format (no translation)
 */
public OskException(final Throwable cause, final Localizable specifier, final Object... parts) {
    super(cause);
    this.context = null;
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}

From source file:com.examples.with.different.packagename.concolic.MathRuntimeException.java

/**
 * Constructs a new <code>MathRuntimeException</code> with specified
 * formatted detail message./*from w  w  w  .ja v a2s.  c o  m*/
 * Message formatting is delegated to {@link java.text.MessageFormat}.
 * @param pattern format specifier
 * @param arguments format arguments
 */
public MathRuntimeException(final String pattern, final Object... arguments) {
    super(buildMessage(Locale.US, pattern, arguments));
    this.pattern = pattern;
    this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
}

From source file:org.apache.openejb.math.MathRuntimeException.java

/**
 * Constructs a new <code>MathRuntimeException</code> with specified
 * formatted detail message./* ww w .ja v  a  2  s. co m*/
 * Message formatting is delegated to {@link MessageFormat}.
 *
 * @param pattern   format specifier
 * @param arguments format arguments
 */
public MathRuntimeException(final String pattern, final Object... arguments) {
    this.pattern = pattern;
    this.arguments = arguments == null ? new Object[0] : arguments.clone();
}

From source file:com.examples.with.different.packagename.concolic.MathRuntimeException.java

/**
 * Constructs a new <code>MathRuntimeException</code> with specified
 * formatted detail message and nested <code>Throwable</code> root cause.
 * Message formatting is delegated to {@link java.text.MessageFormat}.
 * @param rootCause the exception or error that caused this exception
 * to be thrown./*from   w  w w.  j a va  2s. c  om*/
 * @param pattern format specifier
 * @param arguments format arguments
 */
public MathRuntimeException(final Throwable rootCause, final String pattern, final Object... arguments) {
    super(buildMessage(Locale.US, pattern, arguments), rootCause);
    this.pattern = pattern;
    this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
}

From source file:org.elasticsearch.common.math.MathRuntimeException.java

/**
 * Constructs a new <code>MathRuntimeException</code> with specified
 * formatted detail message.// w  w w.ja  v a2  s . c  om
 * Message formatting is delegated to {@link java.text.MessageFormat}.
 *
 * @param pattern   format specifier
 * @param arguments format arguments
 */
public MathRuntimeException(final String pattern, final Object... arguments) {
    this.pattern = pattern;
    this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
}

From source file:org.apache.openejb.math.MathRuntimeException.java

/**
 * Constructs a new <code>MathRuntimeException</code> with specified
 * formatted detail message and nested <code>Throwable</code> root cause.
 * Message formatting is delegated to {@link MessageFormat}.
 *
 * @param rootCause the exception or error that caused this exception
 *                  to be thrown./*  www.jav  a  2  s  .  c  o m*/
 * @param pattern   format specifier
 * @param arguments format arguments
 */
public MathRuntimeException(final Throwable rootCause, final String pattern, final Object... arguments) {
    super(rootCause);
    this.pattern = pattern;
    this.arguments = arguments == null ? new Object[0] : arguments.clone();
}

From source file:org.elasticsearch.common.math.MathRuntimeException.java

/**
 * Constructs a new <code>MathRuntimeException</code> with specified
 * formatted detail message and nested <code>Throwable</code> root cause.
 * Message formatting is delegated to {@link java.text.MessageFormat}.
 *
 * @param rootCause the exception or error that caused this exception
 *                  to be thrown./*from  ww  w.  ja  v  a 2s .c  o  m*/
 * @param pattern   format specifier
 * @param arguments format arguments
 */
public MathRuntimeException(final Throwable rootCause, final String pattern, final Object... arguments) {
    super(rootCause);
    this.pattern = pattern;
    this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
}

From source file:com.gh.bmd.jrt.android.v4.core.DefaultObjectContextRoutineBuilder.java

@Nonnull
public ObjectContextRoutineBuilder withArgs(@Nullable final Object... args) {

    mArgs = (args == null) ? Reflection.NO_ARGS : args.clone();
    return this;
}