org.springframework.util.StringUtils#mergeStringArrays ( )源码实例Demo

下面列出了org.springframework.util.StringUtils#mergeStringArrays ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

public void initStandardMapping(String[] modes, RequestMethod[] methods, String[] params, String[] headers) {
	for (String mode : modes) {
		this.modes.add(new PortletMode(mode));
	}
	for (RequestMethod method : methods) {
		this.methods.add(method.name());
	}
	this.params = StringUtils.mergeStringArrays(this.params, params);
	this.headers = StringUtils.mergeStringArrays(this.headers, headers);
}
 
public void initPhaseMapping(String phase, String value, String[] params) {
	if (this.phase != null) {
		throw new IllegalStateException(
				"Invalid mapping - more than one phase specified: '" + this.phase + "', '" + phase + "'");
	}
	this.phase = phase;
	this.value = value;
	this.params = StringUtils.mergeStringArrays(this.params, params);
}