com.gargoylesoftware.htmlunit.WebClient.init()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(186)

本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.init()方法的一些代码示例,展示了WebClient.init()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.init()方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:init

WebClient.init介绍

[英]Generic initialization logic used by all constructors. This method does not perform any parameter validation; such validation must be handled by the constructors themselves.
[中]所有构造函数使用的通用初始化逻辑。此方法不执行任何参数验证;此类验证必须由构造函数自己处理。

代码示例

代码示例来源:origin: net.disy.htmlunit/htmlunit

/**
 * Creates a web client instance using the specified {@link BrowserVersion}.
 * @param browserVersion the browser version to simulate
 */
public WebClient(final BrowserVersion browserVersion) {
  WebAssert.notNull("browserVersion", browserVersion);
  init(browserVersion, new ProxyConfig());
}

代码示例来源:origin: org.jvnet.hudson/htmlunit

/**
 * Creates a web client instance using the specified {@link BrowserVersion}.
 * @param browserVersion the browser version to simulate
 */
public WebClient(final BrowserVersion browserVersion) {
  WebAssert.notNull("browserVersion", browserVersion);
  init(browserVersion, new ProxyConfig());
}

代码示例来源:origin: org.jenkins-ci/htmlunit

/**
 * Creates a web client instance using the specified {@link BrowserVersion}.
 * @param browserVersion the browser version to simulate
 */
public WebClient(final BrowserVersion browserVersion) {
  WebAssert.notNull("browserVersion", browserVersion);
  init(browserVersion, new ProxyConfig());
}

代码示例来源:origin: org.jvnet.hudson/htmlunit

/**
 * Creates an instance that will use the specified {@link BrowserVersion} and proxy server.
 * @param browserVersion the browser version to simulate
 * @param proxyHost the server that will act as proxy
 * @param proxyPort the port to use on the proxy server
 */
public WebClient(final BrowserVersion browserVersion, final String proxyHost, final int proxyPort) {
  WebAssert.notNull("browserVersion", browserVersion);
  WebAssert.notNull("proxyHost", proxyHost);
  init(browserVersion, new ProxyConfig(proxyHost, proxyPort));
}

代码示例来源:origin: org.jenkins-ci/htmlunit

/**
 * Creates an instance that will use the specified {@link BrowserVersion} and proxy server.
 * @param browserVersion the browser version to simulate
 * @param proxyHost the server that will act as proxy
 * @param proxyPort the port to use on the proxy server
 */
public WebClient(final BrowserVersion browserVersion, final String proxyHost, final int proxyPort) {
  WebAssert.notNull("browserVersion", browserVersion);
  WebAssert.notNull("proxyHost", proxyHost);
  init(browserVersion, new ProxyConfig(proxyHost, proxyPort));
}

代码示例来源:origin: net.disy.htmlunit/htmlunit

/**
 * Creates an instance that will use the specified {@link BrowserVersion} and proxy server.
 * @param browserVersion the browser version to simulate
 * @param proxyHost the server that will act as proxy
 * @param proxyPort the port to use on the proxy server
 */
public WebClient(final BrowserVersion browserVersion, final String proxyHost, final int proxyPort) {
  WebAssert.notNull("browserVersion", browserVersion);
  WebAssert.notNull("proxyHost", proxyHost);
  init(browserVersion, new ProxyConfig(proxyHost, proxyPort));
}

相关文章

WebClient类方法