Skip to content

Commit 37cde7c

Browse files
committed
Remove ListConverters
Right now these are handled, superiorly, in the DefaultConverter. These were unnecessary and incorrect due to parameterized type matching.
1 parent f23929c commit 37cde7c

File tree

3 files changed

+2
-252
lines changed

3 files changed

+2
-252
lines changed

src/main/java/org/scijava/convert/AbstractListConverter.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

src/main/java/org/scijava/convert/AbstractListToPrimitiveConverter.java

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/main/java/org/scijava/convert/ArrayConverters.java

Lines changed: 2 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444

4545
/**
4646
* Container class for all desired combinations of
47-
* {@link PrimitiveArrayUnwrapper}, {@link PrimitiveArrayWrapper} and
48-
* {@link AbstractListToPrimitiveConverter} implementations.
47+
* {@link PrimitiveArrayUnwrapper} and {@link PrimitiveArrayWrapper}
48+
* implementations.
4949
*
5050
* @author Mark Hiner
5151
*/
@@ -85,21 +85,6 @@ public Class<IntArray> getInputType() {
8585
}
8686
}
8787

88-
@Plugin(type = Converter.class)
89-
public static class IntListConverter extends AbstractListToPrimitiveConverter<Integer, int[]> {
90-
91-
@Override
92-
public Class<int[]> getOutputType() {
93-
return int[].class;
94-
}
95-
96-
@Override
97-
protected Class<Integer> getListType() {
98-
return Integer.class;
99-
}
100-
101-
}
102-
10388
// -- Byte array converters --
10489

10590
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -134,21 +119,6 @@ public Class<ByteArray> getInputType() {
134119
}
135120
}
136121

137-
@Plugin(type = Converter.class)
138-
public static class ByteListConverter extends AbstractListToPrimitiveConverter<Byte, byte[]> {
139-
140-
@Override
141-
public Class<byte[]> getOutputType() {
142-
return byte[].class;
143-
}
144-
145-
@Override
146-
protected Class<Byte> getListType() {
147-
return Byte.class;
148-
}
149-
150-
}
151-
152122
// -- Bool array converters --
153123

154124
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -183,21 +153,6 @@ public Class<BoolArray> getInputType() {
183153
}
184154
}
185155

186-
@Plugin(type = Converter.class)
187-
public static class BoolListConverter extends AbstractListToPrimitiveConverter<Boolean, boolean[]> {
188-
189-
@Override
190-
public Class<boolean[]> getOutputType() {
191-
return boolean[].class;
192-
}
193-
194-
@Override
195-
protected Class<Boolean> getListType() {
196-
return Boolean.class;
197-
}
198-
199-
}
200-
201156
// -- Char array converters --
202157

203158
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -232,21 +187,6 @@ public Class<CharArray> getInputType() {
232187
}
233188
}
234189

235-
@Plugin(type = Converter.class)
236-
public static class CharListConverter extends AbstractListToPrimitiveConverter<Character, char[]> {
237-
238-
@Override
239-
public Class<char[]> getOutputType() {
240-
return char[].class;
241-
}
242-
243-
@Override
244-
protected Class<Character> getListType() {
245-
return Character.class;
246-
}
247-
248-
}
249-
250190
// -- Short array converters --
251191

252192
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -281,21 +221,6 @@ public Class<ShortArray> getInputType() {
281221
}
282222
}
283223

284-
@Plugin(type = Converter.class)
285-
public static class ShortListConverter extends AbstractListToPrimitiveConverter<Short, short[]> {
286-
287-
@Override
288-
public Class<short[]> getOutputType() {
289-
return short[].class;
290-
}
291-
292-
@Override
293-
protected Class<Short> getListType() {
294-
return Short.class;
295-
}
296-
297-
}
298-
299224
// -- Float array converters --
300225

301226
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -330,21 +255,6 @@ public Class<FloatArray> getInputType() {
330255
}
331256
}
332257

333-
@Plugin(type = Converter.class)
334-
public static class FloatListConverter extends AbstractListToPrimitiveConverter<Float, float[]> {
335-
336-
@Override
337-
public Class<float[]> getOutputType() {
338-
return float[].class;
339-
}
340-
341-
@Override
342-
protected Class<Float> getListType() {
343-
return Float.class;
344-
}
345-
346-
}
347-
348258
// -- Double array converters --
349259

350260
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -379,21 +289,6 @@ public Class<DoubleArray> getInputType() {
379289
}
380290
}
381291

382-
@Plugin(type = Converter.class)
383-
public static class DoubleListConverter extends AbstractListToPrimitiveConverter<Double, double[]> {
384-
385-
@Override
386-
public Class<double[]> getOutputType() {
387-
return double[].class;
388-
}
389-
390-
@Override
391-
protected Class<Double> getListType() {
392-
return Double.class;
393-
}
394-
395-
}
396-
397292
// -- Long array converters --
398293

399294
@Plugin(type = Converter.class, priority = Priority.HIGH_PRIORITY)
@@ -428,19 +323,4 @@ public Class<LongArray> getInputType() {
428323
}
429324
}
430325

431-
@Plugin(type = Converter.class)
432-
public static class LongListConverter extends AbstractListToPrimitiveConverter<Long, long[]> {
433-
434-
@Override
435-
public Class<long[]> getOutputType() {
436-
return long[].class;
437-
}
438-
439-
@Override
440-
protected Class<Long> getListType() {
441-
return Long.class;
442-
}
443-
444-
}
445-
446326
}

0 commit comments

Comments
 (0)