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:de.codecentric.boot.admin.web.PrefixHandlerMapping.java

public PrefixHandlerMapping(Object... handlers) {
    this.handlers = handlers.clone();
    setOrder(-50);
}

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

/** Create an exception with localized message.
 * @param specifier format specifier (to be translated)
 * @param parts parts to insert in the format (no translation)
 *//* ww  w .  jav a2 s  . c  o  m*/
public OrekitIllegalArgumentException(final Localizable specifier, final Object... parts) {
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}

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

/** Create an exception with localized message.
 * @param specifier format specifier (to be translated)
 * @param parts parts to insert in the format (no translation)
 *//* w  w w . j  av a 2s  . c  o m*/
public OrekitIllegalStateException(final Localizable specifier, final Object... parts) {
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}

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

/** Create an exception with localized message.
 * @param specifier format specifier (to be translated)
 * @param parts parts to insert in the format (no translation)
 *///from w  w  w .  j a va 2  s  .com
public OrekitParseException(final Localizable specifier, final Object... parts) {
    super("", 0);
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}

From source file:cz.jirutka.spring.data.jdbc.NoRecordUpdatedException.java

public NoRecordUpdatedException(String tableName, Object... id) {
    super(format("No record with id = {%s} exists in table %s", arrayToCommaDelimitedString(id), tableName));
    this.tableName = tableName;
    this.id = id.clone();
}

From source file:org.openspaces.core.internal.commons.math.MathException.java

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

From source file:com.flexive.shared.exceptions.FxExceptionMessage.java

/**
 * Ctor//from ww w .  j  a va 2 s  .  c  om
 *
 * @param key    resource key
 * @param values optional values for placeholders in key ({x})
 */
public FxExceptionMessage(String key, Object... values) {
    this.key = key;
    this.values = values != null ? values.clone() : new Object[0];
}

From source file:org.openspaces.core.internal.commons.math.MathException.java

/**
 * Constructs a new <code>MathException</code> with specified formatted detail message and
 * nested <code>Throwable</code> root cause. Message formatting is delegated to {@link
 * java.text.MessageFormat}.//from   w  ww .ja  v  a 2  s.  c o  m
 *
 * @param rootCause the exception or error that caused this exception to be thrown.
 * @param pattern   format specifier
 * @param arguments format arguments
 * @since 1.2
 */
public MathException(Throwable rootCause, String pattern, 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.DefaultInvocationContextRoutineBuilder.java

@Nonnull
public InvocationContextRoutineBuilder<INPUT, OUTPUT> withArgs(@Nullable final Object... args) {

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

From source file:org.orekit.errors.OrekitException.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)
 *//* w ww.  jav a 2 s. co  m*/
public OrekitException(final Localizable specifier, final Object... parts) {
    this.context = null;
    this.specifier = specifier;
    this.parts = (parts == null) ? new Object[0] : parts.clone();
}