Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/ArrayTools.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/ArrayTools.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/ArrayTools.java b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/ArrayTools.java
index 1f17389033..f1d37d51b6 100644
--- a/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/ArrayTools.java
+++ b/jpa/plugins/org.eclipse.jpt.utility/src/org/eclipse/jpt/utility/internal/ArrayTools.java
@@ -29,6 +29,16 @@ public final class ArrayTools {
// ********** instantiation **********
/**
+ * Return a new array with the same length
+ * and the same component type as the specified array.
+ * <p>
+ * <code>Arrays.newArray(Object[] array)</code>
+ */
+ public static <E> E[] newArray(E[] array) {
+ return newArray(array, array.length);
+ }
+
+ /**
* Return a new array with the specified length
* and the same component type as the specified array.
* <p>

Back to the top