Aliases the given Ruby property reader and writer to its underlying Java property reader and writer, resp.

 @param [Property] property the property to alias
343504
def alias_property_accessors(property)
      # the Java reader and writer accessor method symbols
      jra, jwa = property.java_accessors
      # strip the Java reader and writer is/get/set prefix and make a symbol
      alias_method(property.reader, jra)
      alias_method(property.writer, jwa)
    end
1118541
def update_attributes(properties_hash)
      self.class.get_class_properties.each do |property|
        key = property[:name].to_sym
        if properties_hash.has_key? key
          self.setValue(properties_hash[key], forKey:key)
        end
      end
    end
100959
function normalizeProperties(properties, name) {
        // Allow for shorthand type declaration:

        // Check to see if the user passed in a raw type of a properties hash.
        if (properties) {
            // Raw type passed.
            // index: Type is translated to index: {type: Type}
            // Properties hash created.
            if (properties.type === undefined) {
                properties = {
                    type: properties
                };

                // Properties hash passed.
                // Copy properties hash before modifying.
                // Users can pass in their own custom types to the schema and we don't want to write to that object.
                // Especially since properties.name contains the index of our field and copying that will break functionality.
            } else {
                properties = _.cloneDeep(properties);
            }
        }

        // Type may be an object with properties.
        // If "type.type" exists, we'll assume it's meant to be properties.
        // This means that shorthand objects can't use the "type" index.
        // If "type" is necessary, they must be wrapped in a SchemaObject.
        if (_.isObject(properties.type) && properties.type.type !== undefined) {
            _.each(properties.type, (value, key) => {
                if (properties[key] === undefined) {
                    properties[key] = value;
                }
            });
            properties.type = properties.type.type;
        }

        // Null or undefined should be flexible and allow any value.
        if (properties.type === null || properties.type === undefined) {
            properties.type = 'any';

            // Convert object representation of type to lowercase string.
            // String is converted to 'string', Number to 'number', etc.
            // Do not convert the initialized SchemaObjectInstance to a string!
            // Check for a shorthand declaration of schema by key length.
        } else if (_.isString(properties.type.name) && properties.type.name !== 'SchemaObjectInstance' &&
            Object.keys(properties.type).length === 0) {
            properties.type = properties.type.name;
        }
        if (_.isString(properties.type)) {
            properties.type = properties.type.toLowerCase();
        }

        // index: [Type] or index: [] is translated to index: {type: Array, arrayType: Type}
        if (_.isArray(properties.type)) {
            if (_.size(properties.type)) {
                // Properties will be normalized when array is initialized.
                properties.arrayType = properties.type[0];
            }
            properties.type = 'array';
        }

        // index: {} or index: SchemaObject is translated to index: {type: Object, objectType: Type}
        if (!_.isString(properties.type)) {
            if (_.isFunction(properties.type)) {
                properties.objectType = properties.type;
                properties.type = 'object';
            } else if (_.isObject(properties.type)) {
                // When an empty object is passed, no schema is enforced.
                if (_.size(properties.type)) {
                    // Options should be inherited by sub-SchemaObjects, except toObject.
                    const options = _.clone(this[_privateKey]._options);
                    delete options.toObject;

                    // When we're creating a nested schema automatically, it should always inherit the root "this".
                    options.inheritRootThis = true;

                    // Initialize the SchemaObject sub-schema automatically.
                    properties.objectType = new SchemaObject(properties.type, options);
                }

                // Regardless of if we created a sub-schema or not, the field is indexed as an object.
                properties.type = 'object';
            }
        }

        // Set name if passed on properties.
        // It's used to show what field an error what generated on.
        if (name) {
            properties.name = name;
        }

        return properties;
    }
577249
def render_properties!(xml)
    self.class.properties.each do |property, options|
      next unless instance_variable_get("@_set_#{property}")
      property_value = self.send(property)
      render_property!(property, property_value, xml, options)
    end
  end
962262
def make_alias(self, entry):
        
        entry.add_alias(self)
        self.alias = entry
        self.scope = entry.scope  # Local aliases can be "global" (static)
        self.byref = entry.byref
        self.offset = entry.offset
        self.addr = entry.addr
828494
function copyProperties (source, destination) {
  var props = Object.getOwnPropertyNames(source);
  props.forEach(function (prop) {
    var desc;
    if (!destination[prop]) {
      desc = Object.getOwnPropertyDescriptor(source, prop);
      destination[prop] = {value: source[prop], writable: desc.writable};
    }
  });
}
540793
def property_set sym, val
      oldvalue = instance_variable_get "@#{sym}"
      tmp = val.size == 1 ? val[0] : val
      newvalue = tmp
      if oldvalue.nil? || @_object_created.nil?
        #@#{sym} = tmp
        instance_variable_set "@#{sym}", tmp
      end
      return(self) if oldvalue.nil? || @_object_created.nil?

      if oldvalue != newvalue
        # trying to reduce calls to fire, when object is being created
        begin
          @property_changed = true
          fire_property_change("#{sym}", oldvalue, newvalue) if !oldvalue.nil?
          #@#{sym} = tmp
          instance_variable_set "@#{sym}", tmp
          #@config["#{sym}"]=@#{sym}
        rescue PropertyVetoException
          $log.warn "PropertyVetoException for #{sym}:" + oldvalue.to_s + "->  "+ newvalue.to_s
        end
      end # if old
      self
    end
1127781
public function instanceWrite($property, $value)
    {
        // Ignore properties that should not be settable
        if ($property !== 'file_name' && ! $this->config->attributeProperty($property)) {
            return;
        }

        $this->instance->setAttribute("{$this->name}_{$property}", $value);
    }
363661
protected void writeCssProperty(String prop, String value) throws IOException {
        write(new StringBuffer(prop).append(": ").append(value).append("; ").toString());
    }
932833
def [](property)
      assert_property_exists! property
      value = super(property)
      # If the value is a lambda, proc, or whatever answers to call, eval the thing!
      if value.is_a? Proc
        self[property] = value.call # Set the result of the call as a value
      else
        yield value if block_given?
        value
      end
    end
908343
def property(self, property_name, default=Ellipsis):
        
        try:
            return self._a_tags[property_name]
        except KeyError:
            if default != Ellipsis:
                return default
            else:
                raise
317484
def rename(mapping)
      new_attributes = map do |attr|
        alias_name = mapping[attr.name]
        alias_name ? attr.aliased(alias_name) : attr
      end

      new(new_attributes)
    end
333484
def properties= value
      value.each do |k,v|
        self.add_property k.to_s, v
      end
    end
1112109
def properties
      hash = {}
      Parser::PROPERTIES.each do |property|
        hash[property] = __send__(property)
      end
      hash
    end
1276594
def _write_property(self, val, *args):
        """"""
        val_wid = val
        # 'finally' would be better here, but not supported in 2.4 :(
        try:
            totype = type(self._get_property(*args))
            if (totype is not type(None) and
                   (self._prop_cast or not self._prop_write)):
                val = self._cast_value(val, totype)

            if self._prop_write:
                val = self._prop_write(val)

            self._itsme = True
            self._set_property(val, *args)

        except ValueError:
            self._itsme = False
            if self._value_error:
                self._value_error(self, self._prop_name, val_wid)
            else:
                raise

        except:
            self._itsme = False
            raise

        self._itsme = False
1279865
def call(attribute_definition, klass)
      define_reader.(attribute_definition, klass)
      define_writer.(attribute_definition, klass)
      attribute_definition
    end
483872
private void loadAliases(ApplicationContext applicationContext, String propertyFile) {
        if (propertyFile.isEmpty()) {
            return;
        }

        Resource[] resources;

        try {
            resources = applicationContext.getResources(propertyFile);
        } catch (IOException e) {
            log.error("Failed to locate alias property file: " + propertyFile, e);
            return;
        }

        for (Resource resource : resources) {
            if (!resource.exists()) {
                log.info("Did not find alias property file: " + resource.getFilename());
                continue;
            }

            try (InputStream is = resource.getInputStream();) {

                Properties props = new Properties();
                props.load(is);

                for (Entry<Object, Object> entry : props.entrySet()) {
                    try {
                        register((String) entry.getKey(), (String) entry.getValue());
                        entryCount++;
                    } catch (Exception e) {
                        log.error("Error registering alias for '" + entry.getKey() + "'.", e);
                    }
                }

                fileCount++;
            } catch (IOException e) {
                log.error("Failed to load alias property file: " + resource.getFilename(), e);
            }
        }
    }