本文整理汇总了Java中org.apache.commons.lang3.ArrayUtils.toString方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtils.toString方法的具体用法?Java ArrayUtils.toString怎么用?Java ArrayUtils.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.lang3.ArrayUtils
的用法示例。
在下文中一共展示了ArrayUtils.toString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toString
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
@Override
public String toString() {
return StringUtil.simpleClassName(this)
+ '['
+ "grantedQoSLevels=" + ArrayUtils.toString(grantedQoSLevels)
+ ']';
}
示例2: toString
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
@Override
public String toString() {
return StringUtil.simpleClassName(this)
+ '['
+ "subscriptions=" + ArrayUtils.toString(subscriptions)
+ ']';
}
示例3: toString
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
@Override
public String toString() {
return StringUtil.simpleClassName(this)
+ '['
+ "topics=" + ArrayUtils.toString(topics)
+ ']';
}
示例4: readableFormOf
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
public static String readableFormOf(Object arg) {
if (arg == null) {
return "<null>";
} else if (arg.getClass().isArray()) {
return ArrayUtils.toString(arg);
} else if (arg instanceof ExamplesTable) {
return "\n" + ((ExamplesTable) arg).asString();
} else {
return arg.toString();
}
}
示例5: newValidationJsonException
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
/**
* Build a validation exception.
*
* @param error
* the error code to throw.
* @param fields
* Are the fields to report as error.When zero-size, {@value #DEFAULT_FIELD} field name is used.
* @return a validation exception containing given errors.
*/
public static ValidationJsonException newValidationJsonException(final String error, final String... fields) {
final ValidationJsonException exception = new ValidationJsonException(error + ":" + ArrayUtils.toString(fields));
if (fields.length == 0) {
exception.addError(DEFAULT_FIELD, error);
} else {
for (final String field : fields) {
exception.addError(field, error);
}
}
return exception;
}
示例6: detail
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
@Http("/detail")
public void detail(final HttpServletRequest req,
final HttpServletResponse resp) throws ModuleException, IOException {
final String uniqueId = req.getParameter("id");
if (StringUtils.isBlank(uniqueId)) {
// 如果参数不对,则认为找不到对应的沙箱模块,返回400
resp.sendError(SC_BAD_REQUEST, "id parameter was required.");
return;
}
final Module module = moduleManager.get(uniqueId);
if (null == module) {
resp.sendError(SC_BAD_REQUEST, String.format("module[id=%s] is not existed.", uniqueId));
return;
}
final Information info = module.getClass().getAnnotation(Information.class);
final boolean isActivated = moduleManager.isActivated(info.id());
final int cCnt = moduleManager.cCnt(info.id());
final int mCnt = moduleManager.mCnt(info.id());
final File jarFile = moduleManager.getJarFile(info.id());
String sb = "" +
" ID : " + info.id() + "\n" +
" VERSION : " + info.version() + "\n" +
" AUTHOR : " + info.author() + "\n" +
"JAR_FILE : " + jarFile.getPath() + "\n" +
" STATE : " + (isActivated ? "ACTIVE" : "FROZEN") + "\n" +
" MODE : " + ArrayUtils.toString(info.mode()) + "\n" +
" CLASS : " + module.getClass() + "\n" +
" LOADER : " + module.getClass().getClassLoader() + "\n" +
" cCnt : " + cCnt + "\n" +
" mCnt : " + mCnt;
output(resp.getWriter(), sb);
}
示例7: ValidationJsonException
import org.apache.commons.lang3.ArrayUtils; //导入方法依赖的package包/类
/**
* Constructor for a single error.
*
* @param propertyName
* Name of the JSon property
* @param errorText
* I18N key of the message.
* @param parametersKeyValue
* Optional key and value pairs.
*/
public ValidationJsonException(final String propertyName, final Serializable errorText, final Serializable... parametersKeyValue) {
this(propertyName + ":" + errorText + (parametersKeyValue.length > 0 ? ArrayUtils.toString(parametersKeyValue) : ""));
addError(propertyName, errorText, parametersKeyValue);
}