本文整理匯總了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) +
'}';
}
示例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);
}
示例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() + "."));
}
}
示例4: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "Index{" +
"name='" + name + '\'' +
", type=" + type +
", columns=" + Arrays.toString(columns) +
'}';
}
示例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);
}
示例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;
}
示例7: invalidLengths
import java.util.Arrays; //導入方法依賴的package包/類
private IOException invalidLengths(String[] strings) throws IOException {
throw new IOException("unexpected journal line: " + Arrays.toString(strings));
}
示例8: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "AuthenticationMD5Password{" +
"salt=" + Arrays.toString(salt) +
'}';
}
示例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) + "]";
}
示例10: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "DataSpec[" + uri + ", " + Arrays.toString(postBody) + ", " + absoluteStreamPosition
+ ", " + position + ", " + length + ", " + key + ", " + flags + "]";
}
示例11: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "DefaultBeanProjection [beanClass=" + beanClass + ", selection=" + Arrays.toString(selection) + "]";
}
示例12: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "RequestExecute [requestId=" + getRequestId() + ", methodName=" + methodName + ", parameterClasses="
+ Arrays.toString(parameterClasses) + "]";
}
示例13: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "Body ["
+ "targets=" + Arrays.toString(targets)
+ "]";
}
示例14: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "ShellCommand{" +
"arguments=" + Arrays.toString(arguments) +
'}';
}
示例15: toString
import java.util.Arrays; //導入方法依賴的package包/類
@Override
public String toString() {
return "ContainerDelegateStub [errors=" + errors + ", messageKey="
+ messageKey + ", messageParams="
+ Arrays.toString(messageParams) + "]";
}