private void inheritAttributesFromAncestors(final Monitor monitor) { // Inherit from parent if not set. final Map attrs = getInheritableAttributes(); for (final Iterator it = attrs.entrySet().iterator(); it.hasNext();) { final Map.Entry entry = (Map.Entry)it.next(); final String key = (String)entry.getKey(); final AttributeHolder parentAttribute = (AttributeHolder)entry.getValue(); if (!monitor.hasAttribute(key)) { final Object value = parentAttribute.getValue(); final AttributeHolder childAttribute = monitor.set(key, value); if (parentAttribute.isSerializable()) { childAttribute.serializable(); } if (parentAttribute.isLocked()) { childAttribute.lock(); } } } }