private void defineExisting(Object id, Object value, int flags, Property existing, ShapeImpl oldShape) { if (existing.getFlags() == flags) { existing.setGeneric(this, value, null); } else { Property newProperty = Property.create(id, oldShape.getLayout().existingLocationForValue(value, existing.getLocation(), oldShape), flags); Shape newShape = oldShape.replaceProperty(existing, newProperty); this.setShapeAndResize(newShape); newProperty.setInternal(this, value); } }