本文整理匯總了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);
}