01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * When distributing Covered Code, include this CDDL Header Notice in each file
10: * and include the License file at http://www.netbeans.org/cddl.txt.
11: * If applicable, add the following below the CDDL Header, with the fields
12: * enclosed by brackets [] replaced by your own identifying information:
13: * "Portions Copyrighted [year] [name of copyright owner]"
14: *
15: * The Original Software is NetBeans. The Initial Developer of the Original
16: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17: * Microsystems, Inc. All Rights Reserved.
18: */
19:
20: /* *************************************************************************
21: *
22: * Copyright (c) 2002, SeeBeyond Technology Corporation,
23: * All Rights Reserved
24: *
25: * This program, and all the routines referenced herein,
26: * are the proprietary properties and trade secrets of
27: * SEEBEYOND TECHNOLOGY CORPORATION.
28: *
29: * Except as provided for by license agreement, this
30: * program shall not be duplicated, used, or disclosed
31: * without written consent signed by an officer of
32: * SEEBEYOND TECHNOLOGY CORPORATION.
33: *
34: ***************************************************************************/
35:
36: /*
37: * ArrayUtil.java 1.0
38: *
39: * Copyright 2004-2006 Sun Microsystems, Inc. All Rights Reserved.
40: */
41: package org.netbeans.modules.sql.project.wsdl;
42:
43: /**
44: * ArrayUtil.java
45: *
46: * Created on July 25, 2006, 9:45 AM
47: *
48: * @author Bing Lu
49: */
50: public class ArrayUtil {
51: public static Object[] duplicate(Object[] a) {
52: if (a == null) {
53: return a;
54: }
55: Object[] c = new Object[a.length];
56: System.arraycopy(a, 0, c, 0, a.length);
57: return c;
58: }
59:
60: public static String[] duplicate(String[] a) {
61: if (a == null) {
62: return a;
63: }
64: String[] c = new String[a.length];
65: System.arraycopy(a, 0, c, 0, a.length);
66: return c;
67: }
68: }
|