Code example for Field

Methods: getDeclaringClass, getName

0
	public Field get() {
		return field;
	} 
 
	public void writeExternal(ObjectOutput out) throws IOException {
		out.writeObject(field.getDeclaringClass());
		out.writeObject(field.getName());
	} 
 
	public void readExternal(ObjectInput in) throws IOException,
			ClassNotFoundException { 
		try { 
			Class clazz = (Class) in.readObject();
			String fieldName = (String) in.readObject();
			field = clazz.getDeclaredField(fieldName);
		} catch (NoSuchFieldException e) {
			throw new IOException(e.toString());
		} 
	} 
 
	@Override