public void setValue(Object value) { if (parent == null || parent.isContainer()) { throw new JXPathInvalidAccessException( "Cannot set property " + asPath() + ", the target object is null"); } if (parent instanceof PropertyOwnerPointer && ((PropertyOwnerPointer) parent) .isDynamicPropertyDeclarationSupported()) { // If the parent property owner can create // a property automatically - let it do so PropertyPointer propertyPointer = ((PropertyOwnerPointer) parent).getPropertyPointer(); propertyPointer.setPropertyName(propertyName); propertyPointer.setValue(value); } else { throw new JXPathInvalidAccessException( "Cannot set property " + asPath() + ", path does not match a changeable location"); } }