protected void setSodaTestOn(STClass[] classes) { for (int i = 0; i < classes.length; i++) { try { Field field = classes[i].getClass().getDeclaredField("st"); try { Platform4.setAccessible(field); } catch (Throwable t) { // JDK 1.x has no setAccessible } field.set(classes[i], this); } catch (Exception e) { System.err.println("Add the following line to Class " + classes[i].getClass().getName()); System.err.println("public static transient SodaTest st;"); } } }
public boolean storeableField(Class a_class, Field a_field) { return (!Modifier.isStatic(a_field.getModifiers())) && (!Modifier.isTransient(a_field.getModifiers()) & !(a_field.getName().indexOf("$") > -1)); }