Code example for Field

Methods: setAccessiblesetBoolean

0
 
	private static void setFieldBool(Class class1, Object instance, boolean value) throws IllegalArgumentException, IllegalAccessException
	{ 
		try { 
			Field field = class1.getDeclaredField("field_70178_ae");
			field.setAccessible(true);
			field.setBoolean(instance, value);
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		} 
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE