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


Java Arrays.toString方法代码示例

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


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

示例1: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return "BlockResult{" +
            "number='" + number + '\'' +
            ", hash='" + hash + '\'' +
            ", parentHash='" + parentHash + '\'' +
            ", sha3Uncles='" + sha3Uncles + '\'' +
            ", logsBloom='" + logsBloom + '\'' +
            ", transactionsRoot='" + transactionsRoot + '\'' +
            ", stateRoot='" + stateRoot + '\'' +
            ", receiptsRoot='" + receiptsRoot + '\'' +
            ", miner='" + miner + '\'' +
            ", difficulty='" + difficulty + '\'' +
            ", totalDifficulty='" + totalDifficulty + '\'' +
            ", extraData='" + extraData + '\'' +
            ", size='" + size + '\'' +
            ", gasLimit='" + gasLimit + '\'' +
            ", minimumGasPrice='" + minimumGasPrice + '\'' +
            ", gasUsed='" + gasUsed + '\'' +
            ", timestamp='" + timestamp + '\'' +
            ", transactions=" + Arrays.toString(transactions) +
            ", uncles=" + Arrays.toString(uncles) +
            '}';
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:25,代码来源:Web3.java

示例2: resolveMessage

import java.util.Arrays; //导入方法依赖的package包/类
/**
 * Resolves the message id to the localised string.
 * <p>
 * If a localised message can not be found then the message Id is
 * returned.
 * 
 * @param messageId     the message Id
 * @param params        message parameters
 * @return              the localised message (or the message id if none found)
 */
private static String resolveMessage(String messageId, Object[] params)
{
    String message = I18NUtil.getMessage(messageId, params);
    if (message == null)
    {
        // If a localized string cannot be found then return the messageId and the params
        message = messageId;
        if (params != null)
        {
            message += " - " + Arrays.toString(params);
        }
    }
    return buildErrorLogNumber(message);
}
 
开发者ID:Alfresco,项目名称:alfresco-core,代码行数:25,代码来源:AlfrescoRuntimeException.java

示例3: callBest

import java.util.Arrays; //导入方法依赖的package包/类
/**
 * 智能调用 但是只调用类本身声明方法 按照优先级 匹配
 * <p>
 * 1.完全匹配
 * 2.形参 Object...
 * 3.名字相同 无参数
 *
 * @param name
 * @param args
 * @return
 * @throws ReflectException
 */
public Reflect callBest(String name, Object... args) throws ReflectException {
    Class<?>[] types = types(args);
    Class<?> type = type();

    Method bestMethod = null;
    int level = 0;
    for (Method method : type.getDeclaredMethods()) {
        if (isSimilarSignature(method, name, types)) {
            bestMethod = method;
            level = 2;
            break;
        }
        if (matchObjectMethod(method, name, types)) {
            bestMethod = method;
            level = 1;
            continue;
        }
        if (method.getName().equals(name) && method.getParameterTypes().length == 0 && level == 0) {
            bestMethod = method;
        }
    }
    if (bestMethod != null) {
        if (level == 0) {
            args = new Object[0];
        }
        if (level == 1) {
            Object[] args2 = {args};
            args = args2;
        }
        return on(bestMethod, object, args);
    } else {
        throw new ReflectException("no method found for " + name, new NoSuchMethodException("No best method " + name + " with params " + Arrays.toString(types)
                + " could be found on type " + type() + "."));
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:48,代码来源:Reflect.java

示例4: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
	return "Index{" +
			"name='" + name + '\'' +
			", type=" + type +
			", columns=" + Arrays.toString(columns) +
			'}';
}
 
开发者ID:Craftolution,项目名称:CraftoDB,代码行数:9,代码来源:Index.java

示例5: init

import java.util.Arrays; //导入方法依赖的package包/类
private void init() {
    byte[] magic = this.buffer.readByteArray(MAGIC.length);
    if (CompareUtils.uArrCompare(magic, MAGIC) != 0) {
        throw new IllegalStateException("bad dex patch file magic: " + Arrays.toString(magic));
    }
    this.version = this.buffer.readShort();
    if (CompareUtils.uCompare(this.version, (short) 2) != 0) {
        throw new IllegalStateException("bad dex patch file version: " + this.version + ", " +
                "expected: " + 2);
    }
    this.patchedDexSize = this.buffer.readInt();
    this.firstChunkOffset = this.buffer.readInt();
    this.patchedStringIdSectionOffset = this.buffer.readInt();
    this.patchedTypeIdSectionOffset = this.buffer.readInt();
    this.patchedProtoIdSectionOffset = this.buffer.readInt();
    this.patchedFieldIdSectionOffset = this.buffer.readInt();
    this.patchedMethodIdSectionOffset = this.buffer.readInt();
    this.patchedClassDefSectionOffset = this.buffer.readInt();
    this.patchedMapListSectionOffset = this.buffer.readInt();
    this.patchedTypeListSectionOffset = this.buffer.readInt();
    this.patchedAnnotationSetRefListSectionOffset = this.buffer.readInt();
    this.patchedAnnotationSetSectionOffset = this.buffer.readInt();
    this.patchedClassDataSectionOffset = this.buffer.readInt();
    this.patchedCodeSectionOffset = this.buffer.readInt();
    this.patchedStringDataSectionOffset = this.buffer.readInt();
    this.patchedDebugInfoSectionOffset = this.buffer.readInt();
    this.patchedAnnotationSectionOffset = this.buffer.readInt();
    this.patchedEncodedArraySectionOffset = this.buffer.readInt();
    this.patchedAnnotationsDirectorySectionOffset = this.buffer.readInt();
    this.oldDexSignature = this.buffer.readByteArray(20);
    this.buffer.position(this.firstChunkOffset);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:33,代码来源:DexPatchFile.java

示例6: subHexArray

import java.util.Arrays; //导入方法依赖的package包/类
/**
 * 截取以文本开头的字节数据并以hexStringArray数组返回
 * @param data 目标字节数组
 * @param startHexStr  普通文本,默认以utf8形式
 * @return
 * @throws UnsupportedEncodingException
 */
public String[] subHexArray(byte[] data,String startStr) throws UnsupportedEncodingException
{
	if(data==null||data.length<=0)
	{
		System.out.println("data数据无效!");
		return null;
	}
	String[] result=null;
	//转换原数据
	String[] hexarray=toHexArray(data);
	String hexstr=Arrays.toString(hexarray);
	hexstr=StringUtils.substringBetween(hexstr, "[", "]").replaceAll("\\s", "");//原数据字符串去括号空格
	////转换匹配参数数据
	byte[] startArray=startStr.getBytes("utf-8");//转换为字节
	String[] startHex=toHexArray(startArray);//转换为hex字符数组
	String startHexStr=Arrays.toString(startHex);//转换为hex字符串
	startHexStr=StringUtils.substringBetween(startHexStr, "[", "]").replaceAll("\\s", "");//去括号空格
	String resultHex=StringUtils.substringAfter(hexstr, startHexStr);
	if(resultHex==null)
	{
		//System.out.println("注意:截取内容为空,无数据!");
		return null;
	}
	result=StringUtils.split(resultHex, ',');//重组为hexstr数组
	return result;
}
 
开发者ID:juebanlin,项目名称:util4j,代码行数:34,代码来源:HexStrBytes.java

示例7: invalidLengths

import java.util.Arrays; //导入方法依赖的package包/类
private IOException invalidLengths(String[] strings) throws IOException {
    throw new IOException("unexpected journal line: " + Arrays.toString(strings));
}
 
开发者ID:leibing8912,项目名称:JkImageLoader,代码行数:4,代码来源:DiskLruCache.java

示例8: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
  return "AuthenticationMD5Password{" +
    "salt=" + Arrays.toString(salt) +
    '}';
}
 
开发者ID:vietj,项目名称:reactive-pg-client,代码行数:7,代码来源:AuthenticationMD5Password.java

示例9: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {

    return "JaxRsPath [consumes=" + Arrays.toString(consumes) + ", exact=" + exact + ", method=" + method + ", path=" + path + ", pathRegex=" + pathRegex + ", produces=" + Arrays.toString(produces) + "]";
}
 
开发者ID:trajano,项目名称:app-ms,代码行数:6,代码来源:JaxRsPath.java

示例10: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
  return "DataSpec[" + uri + ", " + Arrays.toString(postBody) + ", " + absoluteStreamPosition
      + ", "  + position + ", " + length + ", " + key + ", " + flags + "]";
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:6,代码来源:DataSpec.java

示例11: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
	return "DefaultBeanProjection [beanClass=" + beanClass + ", selection=" + Arrays.toString(selection) + "]";
}
 
开发者ID:holon-platform,项目名称:holon-core,代码行数:5,代码来源:DefaultBeanProjection.java

示例12: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return "RequestExecute [requestId=" + getRequestId() + ", methodName=" + methodName + ", parameterClasses="
            + Arrays.toString(parameterClasses) + "]";
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:6,代码来源:RequestExecute.java

示例13: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
	return "Body ["
		+ "targets=" + Arrays.toString(targets)
	 + "]";
}
 
开发者ID:tracymiranda,项目名称:dsp4e,代码行数:7,代码来源:DebugProtocol.java

示例14: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return "ShellCommand{" +
            "arguments=" + Arrays.toString(arguments) +
            '}';
}
 
开发者ID:evsinev,项目名称:docker-network-veth,代码行数:7,代码来源:ShellCommand.java

示例15: toString

import java.util.Arrays; //导入方法依赖的package包/类
@Override
public String toString() {
    return "ContainerDelegateStub [errors=" + errors + ", messageKey="
            + messageKey + ", messageParams="
            + Arrays.toString(messageParams) + "]";
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:7,代码来源:UiDelegateStub.java


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