/** @since 0.17 or earlier */ protected void propertySetWithShapeFallback(Property property, DynamicObject store, Object value, ShapeImpl currentShape, ShapeImpl nextShape) { ShapeImpl oldShape = currentShape; ShapeImpl newNextShape = generalizeProperty(property, value, oldShape, nextShape); Property newProperty = newNextShape.getProperty(property.getKey()); newProperty.setSafe(store, value, oldShape, newNextShape); }
/** @since 0.17 or earlier */ protected void propertySetWithShapeFallback(Property property, DynamicObject store, Object value, ShapeImpl currentShape, ShapeImpl nextShape) { ShapeImpl oldShape = currentShape; ShapeImpl newNextShape = generalizeProperty(property, value, oldShape, nextShape); Property newProperty = newNextShape.getProperty(property.getKey()); newProperty.setSafe(store, value, oldShape, newNextShape); }
private Property generalize(DynamicObject store, Object value) { return ((LayoutImpl) store.getShape().getLayout()).getStrategy().generalizeProperty(store, this, value); }
private void setWithShapeSlowCase(DynamicObject store, Object value, Shape oldShape, Shape newShape) { ((LayoutImpl) store.getShape().getLayout()).getStrategy().generalizeProperty(store, this, value, oldShape, newShape); }
/** @since 0.17 or earlier */ protected ShapeImpl definePropertyGeneralize(ShapeImpl oldShape, Property oldProperty, Object value, LocationFactory locationFactory) { if (oldProperty.getLocation() instanceof DeclaredLocation) { Property property = oldProperty.relocate(locationFactory.createLocation(oldShape, value)); return oldShape.replaceProperty(oldProperty, property); } else { return generalizeProperty(oldProperty, value, oldShape, oldShape); } }
/** @since 0.17 or earlier */ protected ShapeImpl definePropertyGeneralize(ShapeImpl oldShape, Property oldProperty, Object value, LocationFactory locationFactory) { if (oldProperty.getLocation() instanceof DeclaredLocation) { Property property = oldProperty.relocate(locationFactory.createLocation(oldShape, value)); return oldShape.replaceProperty(oldProperty, property); } else { return generalizeProperty(oldProperty, value, oldShape, oldShape); } }