本文整理汇总了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");
}
示例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;
}
示例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;
}
示例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;
}