public void writeExternal(ObjectOutput output) throws IOException { if (descriptor == null) output.writeObject(getSource()); else { Object[] source = getSource(); if (source == null) output.writeObject(null); else { for (int i = 0; i < source.length; i++) { Object item = source[i]; if (item == null) source[i] = null; else { PropertyProxy proxy = PropertyProxyRegistry.getProxy(item); proxy = (PropertyProxy)proxy.clone(); proxy.setDescriptor(descriptor); proxy.setDefaultInstance(item); source[i] = proxy; } } output.writeObject(source); } } } }