package com.alibaba.fastjson.serializer;

import com.alibaba.fastjson.PropertyNamingStrategy;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/* loaded from: classes.dex */
public class JavaBeanSerializer implements ObjectSerializer {
    protected int features;
    private final FieldSerializer[] getters;
    private final FieldSerializer[] sortedGetters;
    protected final String typeKey;
    protected final String typeName;
    private static final char[] true_chars = {'t', 'r', 'u', 'e'};
    private static final char[] false_chars = {'f', 'a', 'l', 's', 'e'};

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public JavaBeanSerializer(Class<?> cls) {
        this(cls, (PropertyNamingStrategy) null);
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public JavaBeanSerializer(Class<?> cls, PropertyNamingStrategy propertyNamingStrategy) {
        this(cls, cls.getModifiers(), null, false, true, true, true, propertyNamingStrategy);
    }

    public JavaBeanSerializer(Class<?> cls, String... strArr) {
        this(cls, cls.getModifiers(), map(strArr), false, true, true, true, null);
    }

    private static Map<String, String> map(String... strArr) {
        HashMap hashMap = new HashMap();
        for (String str : strArr) {
            hashMap.put(str, str);
        }
        return hashMap;
    }

    /* JADX WARN: Removed duplicated region for block: B:31:0x00a7 A[LOOP:2: B:29:0x00a1->B:31:0x00a7, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:35:0x00c6  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x011f  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x0122  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public JavaBeanSerializer(java.lang.Class<?> r15, int r16, java.util.Map<java.lang.String, java.lang.String> r17, boolean r18, boolean r19, boolean r20, boolean r21, com.alibaba.fastjson.PropertyNamingStrategy r22) {
        /*
            Method dump skipped, instructions count: 293
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.alibaba.fastjson.serializer.JavaBeanSerializer.<init>(java.lang.Class, int, java.util.Map, boolean, boolean, boolean, boolean, com.alibaba.fastjson.PropertyNamingStrategy):void");
    }

    /* JADX WARN: Removed duplicated region for block: B:108:0x021b  */
    /* JADX WARN: Removed duplicated region for block: B:128:0x025c  */
    /* JADX WARN: Removed duplicated region for block: B:129:0x025e  */
    /* JADX WARN: Removed duplicated region for block: B:261:0x041d A[Catch: all -> 0x04e8, Exception -> 0x04ee, TryCatch #8 {Exception -> 0x04ee, all -> 0x04e8, blocks: (B:77:0x0172, B:79:0x018d, B:81:0x0191, B:88:0x0196, B:90:0x019a, B:94:0x01a3, B:95:0x01a7, B:97:0x01ad, B:102:0x01c6, B:104:0x01cc, B:106:0x01d1, B:109:0x021d, B:111:0x0221, B:113:0x0228, B:115:0x022c, B:116:0x0231, B:118:0x0235, B:119:0x023a, B:120:0x023e, B:122:0x0244, B:132:0x0264, B:134:0x0268, B:136:0x0270, B:138:0x0274, B:139:0x0279, B:141:0x027d, B:142:0x0282, B:143:0x0289, B:145:0x028f, B:150:0x02a9, B:152:0x02ad, B:154:0x02b4, B:156:0x02b8, B:157:0x02bd, B:159:0x02c1, B:160:0x02c6, B:161:0x02cd, B:163:0x02d3, B:169:0x02f0, B:171:0x02f4, B:177:0x0308, B:179:0x030c, B:181:0x0310, B:183:0x0314, B:185:0x0318, B:187:0x031c, B:189:0x032e, B:191:0x0332, B:193:0x0336, B:195:0x0320, B:197:0x0324, B:201:0x0348, B:203:0x0351, B:205:0x0355, B:206:0x0359, B:207:0x035d, B:209:0x0372, B:212:0x037e, B:213:0x0382, B:219:0x038c, B:220:0x038f, B:223:0x0397, B:225:0x03a2, B:227:0x03a6, B:229:0x03ab, B:233:0x03cb, B:236:0x03d5, B:239:0x03dc, B:243:0x03e6, B:247:0x03f2, B:251:0x03f8, B:253:0x03fc, B:254:0x03fe, B:256:0x0406, B:258:0x040a, B:259:0x040e, B:261:0x041d, B:249:0x0427, B:264:0x042a, B:266:0x042e, B:267:0x0437, B:270:0x043d, B:271:0x0448, B:276:0x045b, B:278:0x0464, B:281:0x046e, B:282:0x0473, B:283:0x047a, B:285:0x047e, B:286:0x0483, B:287:0x048a, B:290:0x0490, B:292:0x0499, B:296:0x04ad, B:297:0x04b2, B:299:0x04b7, B:300:0x04c2, B:301:0x04c7, B:302:0x04cc, B:309:0x01e1, B:311:0x01e5, B:313:0x01f1, B:315:0x01f5, B:316:0x0205, B:318:0x020c, B:343:0x0503, B:344:0x0509, B:346:0x050f, B:352:0x051f, B:354:0x0528, B:357:0x0537, B:359:0x053b, B:360:0x053f), top: B:76:0x0172 }] */
    /* JADX WARN: Removed duplicated region for block: B:333:0x0567 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:341:0x04fd  */
    /* JADX WARN: Removed duplicated region for block: B:357:0x0537 A[Catch: all -> 0x04e8, Exception -> 0x04ee, TRY_ENTER, TryCatch #8 {Exception -> 0x04ee, all -> 0x04e8, blocks: (B:77:0x0172, B:79:0x018d, B:81:0x0191, B:88:0x0196, B:90:0x019a, B:94:0x01a3, B:95:0x01a7, B:97:0x01ad, B:102:0x01c6, B:104:0x01cc, B:106:0x01d1, B:109:0x021d, B:111:0x0221, B:113:0x0228, B:115:0x022c, B:116:0x0231, B:118:0x0235, B:119:0x023a, B:120:0x023e, B:122:0x0244, B:132:0x0264, B:134:0x0268, B:136:0x0270, B:138:0x0274, B:139:0x0279, B:141:0x027d, B:142:0x0282, B:143:0x0289, B:145:0x028f, B:150:0x02a9, B:152:0x02ad, B:154:0x02b4, B:156:0x02b8, B:157:0x02bd, B:159:0x02c1, B:160:0x02c6, B:161:0x02cd, B:163:0x02d3, B:169:0x02f0, B:171:0x02f4, B:177:0x0308, B:179:0x030c, B:181:0x0310, B:183:0x0314, B:185:0x0318, B:187:0x031c, B:189:0x032e, B:191:0x0332, B:193:0x0336, B:195:0x0320, B:197:0x0324, B:201:0x0348, B:203:0x0351, B:205:0x0355, B:206:0x0359, B:207:0x035d, B:209:0x0372, B:212:0x037e, B:213:0x0382, B:219:0x038c, B:220:0x038f, B:223:0x0397, B:225:0x03a2, B:227:0x03a6, B:229:0x03ab, B:233:0x03cb, B:236:0x03d5, B:239:0x03dc, B:243:0x03e6, B:247:0x03f2, B:251:0x03f8, B:253:0x03fc, B:254:0x03fe, B:256:0x0406, B:258:0x040a, B:259:0x040e, B:261:0x041d, B:249:0x0427, B:264:0x042a, B:266:0x042e, B:267:0x0437, B:270:0x043d, B:271:0x0448, B:276:0x045b, B:278:0x0464, B:281:0x046e, B:282:0x0473, B:283:0x047a, B:285:0x047e, B:286:0x0483, B:287:0x048a, B:290:0x0490, B:292:0x0499, B:296:0x04ad, B:297:0x04b2, B:299:0x04b7, B:300:0x04c2, B:301:0x04c7, B:302:0x04cc, B:309:0x01e1, B:311:0x01e5, B:313:0x01f1, B:315:0x01f5, B:316:0x0205, B:318:0x020c, B:343:0x0503, B:344:0x0509, B:346:0x050f, B:352:0x051f, B:354:0x0528, B:357:0x0537, B:359:0x053b, B:360:0x053f), top: B:76:0x0172 }] */
    /* JADX WARN: Removed duplicated region for block: B:373:0x015d  */
    /* JADX WARN: Removed duplicated region for block: B:374:0x0151  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x014f  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x015b  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x0172 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    @Override // com.alibaba.fastjson.serializer.ObjectSerializer
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void write(com.alibaba.fastjson.serializer.JSONSerializer r34, java.lang.Object r35, java.lang.Object r36, java.lang.reflect.Type r37) throws java.io.IOException {
        /*
            Method dump skipped, instructions count: 1417
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.alibaba.fastjson.serializer.JavaBeanSerializer.write(com.alibaba.fastjson.serializer.JSONSerializer, java.lang.Object, java.lang.Object, java.lang.reflect.Type):void");
    }

    public Map<String, Object> getFieldValuesMap(Object obj) throws Exception {
        LinkedHashMap linkedHashMap = new LinkedHashMap(this.sortedGetters.length);
        for (FieldSerializer fieldSerializer : this.sortedGetters) {
            linkedHashMap.put(fieldSerializer.fieldInfo.name, fieldSerializer.getPropertyValue(obj));
        }
        return linkedHashMap;
    }
}
