當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。