Compute property descriptor for getter-setter
type definition and assign it to the prototype.
@param {object} proto
@param {String} key
@param {object} def
@returns {defect}
549685
function(proto, key, def) {
		var desc;
		["getter", "setter"].forEach(function(name, set) {
			while (proto && proto[key] && !gui.Type.isDefined(def[name])) {
				proto = Object.getPrototypeOf(proto);
				desc = Object.getOwnPropertyDescriptor(proto, key);
				if (desc) {
					def[name] = desc[set ? "set" : "get"];
				}
			}
		});
		return {
			enumerable: true,
			configurable: true,
			get: def.getter || this._NOGETTER,
			set: def.setter || this._NOSETTER
		};
	}
265290
function extend(d, element) {
    var map = Object.keys(element.prototype).reduce(function (descriptors, key) {
        descriptors[key] = Object.getOwnPropertyDescriptor(element.prototype, key);
        return descriptors;
    }, {});
    Object.defineProperties(d, map);
}
1187527
function getPropertyDescriptor(target, name) {
        var pd = Object.getOwnPropertyDescriptor(target, name),
            proto = Object.getPrototypeOf(target);
        while (typeof pd === 'undefined' && proto !== null) {
            pd = Object.getOwnPropertyDescriptor(proto, name);
            proto = Object.getPrototypeOf(proto);
        }
        return pd;
    }
553456
function initializeEntityPrototype(proto) {

        proto.getProperty = function(propertyName) {
            return this[propertyName];
        };

        proto.setProperty = function (propertyName, value) {
            //if (!this._backingStore.hasOwnProperty(propertyName)) {
            //    throw new Error("Unknown property name:" + propertyName);
            //}
            this[propertyName] = value;
            // allow setProperty chaining.
            return this;
        };

        movePropDefsToProto(proto);
    }
1139439
function getAllPropertyDescriptors(object) {
  if (object === Object.prototype) {
    return {};
  } else {
    let prototype = getPrototypeOf(object);
    return assign(getAllPropertyDescriptors(prototype), getOwnPropertyDescriptors(object));
  }
}
424802
function baseAssignValue(object, key, value) {
        if (key == "__proto__" && defineProperty) {
            defineProperty(object, key, {
                configurable: true,
                enumerable: true,
                value: value,
                writable: true
            });
        } else {
            object[key] = value;
        }
    }
379795
public static String getProperty( Properties props, String key, String def )
    {
        String value = props.getProperty( key, def );
        if( value == null )
        {
            return null;
        }
        if( "".equals( value ) )
        {
            return value;
        }
        value = PropertyResolver.resolve( props, value );
        return value;
    }
1030863
function baseAssignValue(object, key, value) {
  if (key == '__proto__') {
    Object.defineProperty(object, key, {
      'configurable': true,
      'enumerable': true,
      'value': value,
      'writable': true
    })
  } else {
    object[key] = value
  }
}
389872
public void registerPrototype( String key, IPrototype prototype )
    {

        prototypes.put(new PrototypeKey(key, prototype.getClass()), prototype);

    }
1229330
function(property) {
            if (this.hasOwnProperty(property) && !_.isUndefined(this[property])) {
                return this[property];
            }

            if (this.__proto && this.__proto.hasOwnProperty(property) && !_.isUndefined(this.__proto[property])) {
                return this.__proto[property];
            }

            var parent = this.__parent;

            while (parent) {
                if (parent.hasOwnProperty(property) && !_.isUndefined(parent[property])) {
                    return parent[property];
                }
                parent = parent.__parent;
            }
        }
156007
function isPropertyDescriptor(ES, Desc) {
    if (ES.Type(Desc) !== 'Object') {
      return false;
    }
    var allowed = {
      '[[Configurable]]': true,
      '[[Enumerable]]': true,
      '[[Get]]': true,
      '[[Set]]': true,
      '[[Value]]': true,
      '[[Writable]]': true
    };

    for (var key in Desc) { // eslint-disable-line
      if (has(Desc, key) && !allowed[key]) {
        return false;
      }
    }

    var isData = has(Desc, '[[Value]]');
    var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');
    if (isData && IsAccessor) {
      throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');
    }
    return true;
  }
570032
function bindableProperty(target, key) {
    // property value
    var _val = this[key];
    var keyName = "_" + key;
    this[keyName] = _val;
    // property getter
    var getter = function () {
        // console.log(`Get: ${key} => ${_val}`);
        return this[keyName];
    };
    // property setter
    var setter = function (newVal) {
        // console.log(`Set: ${key} => ${newVal}`);
        // debugger;
        var oldValue = this[keyName];
        // tslint:disable-next-line:triple-equals
        if (oldValue == newVal) {
            return;
        }
        this[keyName] = newVal;
        var c = this._$_supressRefresh;
        if (!(c && c[key])) {
            Atom.refresh(this, key);
        }
        if (this.onPropertyChanged) {
            this.onPropertyChanged(key);
        }
    };
    // delete property
    if (delete this[key]) {
        // create new property with getter and setter
        Object.defineProperty(target, key, {
            get: getter,
            set: setter,
            enumerable: true,
            configurable: true
        });
        // tslint:disable-next-line:no-string-literal
        if (target.constructor.prototype["get_atomParent"]) {
            target["get_" + key] = getter;
            target["set_" + key] = setter;
        }
    }
}
755862
function getType(key){

    var o = {
      attributes : this.attributes, 
      CONSIT     : this.CONSIT,
      nodes      : this.nodes
    };
    var ret = false;

    for (var i in o){

      if (key in o[i]){
        ret = i;
        break;
      }

    }

    return ret;

  }
54665
function (instance, instanceKey, type, json, jsonKey) {
    var conversionFunctionsList = [];
    var objectInstance;
    /**
     * If instanceKey is not passed on then it's the first iteration of the functions.
     */
    // tslint:disable-next-line:triple-equals
    if (instanceKey != undefined) {
        objectInstance = new type();
        instance[instanceKey] = objectInstance;
    }
    else {
        objectInstance = instance;
    }
    var objectKeys = Object.keys(objectInstance);
    objectKeys = objectKeys.concat((Reflect.getMetadata(METADATA_JSON_PROPERTIES_NAME, objectInstance) || []).filter(function (item) {
        if (objectInstance.constructor.prototype.hasOwnProperty(item) && Object.getOwnPropertyDescriptor(objectInstance.constructor.prototype, item).set === undefined) {
            // Property does not have setter
            return false;
        }
        return objectKeys.indexOf(item) < 0;
    }));
    objectKeys = objectKeys.filter(function (item) {
        return !Reflect.hasMetadata(METADATA_JSON_IGNORE_NAME, objectInstance, item);
    });
    objectKeys.forEach(function (key) {
        /**
         * Check if there is any DecoratorMetadata attached to this property, otherwise create a new one.
         */
        var metadata = getJsonPropertyDecoratorMetadata(objectInstance, key);
        if (metadata === undefined) {
            metadata = { name: key, required: false, access: exports.AccessType.BOTH };
        }
        // tslint:disable-next-line:triple-equals
        if (exports.AccessType.WRITE_ONLY != metadata.access) {
            /**
             * Check requried property
             */
            if (metadata.required && json[metadata.name] === undefined) {
                throw new JsonConverstionError("JSON structure does have have required property '" + metadata.name + "' as required by '" + getTypeNameFromInstance(objectInstance) + "[" + key + "]", json);
            }
            // tslint:disable-next-line:triple-equals
            var jsonKeyName = metadata.name != undefined ? metadata.name : key;
            // tslint:disable-next-line:triple-equals
            if (json[jsonKeyName] != undefined) {
                /**
                 * If metadata has deserializer, use that one instead.
                 */
                // tslint:disable-next-line:triple-equals
                if (metadata.deserializer != undefined) {
                    objectInstance[key] = getOrCreateDeserializer(metadata.deserializer).deserialize(json[jsonKeyName]);
                }
                else if (metadata.type === undefined) {
                    /**
                    * If we do not have any type defined, then we can't do much here but to hope for the best.
                    */
                    objectInstance[key] = json[jsonKeyName];
                }
                else {
                    if (!isArrayType(objectInstance, key)) {
                        // tslint:disable-next-line:triple-equals
                        var typeName = metadata.type != undefined ? getTypeNameFromInstance(metadata.type) : getTypeName(objectInstance, key);
                        if (!isSimpleType(typeName)) {
                            objectInstance[key] = new metadata.type();
                            conversionFunctionsList.push({ functionName: Constants.OBJECT_TYPE, type: metadata.type, instance: objectInstance[key], json: json[jsonKeyName] });
                        }
                        else {
                            conversionFunctions[typeName](objectInstance, key, typeName, json, jsonKeyName);
                        }
                    }
                    else {
                        var moreFunctions = conversionFunctions[Constants.ARRAY_TYPE](objectInstance, key, metadata.type, json, jsonKeyName);
                        moreFunctions.forEach(function (struct) {
                            conversionFunctionsList.push(struct);
                        });
                    }
                }
            }
        }
    });
    return conversionFunctionsList;
}
818320
function (key, value, def) {
                        if (! this.has(key)) {
                            this.put(key, value, def);
                            return true;
                        }

                        return false;
                    }
473009
function boxAttr(key, value) {
			if (box) {
				box.attr(key, value);
			} else {
				deferredAttr[key] = value;
			}
		}
734275
function defineDelegates(cls, prototype) {
  const names = Object.getOwnPropertyNames(prototype);
  names.forEach(name => {
    const descriptor = Object.getOwnPropertyDescriptor(prototype, name);
    if (!descriptor) {
      return;
    }
    const delegate = createDelegate(name, descriptor);
    if (delegate) {
      Object.defineProperty(cls.prototype, name, delegate);
    }
  });
}