当前位置: 首页>>代码示例>>Java>>正文


Java Arrays.deepToString方法代码示例

本文整理汇总了Java中java.util.Arrays.deepToString方法的典型用法代码示例。如果您正苦于以下问题:Java Arrays.deepToString方法的具体用法?Java Arrays.deepToString怎么用?Java Arrays.deepToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Arrays的用法示例。


在下文中一共展示了Arrays.deepToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    StringBuilder sb = new StringBuilder("{");
    for (int i = 0; i < names.length; i++) {
        if (i > 0)
            sb.append(", ");
        sb.append(names[i]).append("=");
        Object v = values[i];
        if (v != null && v.getClass().isArray()) {
            String s = Arrays.deepToString(new Object[] {v});
            s = s.substring(1, s.length() - 1); // remove [...]
            v = s;
        }
        sb.append(String.valueOf(v));
    }
    return sb.append("}").toString();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:ImmutableDescriptor.java

示例2: traceMethod

import java.util.Arrays; //导入方法依赖的package包/类
@Around("(execution (public * org.jasig.cas..*.*(..))) && !(execution( * org.jasig.cas..*.set*(..)))")
public Object traceMethod(final ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
    Object returnVal = null;
    final Logger logger = this.getLog(proceedingJoinPoint);
    final String methodName = proceedingJoinPoint.getSignature().getName();

    try {
        if (logger.isTraceEnabled()) {
            final Object[] args = proceedingJoinPoint.getArgs();
            final String arguments;
            if (args == null || args.length == 0) {
                arguments = "";
            } else {
                arguments = Arrays.deepToString(args);
            }
            logger.trace("Entering method [{}] with arguments [{}]", methodName, arguments);
        }
        returnVal = proceedingJoinPoint.proceed();
        return returnVal;
    } finally {
        logger.trace("Leaving method [{}] with return value [{}].", methodName,
                    (returnVal != null ? returnVal.toString() : "null"));
    }
}
 
开发者ID:luotuo,项目名称:cas4.0.x-server-wechat,代码行数:25,代码来源:LogAspect.java

示例3: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return "ExploitReport{" +
            "exploits=" + Arrays.deepToString(exploits.toArray()) +
            ", facets=" + facets +
            ", total=" + total +
            '}';
}
 
开发者ID:fooock,项目名称:jshodan,代码行数:9,代码来源:ExploitReport.java

示例4: assertArrayEquals

import java.util.Arrays; //导入方法依赖的package包/类
static void assertArrayEquals(Object[] actual, Object[] expected, String what, String prefix) {
    if (!Objects.deepEquals(actual, expected)) {
        throw new RuntimeException("Bad " + what + ":"
                + "\n\t expected: " + expected == null ? "null" : Arrays.deepToString(expected)
                + "\n\t   actual: " + actual == null ? "null" : Arrays.deepToString(actual));
    }
    System.out.println(prefix + "Got expected " + what + ": " + Arrays.deepToString(actual));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:9,代码来源:LoggerInterfaceTest.java

示例5: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return "AliasActions["
            + "type=" + type
            + ",indices=" + Arrays.toString(indices)
            + ",aliases=" + Arrays.deepToString(aliases)
            + ",filter=" + filter
            + ",routing=" + routing
            + ",indexRouting=" + indexRouting
            + ",searchRouting=" + searchRouting
            + "]";
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:IndicesAliasesRequest.java

示例6: assertArrayEquals

import java.util.Arrays; //导入方法依赖的package包/类
public static void assertArrayEquals(Object[] arr1, Object[] arr2) {
    if (arr1 == null && arr2 == null)  return;
    if (arr1 != null && arr2 != null && arr1.length == arr2.length) {
        for (int i = 0; i < arr1.length; i++) {
            assertEquals(arr1[i], arr2[i]);
        }
        return;
    }
    throw new AssertionError(Arrays.deepToString(arr1) + " != " + Arrays.deepToString(arr2));
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:11,代码来源:VarargsArrayTest.java

示例7: d

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public void d(Object object) {
  String message;
  if (object.getClass().isArray()) {
    message = Arrays.deepToString((Object[]) object);
  } else {
    message = object.toString();
  }
  log(DEBUG, null, message);
}
 
开发者ID:vsona,项目名称:RxJava2RetrofitDemo,代码行数:11,代码来源:LoggerPrinter.java

示例8: getRequestParameterList

import java.util.Arrays; //导入方法依赖的package包/类
/**
 * 功能:获取Post的参数串
 * 
 * @param request
 * @return 返回一个数组,值如下: abc=12 def=34 ... hij=xx
 */
public static List<String> getRequestParameterList(HttpServletRequest request) {
	Map<String, String[]> parameterMap = request.getParameterMap();
	List<String> resultList;
	Set<Entry<String, String[]>> parameterSet = parameterMap.entrySet();
	if (parameterSet == null || parameterSet.isEmpty()) {
		return Collections.emptyList();
	}
	resultList = new ArrayList<String>();
	String value;
	for (Iterator<Entry<String, String[]>> iterator = parameterSet.iterator(); iterator.hasNext();) {
		Entry<String, String[]> entry = iterator.next();
		String key = entry.getKey();
		String[] valueObject = entry.getValue();

		if (valueObject == null) {
			value = "";
		} else  {
			String[] valueArr = valueObject;
			if (valueArr.length == 1) {
				value = valueArr[0];
			} else {
				value = Arrays.deepToString((String[]) valueObject);
			}
		} 
		resultList.add(key + "=" + value);
	}
	return resultList;
}
 
开发者ID:fier-liu,项目名称:FCat,代码行数:35,代码来源:PathUtil.java

示例9: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return Arrays.deepToString(toArray());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:PlatformLoggerBridgeTest.java

示例10: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return Arrays.deepToString(toArray(false));
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:BaseLoggerBridgeTest.java

示例11: toString

import java.util.Arrays; //导入方法依赖的package包/类
public static String toString(Object[] objects) {
    return Arrays.deepToString(objects);
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:4,代码来源:ConvertUtils.java

示例12: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
	return Arrays.deepToString(fields);
}
 
开发者ID:pSpaces,项目名称:jSpace,代码行数:5,代码来源:Tuple.java

示例13: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString(Object value) {
    return Arrays.deepToString((Object[]) value);
}
 
开发者ID:vladmihalcea,项目名称:hibernate-types,代码行数:5,代码来源:AbstractArrayTypeDescriptor.java

示例14: toString

import java.util.Arrays; //导入方法依赖的package包/类
public String toString() {
    return "HoverEvent(action=" + (Object)((Object)this.getAction()) + ", value=" + Arrays.deepToString(this.getValue()) + ")";
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:HoverEvent.java

示例15: apply

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String apply(Object arg) {
  String s = Arrays.deepToString(new Object[] {arg});
  return s.substring(1, s.length() - 1); // cut off brackets
}
 
开发者ID:maetrive,项目名称:businessworks,代码行数:6,代码来源:Annotations.java


注:本文中的java.util.Arrays.deepToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。