replacer.java
来自「这是linux下ssl vpn的实现程序」· Java 代码 · 共 35 行
JAVA
35 行
/* HEADER */
package com.sslexplorer.boot;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* When replacement patterns are registered with a
* {@link com.sslexplorer.boot.ReplacementEngine}, an implementation of this
* interface must also be provided.
* <p>
* When the engine is processing some content and finds a match the
* {@link #getReplacement(Pattern, Matcher, String)} method will be invoked
* expecting the replacement value to be returned.
* <p>
* A replacement pattern <i>may</i> also has been provided which the
* implementation may or may not make use of.
*
* @author Brett Smith <a href="mailto: brett@3sp.com"><brett@3sp.com></a>
* @version $Revision: 1.1 $
*/
public interface Replacer {
/**
* Get the value to replace the matched content with.
*
* @param pattern pattern that made the match
* @param matcher the matcher that made the match
* @param replacementPattern the optional replacement pattern that may have
* been provided when the pattern was registered with the replacement
* engine
* @return replacement value or <code>null</code> to replace nothing
*/
public String getReplacement(Pattern pattern, Matcher matcher, String replacementPattern);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?