Specifies whether to autodetect proxy settings.

@param autodetect set to true to use proxy auto detection, false to leave proxy settings
unspecified
@return reference to self
14176
public Proxy setAutodetect(boolean autodetect) {
    if (this.autodetect == autodetect) {
      return this;
    }
    if (autodetect) {
      verifyProxyTypeCompatibility(ProxyType.AUTODETECT);
      this.proxyType = ProxyType.AUTODETECT;
    } else {
      this.proxyType = ProxyType.UNSPECIFIED;
    }
    this.autodetect = autodetect;
    return this;
  }
106459
public void setTrustedProxies(String trustedProxies) {
        if (trustedProxies == null || trustedProxies.length() == 0) {
            this.trustedProxies = null;
        } else {
            this.trustedProxies = Pattern.compile(trustedProxies);
        }
    }
318453
protected Proxy getProxy(final Settings settings, final String serverId, final String host) {
		if (settings == null)
			return null;
		List<Proxy> proxies = settings.getProxies();
		if (proxies == null || proxies.isEmpty())
			return null;

		// search id match first
		if ( serverId != null && !serverId.isEmpty() ) {
			for (Proxy proxy : proxies) {
				if ( proxy.isActive() ) {
					final String proxyId = proxy.getId();
					if ( proxyId != null && !proxyId.isEmpty() ) {
						if ( proxyId.equalsIgnoreCase(serverId) ) {
							if ( ( "http".equalsIgnoreCase( proxy.getProtocol() ) || "https".equalsIgnoreCase( proxy.getProtocol() ) ) ) {
								if ( matchNonProxy( proxy, host ) )
									return null;
								else
									return proxy;
							}
						}
					}
				}
			}
		}

		// search active proxy
		for (Proxy proxy : proxies)
			if ( proxy.isActive() &&
					( "http".equalsIgnoreCase( proxy.getProtocol() ) || "https".equalsIgnoreCase( proxy.getProtocol() ) )
					)
			{
				if ( matchNonProxy( proxy, host ) )
					return null;
				else
					return proxy;
			}

		return null;
	}
1315099
protected void setProxyID(short s)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setProxyID", ""+s);
      proxyID = s;
      proxyIDSet = true;
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setProxyID");
   }
455133
public boolean useProxy() {
        try {
            return getSettings().getString(Settings.KEYS.PROXY_SERVER) != null
                    && getSettings().getBoolean(Settings.KEYS.ANALYZER_NEXUS_USES_PROXY);
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Failed to parse proxy settings.", ise);
            return false;
        }
    }
4941
public function setAutowired($autowired)
    {
        $this->changes['autowired'] = true;

        $this->autowired = (bool) $autowired;

        return $this;
    }
1366047
def autodetect():
    
    logging.getLogger(__name__).debug('auto-detecting QT_API')
    try:
        logging.getLogger(__name__).debug('trying PyQt5')
        import PyQt5
        os.environ[QT_API] = PYQT5_API[0]
        logging.getLogger(__name__).debug('imported PyQt5')
    except ImportError:
        try:
            logging.getLogger(__name__).debug('trying PyQt4')
            setup_apiv2()
            import PyQt4
            os.environ[QT_API] = PYQT4_API[0]
            logging.getLogger(__name__).debug('imported PyQt4')
        except ImportError:
            try:
                logging.getLogger(__name__).debug('trying PySide')
                import PySide
                os.environ[QT_API] = PYSIDE_API[0]
                logging.getLogger(__name__).debug('imported PySide')
            except ImportError:
                raise PythonQtError('No Qt bindings could be found')
449425
def _should_proxy(self, attr):
        
        if attr in type(self).__notproxied__:
            return False
        if _oga(self, "__notproxied__") is True:
            return False
        return True
261587
public boolean isProxyClassDefined(ClassLoader classLoader) {
        try {
            // first check that the proxy has not already been created
            classLoader.loadClass(this.className);
            return true;
        } catch (ClassNotFoundException e) {
            return false;
        }
    }
1260576
public function setAutoGenerateProxyClasses(int $mode) : void
    {
        $this->autoGenerateProxyClasses = $mode;
        $proxyManagerConfig             = $this->getProxyManagerConfiguration();

        switch ($mode) {
            case self::AUTOGENERATE_FILE_NOT_EXISTS:
                $proxyManagerConfig->setGeneratorStrategy(new FileWriterGeneratorStrategy(
                    new FileLocator($proxyManagerConfig->getProxiesTargetDir())
                ));

                break;
            case self::AUTOGENERATE_EVAL:
                $proxyManagerConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());

                break;
            default:
                throw new InvalidArgumentException('Invalid proxy generation strategy given - only AUTOGENERATE_FILE_NOT_EXISTS and AUTOGENERATE_EVAL are supported.');
        }
    }
1102403
public Proxy setSslProxy(String sslProxy) {
    verifyProxyTypeCompatibility(ProxyType.MANUAL);
    this.proxyType = ProxyType.MANUAL;
    this.sslProxy = sslProxy;
    return this;
  }
433272
public AutofitHelper setEnabled(boolean enabled) {
        if (mEnabled != enabled) {
            mEnabled = enabled;

            if (enabled) {
                mTextView.addTextChangedListener(mTextWatcher);
                mTextView.addOnLayoutChangeListener(mOnLayoutChangeListener);

                autofit();
            } else {
                mTextView.removeTextChangedListener(mTextWatcher);
                mTextView.removeOnLayoutChangeListener(mOnLayoutChangeListener);

                mTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
            }
        }
        return this;
    }
439132
def autodetect(self):
        
        for device_type, autodetect_dict in SSH_MAPPER_BASE.items():
            tmp_dict = autodetect_dict.copy()
            call_method = tmp_dict.pop("dispatch")
            autodetect_method = getattr(self, call_method)
            accuracy = autodetect_method(**tmp_dict)
            if accuracy:
                self.potential_matches[device_type] = accuracy
                if accuracy >= 99:  # Stop the loop as we are sure of our match
                    best_match = sorted(
                        self.potential_matches.items(), key=lambda t: t[1], reverse=True
                    )
                    self.connection.disconnect()
                    return best_match[0][0]

        if not self.potential_matches:
            self.connection.disconnect()
            return None

        best_match = sorted(
            self.potential_matches.items(), key=lambda t: t[1], reverse=True
        )
        self.connection.disconnect()
        return best_match[0][0]
1126432
public int getAutowireMode(String attValue) {
    String att = attValue;
    int autowire = AbstractBeanDefinition.AUTOWIRE_NO;
    if (AUTOWIRE_BY_NAME_VALUE.equals(att)) {
      autowire = AbstractBeanDefinition.AUTOWIRE_BY_NAME;
    } else if (AUTOWIRE_BY_TYPE_VALUE.equals(att)) {
      autowire = AbstractBeanDefinition.AUTOWIRE_BY_TYPE;
    } else if (AUTOWIRE_CONSTRUCTOR_VALUE.equals(att)) {
      autowire = AbstractBeanDefinition.AUTOWIRE_CONSTRUCTOR;
    }
    // Else leave default value.
    return autowire;
  }
1355677
private void setupProxyIfNeeded(HttpClientBuilder builder) {
        if (httpProxy != null) {
            builder.setProxy(new HttpHost(httpProxy.getHost(),httpProxy.getPort()));
            if (httpProxy.getUser() != null) {
                AuthScope proxyAuthScope = new AuthScope(httpProxy.getHost(),httpProxy.getPort());
                UsernamePasswordCredentials proxyCredentials = new UsernamePasswordCredentials(httpProxy.getUser(),httpProxy.getPass());
                CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
                credentialsProvider.setCredentials(proxyAuthScope,proxyCredentials);
                builder.setDefaultCredentialsProvider(credentialsProvider);
            }
        }
    }
1365469
def try_auto_configuration(config):
    
    if config.auto_config and not config.offline:
        if not _try_satellite6_configuration(config):
            _try_satellite5_configuration(config)
7539
public static QueryableStateConfiguration disabled() {
		final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue());
		final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue());
		return new QueryableStateConfiguration(proxyPorts, serverPorts, 0, 0, 0, 0);
	}