本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.getScriptPreProcessor()
方法的一些代码示例,展示了WebClient.getScriptPreProcessor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.getScriptPreProcessor()
方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:getScriptPreProcessor
[英]Returns the script pre processor for this webclient.
[中]返回此webclient的脚本预处理器。
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
/**
* Pre process the specified source code in the context of the given page using the processor specified
* in the webclient. This method delegates to the pre processor handler specified in the
* <code>WebClient</code>. If no pre processor handler is defined, the original source code is returned
* unchanged.
* @param htmlPage the page
* @param sourceCode the code to process
* @param sourceName a name for the chunk of code (used in error messages)
* @param lineNumber the line number of the source code
* @param htmlElement the HTML element that will act as the context
* @return the source code after being pre processed
* @see com.gargoylesoftware.htmlunit.ScriptPreProcessor
*/
protected String preProcess(
final HtmlPage htmlPage, final String sourceCode, final String sourceName, final int lineNumber,
final HtmlElement htmlElement) {
String newSourceCode = sourceCode;
final ScriptPreProcessor preProcessor = webClient_.getScriptPreProcessor();
if (preProcessor != null) {
newSourceCode = preProcessor.preProcess(htmlPage, sourceCode, sourceName, lineNumber, htmlElement);
if (newSourceCode == null) {
newSourceCode = "";
}
}
return newSourceCode;
}
代码示例来源:origin: net.disy.htmlunit/htmlunit
/**
* Pre process the specified source code in the context of the given page using the processor specified
* in the webclient. This method delegates to the pre processor handler specified in the
* <code>WebClient</code>. If no pre processor handler is defined, the original source code is returned
* unchanged.
* @param htmlPage the page
* @param sourceCode the code to process
* @param sourceName a name for the chunk of code (used in error messages)
* @param htmlElement the HTML element that will act as the context
* @return the source code after being pre processed
* @see com.gargoylesoftware.htmlunit.ScriptPreProcessor
*/
protected String preProcess(
final HtmlPage htmlPage, final String sourceCode, final String sourceName, final HtmlElement htmlElement) {
String newSourceCode = sourceCode;
final ScriptPreProcessor preProcessor = webClient_.getScriptPreProcessor();
if (preProcessor != null) {
newSourceCode = preProcessor.preProcess(htmlPage, sourceCode, sourceName, htmlElement);
if (newSourceCode == null) {
newSourceCode = "";
}
}
return newSourceCode;
}
代码示例来源:origin: HtmlUnit/htmlunit
/**
* Pre process the specified source code in the context of the given page using the processor specified
* in the webclient. This method delegates to the pre processor handler specified in the
* <code>WebClient</code>. If no pre processor handler is defined, the original source code is returned
* unchanged.
* @param htmlPage the page
* @param sourceCode the code to process
* @param sourceName a name for the chunk of code (used in error messages)
* @param lineNumber the line number of the source code
* @param htmlElement the HTML element that will act as the context
* @return the source code after being pre processed
* @see com.gargoylesoftware.htmlunit.ScriptPreProcessor
*/
protected String preProcess(
final HtmlPage htmlPage, final String sourceCode, final String sourceName, final int lineNumber,
final HtmlElement htmlElement) {
String newSourceCode = sourceCode;
final ScriptPreProcessor preProcessor = webClient_.getScriptPreProcessor();
if (preProcessor != null) {
newSourceCode = preProcessor.preProcess(htmlPage, sourceCode, sourceName, lineNumber, htmlElement);
if (newSourceCode == null) {
newSourceCode = "";
}
}
return newSourceCode;
}
代码示例来源:origin: org.jvnet.hudson/htmlunit
/**
* Pre process the specified source code in the context of the given page using the processor specified
* in the webclient. This method delegates to the pre processor handler specified in the
* <code>WebClient</code>. If no pre processor handler is defined, the original source code is returned
* unchanged.
* @param htmlPage the page
* @param sourceCode the code to process
* @param sourceName a name for the chunk of code (used in error messages)
* @param htmlElement the HTML element that will act as the context
* @return the source code after being pre processed
* @see com.gargoylesoftware.htmlunit.ScriptPreProcessor
*/
protected String preProcess(
final HtmlPage htmlPage, final String sourceCode, final String sourceName, final HtmlElement htmlElement) {
String newSourceCode = sourceCode;
final ScriptPreProcessor preProcessor = webClient_.getScriptPreProcessor();
if (preProcessor != null) {
newSourceCode = preProcessor.preProcess(htmlPage, sourceCode, sourceName, htmlElement);
if (newSourceCode == null) {
newSourceCode = "";
}
}
return newSourceCode;
}
代码示例来源:origin: org.jenkins-ci/htmlunit
/**
* Pre process the specified source code in the context of the given page using the processor specified
* in the webclient. This method delegates to the pre processor handler specified in the
* <code>WebClient</code>. If no pre processor handler is defined, the original source code is returned
* unchanged.
* @param htmlPage the page
* @param sourceCode the code to process
* @param sourceName a name for the chunk of code (used in error messages)
* @param htmlElement the HTML element that will act as the context
* @return the source code after being pre processed
* @see com.gargoylesoftware.htmlunit.ScriptPreProcessor
*/
protected String preProcess(
final HtmlPage htmlPage, final String sourceCode, final String sourceName, final HtmlElement htmlElement) {
String newSourceCode = sourceCode;
final ScriptPreProcessor preProcessor = webClient_.getScriptPreProcessor();
if (preProcessor != null) {
newSourceCode = preProcessor.preProcess(htmlPage, sourceCode, sourceName, htmlElement);
if (newSourceCode == null) {
newSourceCode = "";
}
}
return newSourceCode;
}
内容来源于网络,如有侵权,请联系作者删除!