Rabbit-R1/switch port/java/sources/com/alibaba/fastjson/parser/ParseContext.java
2024-05-21 17:08:36 -04:00

31 lines
897 B
Java

package com.alibaba.fastjson.parser;
import java.lang.reflect.Type;
/* loaded from: classes2.dex */
public class ParseContext {
public final Object fieldName;
public Object object;
public final ParseContext parent;
private transient String path;
public Type type;
public ParseContext(ParseContext parseContext, Object obj, Object obj2) {
this.parent = parseContext;
this.object = obj;
this.fieldName = obj2;
}
public String toString() {
if (this.path == null) {
if (this.parent == null) {
this.path = "$";
} else if (this.fieldName instanceof Integer) {
this.path = this.parent.toString() + "[" + this.fieldName + "]";
} else {
this.path = this.parent.toString() + "." + this.fieldName;
}
}
return this.path;
}
}