Back to project page android-easy-db.
The source code is released under:
GNU General Public License
If you think the Android project android-easy-db listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mauriciogiordano.easydb.helper; /*from w w w . ja v a 2 s . c o m*/ import org.json.JSONException; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; public class JSONArray extends org.json.JSONArray { private List reflectedValuesList; private boolean found = false; public JSONArray() { super(); } public JSONArray(String a) throws JSONException { super(a); try { Field field = getClass().getSuperclass().getDeclaredField("values"); field.setAccessible(true); reflectedValuesList = (ArrayList) field.get(this); found = true; } catch(NoSuchFieldException e) { e.printStackTrace(); } catch(IllegalAccessException e) { e.printStackTrace(); } } public void pop(int index) { if(found) { reflectedValuesList.remove(index); } else { // TODO } } }