本文整理汇总了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) + "]";
}