当前位置: 首页>>代码示例>>Java>>正文


Java Assert.doesNotContain方法代码示例

本文整理汇总了Java中org.springframework.util.Assert.doesNotContain方法的典型用法代码示例。如果您正苦于以下问题:Java Assert.doesNotContain方法的具体用法?Java Assert.doesNotContain怎么用?Java Assert.doesNotContain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.util.Assert的用法示例。


在下文中一共展示了Assert.doesNotContain方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validate

import org.springframework.util.Assert; //导入方法依赖的package包/类
@Override
public void validate() {
    Assert.hasLength(networkId, "networkId must have length");
    Assert.doesNotContain(networkId, "/", "slash not allowed in networkIds");
    Assert.notEmpty(addresses, "addresses must not be empty - did DNS resolution fail?");
    Assert.notEmpty(ports, "ports must not be empty");
}
 
开发者ID:jonfryd,项目名称:tifoon,代码行数:8,代码来源:Target.java

示例2: setEnterMessage

import org.springframework.util.Assert; //导入方法依赖的package包/类
/**
 * Set the template used for method entry log messages.
 * This template can contain any of the following placeholders:
 * <ul>
 * <li>{@code $[targetClassName]}</li>
 * <li>{@code $[targetClassShortName]}</li>
 * <li>{@code $[argumentTypes]}</li>
 * <li>{@code $[arguments]}</li>
 * </ul>
 */
public void setEnterMessage(String enterMessage) throws IllegalArgumentException {
	Assert.hasText(enterMessage, "'enterMessage' must not be empty");
	checkForInvalidPlaceholders(enterMessage);
	Assert.doesNotContain(enterMessage, PLACEHOLDER_RETURN_VALUE,
			"enterMessage cannot contain placeholder [" + PLACEHOLDER_RETURN_VALUE + "]");
	Assert.doesNotContain(enterMessage, PLACEHOLDER_EXCEPTION,
			"enterMessage cannot contain placeholder [" + PLACEHOLDER_EXCEPTION + "]");
	Assert.doesNotContain(enterMessage, PLACEHOLDER_INVOCATION_TIME,
			"enterMessage cannot contain placeholder [" + PLACEHOLDER_INVOCATION_TIME + "]");
	this.enterMessage = enterMessage;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:CustomizableTraceInterceptor.java

示例3: setExitMessage

import org.springframework.util.Assert; //导入方法依赖的package包/类
/**
 * Set the template used for method exit log messages.
 * This template can contain any of the following placeholders:
 * <ul>
 * <li>{@code $[targetClassName]}</li>
 * <li>{@code $[targetClassShortName]}</li>
 * <li>{@code $[argumentTypes]}</li>
 * <li>{@code $[arguments]}</li>
 * <li>{@code $[returnValue]}</li>
 * <li>{@code $[invocationTime]}</li>
 * </ul>
 */
public void setExitMessage(String exitMessage) {
	Assert.hasText(exitMessage, "'exitMessage' must not be empty");
	checkForInvalidPlaceholders(exitMessage);
	Assert.doesNotContain(exitMessage, PLACEHOLDER_EXCEPTION,
			"exitMessage cannot contain placeholder [" + PLACEHOLDER_EXCEPTION + "]");
	this.exitMessage = exitMessage;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:CustomizableTraceInterceptor.java

示例4: setExceptionMessage

import org.springframework.util.Assert; //导入方法依赖的package包/类
/**
 * Set the template used for method exception log messages.
 * This template can contain any of the following placeholders:
 * <ul>
 * <li>{@code $[targetClassName]}</li>
 * <li>{@code $[targetClassShortName]}</li>
 * <li>{@code $[argumentTypes]}</li>
 * <li>{@code $[arguments]}</li>
 * <li>{@code $[exception]}</li>
 * </ul>
 */
public void setExceptionMessage(String exceptionMessage) {
	Assert.hasText(exceptionMessage, "'exceptionMessage' must not be empty");
	checkForInvalidPlaceholders(exceptionMessage);
	Assert.doesNotContain(exceptionMessage, PLACEHOLDER_RETURN_VALUE,
			"exceptionMessage cannot contain placeholder [" + PLACEHOLDER_RETURN_VALUE + "]");
	Assert.doesNotContain(exceptionMessage, PLACEHOLDER_INVOCATION_TIME,
			"exceptionMessage cannot contain placeholder [" + PLACEHOLDER_INVOCATION_TIME + "]");
	this.exceptionMessage = exceptionMessage;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:CustomizableTraceInterceptor.java


注:本文中的org.springframework.util.Assert.doesNotContain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。