當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。