/** * Get a property entry by string name. * * @param key the name to look up * @return a Property object, or null if not found * @since 0.17 or earlier */ @Override @TruffleBoundary public Property getProperty(Object key) { return propertyMap.get(key); }
/** * Get a property entry by string name. * * @param key the name to look up * @return a Property object, or null if not found * @since 0.17 or earlier */ @Override @TruffleBoundary public Property getProperty(Object key) { return propertyMap.get(key); }
/** * Get a property entry by string name. * * @param key the name to look up * @return a Property object, or null if not found */ @Override @TruffleBoundary public Property getProperty(Object key) { return propertyMap.get(key); }
private void copyProperties(DynamicObject fromObject) { ShapeImpl fromShape = (ShapeImpl) fromObject.getShape(); ShapeImpl toShape = getShape(); assert toShape.isRelated(fromShape); assert toShape.isValid(); assert !fromShape.isShared(); PropertyMap fromMap = fromShape.getPropertyMap(); for (Iterator<Property> toMapIt = toShape.getPropertyMap().reverseOrderedValueIterator(); toMapIt.hasNext();) { Property toProperty = toMapIt.next(); Property fromProperty = fromMap.get(toProperty.getKey()); // copy only if property has a location and it's not the same as the source location if (!toProperty.getLocation().isValue() && !toProperty.getLocation().equals(fromProperty.getLocation())) { toProperty.setInternal(this, fromProperty.get(fromObject, false)); assert toShape.isValid(); } } }
private void copyProperties(DynamicObject fromObject) { ShapeImpl fromShape = (ShapeImpl) fromObject.getShape(); ShapeImpl toShape = getShapeImpl(); assert toShape.isRelated(fromShape); assert toShape.isValid(); assert !fromShape.isShared(); PropertyMap fromMap = fromShape.getPropertyMap(); for (Iterator<Property> toMapIt = toShape.getPropertyMap().reverseOrderedValueIterator(); toMapIt.hasNext();) { Property toProperty = toMapIt.next(); Property fromProperty = fromMap.get(toProperty.getKey()); // copy only if property has a location and it's not the same as the source location if (!toProperty.getLocation().isValue() && !toProperty.getLocation().equals(fromProperty.getLocation())) { toProperty.setInternal(this, fromProperty.get(fromObject, false)); assert toShape.isValid(); } } }