55 lines
1.8 KiB
Java
55 lines
1.8 KiB
Java
package com.thoughtworks.xstream.mapper;
|
|
|
|
import net.sf.cglib.proxy.Enhancer;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class CGLIBMapper extends MapperWrapper {
|
|
private static String DEFAULT_NAMING_MARKER = "$$EnhancerByCGLIB$$";
|
|
static /* synthetic */ Class class$com$thoughtworks$xstream$mapper$CGLIBMapper$Marker;
|
|
private final String alias;
|
|
|
|
public interface Marker {
|
|
}
|
|
|
|
public CGLIBMapper(Mapper mapper) {
|
|
this(mapper, "CGLIB-enhanced-proxy");
|
|
}
|
|
|
|
static /* synthetic */ Class class$(String str) {
|
|
try {
|
|
return Class.forName(str);
|
|
} catch (ClassNotFoundException e) {
|
|
throw new NoClassDefFoundError().initCause(e);
|
|
}
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.mapper.MapperWrapper, com.thoughtworks.xstream.mapper.Mapper
|
|
public Class realClass(String str) {
|
|
if (!str.equals(this.alias)) {
|
|
return super.realClass(str);
|
|
}
|
|
Class cls = class$com$thoughtworks$xstream$mapper$CGLIBMapper$Marker;
|
|
if (cls != null) {
|
|
return cls;
|
|
}
|
|
Class class$ = class$("com.thoughtworks.xstream.mapper.CGLIBMapper$Marker");
|
|
class$com$thoughtworks$xstream$mapper$CGLIBMapper$Marker = class$;
|
|
return class$;
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.mapper.MapperWrapper, com.thoughtworks.xstream.mapper.Mapper
|
|
public String serializedClass(Class cls) {
|
|
String serializedClass = super.serializedClass(cls);
|
|
if (cls == null) {
|
|
return serializedClass;
|
|
}
|
|
String name = cls.getName();
|
|
return (name.equals(serializedClass) && name.indexOf(DEFAULT_NAMING_MARKER) > 0 && Enhancer.isEnhanced(cls)) ? this.alias : serializedClass;
|
|
}
|
|
|
|
public CGLIBMapper(Mapper mapper, String str) {
|
|
super(mapper);
|
|
this.alias = str;
|
|
}
|
|
}
|