本文整理匯總了Java中org.springframework.util.StringUtils.arrayToDelimitedString方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtils.arrayToDelimitedString方法的具體用法?Java StringUtils.arrayToDelimitedString怎麽用?Java StringUtils.arrayToDelimitedString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.util.StringUtils
的用法示例。
在下文中一共展示了StringUtils.arrayToDelimitedString方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: forMethod
import org.springframework.util.StringUtils; //導入方法依賴的package包/類
/**
* Creates a {@link PublicationTargetIdentifier} for the given {@link Method}.
*
* @param method must not be {@literal null}.
* @return
*/
public static PublicationTargetIdentifier forMethod(Method method) {
String typeName = ClassUtils.getUserClass(method.getDeclaringClass()).getName();
String methodName = method.getName();
String parameterTypes = StringUtils.arrayToDelimitedString(method.getParameterTypes(), ", ");
return PublicationTargetIdentifier.of(String.format("%s.%s(%s)", typeName, methodName, parameterTypes));
}
示例2: setName
import org.springframework.util.StringUtils; //導入方法依賴的package包/類
/**
* Split things up, and assign the first token to {@literal firstName} with everything else to {@literal lastName}.
*
* @param wholeName
*/
public void setName(String wholeName) {
String[] parts = wholeName.split(" ");
this.firstName = parts[0];
if (parts.length > 1) {
this.lastName = StringUtils.arrayToDelimitedString(Arrays.copyOfRange(parts, 1, parts.length), " ");
} else {
this.lastName = "";
}
}
示例3: getName
import org.springframework.util.StringUtils; //導入方法依賴的package包/類
/**
* Builds a name from the provided segments.
*
* @return the credential name
*/
@JsonInclude
public String getName() {
if (segments.length == 1) {
return segments[0];
} else {
return "/" + StringUtils.arrayToDelimitedString(segments, "/");
}
}
示例4: getMessage
import org.springframework.util.StringUtils; //導入方法依賴的package包/類
@Override
public String getMessage() {
return "Parameter conditions \"" + StringUtils.arrayToDelimitedString(this.paramConditions, ", ") +
"\" not met for actual request parameters: " + requestParameterMapToString(this.actualParams);
}
示例5: getAsText
import org.springframework.util.StringUtils; //導入方法依賴的package包/類
@Override
public String getAsText() {
return StringUtils.arrayToDelimitedString(ObjectUtils.toObjectArray(getValue()), this.separator);
}
示例6: toMachineString
import org.springframework.util.StringUtils; //導入方法依賴的package包/類
public static String toMachineString(String str) {
String token = str.toLowerCase().replace("\n", " ").replaceAll("[\\s]", " ").replaceAll("/", " ");
return StringUtils.arrayToDelimitedString(StringUtils.tokenizeToStringArray(token, " "), "-");
}