Bind the first argument of this SmartHandle to the given object,
returning a new adapted handle.

@param obj the object to which to bind this handle's first argument
@return a new SmartHandle with the first argument dropped in favor of obj
519585
public SmartHandle bindTo(Object obj) {
        return new SmartHandle(signature.dropFirst(), handle.bindTo(obj));
    }
1372660
private static OrderedJSONObject setCommonOpenTypesStructureObject(OrderedJSONObject obj) {
        obj.put("openTypeClass", "string");
        obj.put("className", "string");
        obj.put("typeName", "string");
        obj.put("description", "string");

        return obj;
    }
734923
public static ASN1Sequence getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1Sequence)
        {
            return (ASN1Sequence)obj;
        }

        throw new IllegalArgumentException("unknown object in getInstance");
    }
964849
public LockEntry getWriter(Object obj)
    {
        PersistenceBroker broker = getBroker();
        Identity oid = new Identity(obj, broker); 
        return getWriter(oid);
    }
596264
public void writeObjectImpl(Object obj)
        throws IOException
    {
        Class cl = obj.getClass();

        try {
            Method method = cl.getMethod("writeReplace", new Class[0]);
            Object repl = method.invoke(obj, new Object[0]);

            writeObject(repl);
            return;
        } catch (Exception e) {
        }

        try {
            writeMapBegin(cl.getName());
            for (; cl != null; cl = cl.getSuperclass()) {
                Field[] fields = cl.getDeclaredFields();
                for (int i = 0; i < fields.length; i++) {
                    Field field = fields[i];

                    if (Modifier.isTransient(field.getModifiers()) ||
                        Modifier.isStatic(field.getModifiers()))
                        continue;

                    // XXX: could parameterize the handler to only deal with public
                    field.setAccessible(true);

                    writeString(field.getName());
                    writeObject(field.get(obj));
                }
            }
            writeMapEnd();
        } catch (IllegalAccessException e) {
            throw new IOExceptionWrapper(e);
        }
    }
243006
public void setCurrentObject(Object obj) {
        if (((obj == null) && (this.nullString != null))
                || this.requiredType.isInstance(obj)
                || (obj instanceof String)
                || (obj instanceof File)
                || ((obj instanceof Task) && this.requiredType.isAssignableFrom(((Task) obj).getTaskResultType()))) {
            this.currentValue = obj;
        } else {
            throw new IllegalArgumentException("Object not of required type.");
        }
    }
253790
public static DERUTF8String getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof DERUTF8String)
        {
            return (DERUTF8String)obj;
        }

        if (obj instanceof ASN1OctetString)
        {
            return new DERUTF8String(((ASN1OctetString)obj).getOctets());
        }

        if (obj instanceof ASN1TaggedObject)
        {
            return getInstance(((ASN1TaggedObject)obj).getObject());
        }

        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
    }
1104824
public static Optional<Object> firstElement(final Object obj) {
        val object = CollectionUtils.toCollection(obj);
        if (object.isEmpty()) {
            return Optional.empty();
        }
        return Optional.of(object.iterator().next());
    }
132368
function bindMethods(obj, scope) {
  return Object.keys(obj).reduce((bound, key) => {
    if (typeof obj[key] === 'function') {
      bound[key] = obj[key].bind(scope);
    } else if (_lodash2.default.isObject(obj[key])) {
      bound[key] = bindMethods(obj[key], scope);
    }
    return bound;
  }, {});
}
1010734
function (obj, bounds) {
        // already a Cursor, do nothing
        if (obj instanceof Cursor) {
            bounds && obj.bounds(bounds.length, bounds.cycles);

            return obj;
        }

        // nothing to box, create a blank Cursor
        if (!_.isObject(obj)) { return new Cursor(bounds && bounds.length, bounds && bounds.cycles); }

        // load Cursor values from object
        return new Cursor((bounds || obj).length, (bounds || obj).cycles, obj.position, obj.iteration, obj.ref);
    }
398230
function assign(obj) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    if (Object.assign)
        return Object.assign.apply(Object, [obj].concat(args));
    return objAssign.apply(void 0, [obj].concat(args));
}
1000131
@GwtIncompatible("incompatible method")
    public ToStringBuilder append(final Object obj) {
        style.append(buffer, null, obj, null);
        return this;
    }
1305785
public static Object callMethod(Scriptable obj, String methodName,
                                    Object[] args)
    {
        return callMethod(null, obj, methodName, args);
    }
303127
function(obj) {
		if (arguments.length < 2) throw new Error('cannot call _.get() without specifying at least one key');

		for (var i = 1; i < arguments.length; i++) {
			if (obj === undefined || obj === null) return;

			obj = obj[arguments[i]];
		}

		return obj;
	}
322883
private void handleObject(final GraphObject obj) {

		final PropertyContainer propertyContainer = obj.getPropertyContainer();
		final String changeLogName                = "structrChangeLog";

		if (propertyContainer.hasProperty(changeLogName)) {

			final Object changeLogSource   = propertyContainer.getProperty(changeLogName);
			if (changeLogSource instanceof String) {

				final String existingChangeLog = (String)changeLogSource;
				if (StringUtils.isNotBlank(existingChangeLog)) {

					if (writeChangelogToDisk(obj, existingChangeLog)) {

						// remove data in case of success
						propertyContainer.removeProperty(changeLogName);
					}
				}
			}
		}

	}
750553
public SmartBinder prepend(String name, Object value) {
        return new SmartBinder(this, signature().prependArg(name, value.getClass()), binder.prepend(value));
    }
1204486
public SmartHandle returnValue(Class<?> type, Object value) {
        return new SmartHandle(signature.changeReturn(type), MethodHandles.filterReturnValue(handle, MethodHandles.constant(type, value)));
    }