Rabbit-R1/switch port/java/sources/com/alibaba/fastjson/serializer/SerialContext.java

27 lines
759 B
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package com.alibaba.fastjson.serializer;
/* loaded from: classes2.dex */
public class SerialContext {
public final int features;
public final Object fieldName;
public final Object object;
public final SerialContext parent;
public SerialContext(SerialContext serialContext, Object obj, Object obj2, int i) {
this.parent = serialContext;
this.object = obj;
this.fieldName = obj2;
this.features = i;
}
public String toString() {
if (this.parent == null) {
return "$";
}
if (this.fieldName instanceof Integer) {
return this.parent.toString() + "[" + this.fieldName + "]";
}
return this.parent.toString() + "." + this.fieldName;
}
}