本文整理了Java中software.amazon.awssdk.utils.Validate.notEmpty()
方法的一些代码示例,展示了Validate.notEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Validate.notEmpty()
方法的具体详情如下:
包路径:software.amazon.awssdk.utils.Validate
类名称:Validate
方法名:notEmpty
[英]Validate that the specified argument character sequence is neither null nor a length of zero (no characters); otherwise throwing an exception with the specified message.
Validate.notEmpty(myString, "The string must not be empty");
[中]验证指定的参数字符序列既不是null,也不是长度为零(无字符);否则,将使用指定的消息引发异常。
Validate.notEmpty(myString, "The string must not be empty");
代码示例来源:origin: blox/blox
public BloxTestStack(String bloxEndpoint) {
Validate.notEmpty(bloxEndpoint, "Blox endpoint cannot be empty.");
this.bloxEndpoint = bloxEndpoint;
this.cloudFormationClient = CloudFormationClient.create();
this.ecsClient = ECSClient.create();
this.stacks = new CloudFormationStacks(cloudFormationClient);
this.ecs = new ECSClusterWrapper(ecsClient, stacks);
this.blox =
Blox.builder()
.iamCredentials(new DefaultAWSCredentialsProviderChain())
.endpoint(this.bloxEndpoint)
.build();
}
代码示例来源:origin: aws/aws-sdk-java-v2
/**
* @see #builder()
*/
private AwsCredentialsProviderChain(BuilderImpl builder) {
this.reuseLastProviderEnabled = builder.reuseLastProviderEnabled;
this.credentialsProviders = Collections.unmodifiableList(
Validate.notEmpty(builder.credentialsProviders, "No credential providers were specified."));
}
代码示例来源:origin: software.amazon.awssdk/auth
/**
* @see #builder()
*/
private AwsCredentialsProviderChain(BuilderImpl builder) {
this.reuseLastProviderEnabled = builder.reuseLastProviderEnabled;
this.credentialsProviders = Collections.unmodifiableList(
Validate.notEmpty(builder.credentialsProviders, "No credential providers were specified."));
}
代码示例来源:origin: software.amazon.awssdk/sdk-core
private AndRetryCondition(RetryCondition... conditions) {
Collections.addAll(this.conditions, Validate.notEmpty(conditions, "%s cannot be empty.", "conditions"));
}
代码示例来源:origin: software.amazon.awssdk/sdk-core
@SafeVarargs
SdkHttpServiceProviderChain(SdkHttpServiceProvider<T>... httpProviders) {
this.httpProviders = Arrays.asList(notEmpty(httpProviders, "httpProviders cannot be null or empty"));
}
代码示例来源:origin: aws/aws-sdk-java-v2
@Override
public String marshall(String resourcePath, String paramName, String pathValue) {
Validate.notEmpty(pathValue, "%s cannot be empty.", paramName);
return resourcePath.replace(String.format("{%s+}", paramName),
SdkHttpUtils.urlEncodeIgnoreSlashes(trimLeadingSlash(pathValue)));
}
}
代码示例来源:origin: software.amazon.awssdk/protocol-core
@Override
public String marshall(String resourcePath, String paramName, String pathValue) {
Validate.notEmpty(pathValue, "%s cannot be empty.", paramName);
return resourcePath.replace(String.format("{%s}", paramName), SdkHttpUtils.urlEncode(pathValue));
}
}
代码示例来源:origin: aws/aws-sdk-java-v2
@Override
public String marshall(String resourcePath, String paramName, String pathValue) {
Validate.notEmpty(pathValue, "%s cannot be empty.", paramName);
return resourcePath.replace(String.format("{%s}", paramName), SdkHttpUtils.urlEncode(pathValue));
}
}
代码示例来源:origin: software.amazon.awssdk/protocol-core
@Override
public String marshall(String resourcePath, String paramName, String pathValue) {
Validate.notEmpty(pathValue, "%s cannot be empty.", paramName);
return resourcePath.replace(String.format("{%s+}", paramName),
SdkHttpUtils.urlEncodeIgnoreSlashes(trimLeadingSlash(pathValue)));
}
}
内容来源于网络,如有侵权,请联系作者删除!