@Test public void shouldMapIntArray() { final ArrayNode<IJsonNode> input = new ArrayNode<IJsonNode>().add(new IntNode(1)).add(new IntNode(2)).add(new IntNode(3)); Assert.assertArrayEquals(new int[] { 1, 2, 3 }, this.mapper.map(input, null, int[].class)); Assert.assertArrayEquals(new Integer[] { 1, 2, 3 }, this.mapper.map(input, null, Integer[].class)); Assert.assertArrayEquals(new byte[] { 1, 2, 3 }, this.mapper.map(input, null, byte[].class)); Assert.assertArrayEquals(new Byte[] { 1, 2, 3 }, this.mapper.map(input, null, Byte[].class)); Assert.assertArrayEquals(new short[] { 1, 2, 3 }, this.mapper.map(input, null, short[].class)); Assert.assertArrayEquals(new Short[] { 1, 2, 3 }, this.mapper.map(input, null, Short[].class)); }
public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } protected  JsonToJavaMapper(); }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } protected  JsonToJavaMapper(); @SuppressWarnings("unchecked") TypeMapper<F, T> getMapper(final Class<F> fromClass, final Class<T> targetType); T map(final IJsonNode from); T map(final IJsonNode from, final T to); T map(final IJsonNode from, final T to, final Class<T> targetType); T map(final IJsonNode from, T to, final Type targetType); }
JsonToJavaMapper extends AbstractTypeMapper<TypeMapper<?, ?>> { public <T> T map(final IJsonNode from) { return this.map(from, null, this.getDefaultMappingType(from.getClass())); } protected  JsonToJavaMapper(); @SuppressWarnings("unchecked") TypeMapper<F, T> getMapper(final Class<F> fromClass, final Class<T> targetType); T map(final IJsonNode from); T map(final IJsonNode from, final T to); T map(final IJsonNode from, final T to, final Class<T> targetType); T map(final IJsonNode from, T to, final Type targetType); static final JsonToJavaMapper INSTANCE; }