Subclass `base` by creating proxy functions
552783
function _subclassObject(tree, base, extension, extName) {
		// $.ui.fancytree.debug("_subclassObject", tree, base, extension, extName);
		for (var attrName in extension) {
			if (typeof extension[attrName] === "function") {
				if (typeof tree[attrName] === "function") {
					// override existing method
					tree[attrName] = _makeVirtualFunction(
						attrName,
						tree,
						base,
						extension,
						extName
					);
				} else if (attrName.charAt(0) === "_") {
					// Create private methods in tree.ext.EXTENSION namespace
					tree.ext[extName][attrName] = _makeVirtualFunction(
						attrName,
						tree,
						base,
						extension,
						extName
					);
				} else {
					$.error(
						"Could not override tree." +
							attrName +
							". Use prefix '_' to create tree." +
							extName +
							"._" +
							attrName
					);
				}
			} else {
				// Create member variables in tree.ext.EXTENSION namespace
				if (attrName !== "options") {
					tree.ext[extName][attrName] = extension[attrName];
				}
			}
		}
	}
132940
private static function forkCallMapClass(\ReflectionFunction $function): \ReflectionClass
    {
        try {
            $compile = self::$compile;
            $compile(self::createProxyCode($function));
        } catch (\ParseError $pe) {
            throw new ProxyCreationFailure(
                    'Failure while creating callable CallMap instance of '
                    . $function->getName() . '(): ' . $pe->getMessage(),
                    $pe
            );
        }

        return new \ReflectionClass($function->getName() . 'CallMapProxy');
    }
885369
def stub(base_class=None, **attributes):
    
    if base_class is None:
        base_class = object

    members = {
        "__init__": lambda self: None,
        "__new__": lambda *args, **kw: object.__new__(
            *args, *kw
        ),  # remove __new__ and metaclass behavior from object
        "__metaclass__": None,
    }
    members.update(attributes)
    # let's create a python class on-the-fly :)
    return type(f"{base_class.__name__}Stub", (base_class,), members)()
269776
def _construct_functions(self, coefs, **kwargs):
        """"""
        return [self.basis_functions.functions_factory(coef, **kwargs) for coef in coefs]
272723
function extend(BaseClass, DerivedClass) {
  DerivedClass.prototype = Object.create(BaseClass.prototype);
  DerivedClass.prototype.constructor = DerivedClass;
}
927978
def do_base(self, args):
        """"""
        func = getattr(args, 'func', None)
        if func is not None:
            # Call whatever sub-command function was selected
            func(self, args)
        else:
            # No sub-command was provided, so call help
            self.do_help('base')
909328
function init(obj = {}, prevName = '') {
    return new Proxy(obj, {
        get (target, name) {
            if (typeof name === 'symbol' || deflectedProperties.includes(name)) {
                return Reflect.get(target, name);
            }
            ns.resetTo(prevName);
            ns.push(name);
            let value = process.env[ns.serialize()];
            if (value) {
                ns.pop();
                return value;
            }
            return init(target, name);
        },
        set (target, name, val) {
            ns.resetTo(prevName);
            ns.push(name);
            let value = String(val);
            process.env[ns.serialize()] = value;
            ns.pop();
            return value;
        }
    });
}
319500
def all_bases (type):
    
    assert isinstance(type, basestring)
    result = []
    while type:
        result.append (type)
        type = __types [type]['base']

    return result
1118255
function composeClass(base, mixin) {
  if (typeof mixin === 'function') {
    // Mixin function
    return mixin(base);
  } else {
    // Mixin object
    class Subclass extends base {}
    copyOwnProperties(mixin, Subclass.prototype, NON_MIXABLE_OBJECT_PROPERTIES);
    return Subclass;
  }
}
73923
function(sourceFunc, boundFunc, context, callingContext, args) {
                if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
                var self = baseCreate(sourceFunc.prototype);
                var result = sourceFunc.apply(self, args);
                if (_.isObject(result)) return result;
                return self;
              }
1015816
function createNamedClass (name, klass, baseKlass, superFunc) {
    if (!superFunc) {
        superFunc = function () {
            baseKlass.call(this);
        };
    }
    
    return new Function(
        'klass', 'superFunc',
        'return function ' + name + ' () {' +
            'superFunc.apply(this, arguments);' +
            'klass.apply(this, arguments);' +
        '};'
        )(klass, superFunc);
}
108195
function Remoteable (Base) {
    return (function n(_super) {
        __extends(classOne, _super);

        function classOne() {
            return _super !== null && _super.apply(this, arguments) || this;
        }

        return classOne;
    }(Base));
}
1062178
function ImmutableAI (args) {
    // object that will store the state of the call which must be constructed
    // through multiple proxied property gets
    var call = {
        session: args.session,
    }
    // the proxy object must be addressed first as a property get in order
    // to set the namespace, module, and method to be called and then
    // called as a function to call that method
    var proxyFunctionWrapper = function proxyFunctionWrapper (args) {
        // make call
        return proxyFunction(call, args)
    }
    // create proxy for the proxy function object that will intercept each
    // property access on that object
    call.proxy = new Proxy(proxyFunctionWrapper, {
        // call the get proxy handler with the current call state
        get: function getProxyWrapper (target, property) {
            return getProxy(call, property)
        },
        // call the set proxy handler with the current call state
        set: function setProxyWrapper (target, property, value) {
            return setProxy(call, property, value)
        },
    })
    // return proxied function object
    return call.proxy
}
1031062
function Base(client, endpoint) {
	var base = this;

	/**
	 * Get a list of all records for the current API
	 *
	 * @method list
	 * @param {Object} query - OPTIONAL querystring params
	 * @param {Function} callback
	 */
	base.list = function() {
		return function(query, callback) {
			var q = '';

			if (query && 'function' === typeof callback)
				q = '?' + querystring.stringify(query);

			client.exec({
				path: '/' + endpoint + q
			}, arguments[arguments.length - 1]);
		};
	};

	/**
	 * Get a single record by its key
	 *
	 * @method fetch
	 * @param {Integer|String} key
	 * @param {Function} callback
	 */
	base.fetch = function() {
		return function(key, callback) {
			client.exec({
				path: '/' + endpoint + '/' + key
			}, callback);
		};
	};

	/**
	 * Create a new record
	 *
	 * @method create
	 * @param {Object|String} data
	 * @param {Function} callback
	 */
	base.create = function() {
		return function(data, callback) {
			client.exec({
				method: 'POST',
				path: '/' + endpoint,
				body: data
			}, callback);
		};
	};

	/**
	 * Update a record
	 *
	 * @method update
	 * @param {Integer|String} key
	 * @param {Object|String} data
	 * @param {Function} callback
	 */
	base.update = function() {
		return function(key, data, callback) {
			client.exec({
				method: 'PUT',
				path: '/' + endpoint + '/' + key,
				body: data
			}, callback);
		};
	};

	/**
	 * Remove a record
	 *
	 * @method remove
	 * @param {Integer|String} key
	 * @param {Function} callback
	 */
	base.remove = function() {
		return function(key, callback) {
			client.exec({
				method: 'DELETE',
				path: '/' + endpoint + '/' + key
			}, callback);
		};
	};

	/**
	 * Do requested action
	 *
	 * @method doAction
	 * @param {Integer|String} key
	 * @param {String} action
	 * @param {Object} body
	 * @param {Function} callback
	 */
	base.doAction = function() {
		return function(key, action, body, callback) {
			body = body || {};
			body.type = action;

			client.exec({
				method: 'POST',
				path: '/' + endpoint + '/' + key + '/actions',
				body: body
			}, callback);
		};
	};
}
1295323
protected static <P extends AbstractEncoderProxy<T>, T> Object newInstance(
        final Class<P> proxyType, final Class<T> encoderType, final T encoder) {

        if (proxyType == null) {
            throw new NullPointerException("proxyType");
        }

        if (!StringEncoderProxy.class.isAssignableFrom(proxyType)) {
            throw new IllegalArgumentException(
                "proxyType(" + proxyType + ") is not assignable to "
                + StringEncoderProxy.class);
        }

        return newInstance(ENCODER.getClassLoader(), new Class<?>[]{ENCODER},
                           proxyType, encoderType, encoder);
    }
1323006
function () {
    debug('invoking proxy function');

    if (arguments.length !== numArgs) {
      throw new TypeError('Expected ' + numArgs +
          ' arguments, got ' + arguments.length);
    }

    // storage buffers for input arguments and the return value
    const result = Buffer.alloc(resultSize);
    const argsList = Buffer.alloc(argsArraySize);

    // write arguments to storage areas
    let i;
    try {
      for (i = 0; i < numArgs; i++) {
        const argType = argTypes[i];
        const val = arguments[i];
        const valPtr = ref.alloc(argType, val);
        argsList.writePointer(valPtr, i * POINTER_SIZE);
      }
    } catch (e) {
      // counting arguments from 1 is more human readable
      i++;
      e.message = 'error setting argument ' + i + ' - ' + e.message;
      throw e;
    }

    // invoke the `ffi_call()` function
    bindings.ffi_call(cif, funcPtr, result, argsList);

    result.type = returnType;
    return result.deref();
  }
243539
def _generate_request_handler_proxy(handler_class, handler_args, name):
    """"""

    @scope.inject
    def request_handler_wrapper(app, handler, **kwargs):
        handler = handler_class(app, handler.request, **handler_args)
        handler._execute([], **kwargs)
    request_handler_wrapper.__name__ = name
    request_handler_wrapper.handler_class = handler_class
    request_handler_wrapper.handler_args = handler_args

    return request_handler_wrapper