/** @since 0.17 or earlier */ protected ShapeImpl defineProperty(ShapeImpl oldShape, Object key, Object value, int flags, LocationFactory locationFactory, Property existing) { if (existing == null) { Property property = Property.create(key, locationFactory.createLocation(oldShape, value), flags); ShapeImpl newShape = oldShape.addProperty(property); return newShape; } else { if (existing.getFlags() == flags) { if (existing.getLocation().canSet(value)) { return oldShape; } else { return definePropertyGeneralize(oldShape, existing, value, locationFactory); } } else { return definePropertyChangeFlags(oldShape, existing, value, flags); } } }
/** @since 0.17 or earlier */ protected ShapeImpl defineProperty(ShapeImpl oldShape, Object key, Object value, int flags, LocationFactory locationFactory, Property existing) { if (existing == null) { Property property = Property.create(key, locationFactory.createLocation(oldShape, value), flags); ShapeImpl newShape = oldShape.addProperty(property); return newShape; } else { if (existing.getFlags() == flags) { if (existing.getLocation().canSet(value)) { return oldShape; } else { return definePropertyGeneralize(oldShape, existing, value, locationFactory); } } else { return definePropertyChangeFlags(oldShape, existing, value, flags); } } }