what-the-bank/sources/org/simpleframework/xml/strategy/ReadState.java

29 lines
794 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.simpleframework.xml.strategy;
import org.simpleframework.xml.util.WeakCache;
/* loaded from: classes6.dex */
class ReadState extends WeakCache<ReadGraph> {
private final Contract contract;
private final Loader loader = new Loader();
public ReadState(Contract contract) {
this.contract = contract;
}
public ReadGraph find(Object obj) throws Exception {
ReadGraph fetch = fetch(obj);
return fetch != null ? fetch : create(obj);
}
private ReadGraph create(Object obj) throws Exception {
ReadGraph fetch = fetch(obj);
if (fetch != null) {
return fetch;
}
ReadGraph readGraph = new ReadGraph(this.contract, this.loader);
cache(obj, readGraph);
return readGraph;
}
}