ArrayExtractor implements Extractor { public Object extractObject(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts,boolean jsonify) throws AttributeNotFoundException { int length = pConverter.getCollectionLength(Array.getLength(pValue)); String pathPart = pPathParts.isEmpty() ? null : pPathParts.pop(); if (pathPart != null) { return extractWithPath(pConverter, pValue, pPathParts, jsonify, pathPart); } else { return jsonify ? extractArray(pConverter, pValue, pPathParts, jsonify, length) : pValue; } }  Class getType(); Object extractObject(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts,boolean jsonify); Object setObjectValue(StringToObjectConverter pConverter, Object pInner, String pIndex, Object  pValue); boolean canSetValue();  }
@Test public void direct() throws AttributeNotFoundException { int res = (Integer) extractObject(new Integer[]{1, 2, 3}, "2"); assertEquals(res,3); Integer[] res2 = (Integer[]) extractObject(new Integer[]{1,2,3}); assertEquals(res2.length,3); assertEquals((int) res2[0],1); assertEquals((int) res2[1],2); assertEquals((int) res2[2],3); }