Code example for Field

Methods: getDeclaringClass, getName, set

0
 
	@Override 
	public void setBytes(Field f, Object o, byte[] bytes) {
		Throwable thing = null;
		try { 
			f.set(o, bytes);
			return; 
		} catch (Throwable ball) {
			thing = ball;
		} 
		throw new RuntimeException("Unable to set " + f.getDeclaringClass().getCanonicalName() + "." + f.getName(), thing);
	} 
 
	@Override 
	public byte[] getBytes(Object o) {
		return (byte[])o;
	} 
 
}