// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.fasterxml.jackson.databind.ser; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap; import java.util.HashMap; import java.util.concurrent.atomic.AtomicReference; // Referenced classes of package com.fasterxml.jackson.databind.ser: // ResolvableSerializer public final class SerializerCache { public static final class TypeKey extends com.fasterxml.jackson.databind.util.TypeKey { public TypeKey(JavaType javatype, boolean flag) { super(javatype, flag); } public TypeKey(Class class1, boolean flag) { super(class1, flag); } } private final AtomicReference _readOnlyMap = new AtomicReference(); private final HashMap _sharedMap = new HashMap(64); public SerializerCache() { } private final ReadOnlyClassToSerializerMap _makeReadOnlyLookupMap() { this; JVM INSTR monitorenter ; ReadOnlyClassToSerializerMap readonlyclasstoserializermap1 = (ReadOnlyClassToSerializerMap)_readOnlyMap.get(); ReadOnlyClassToSerializerMap readonlyclasstoserializermap; readonlyclasstoserializermap = readonlyclasstoserializermap1; if (readonlyclasstoserializermap1 != null) { break MISSING_BLOCK_LABEL_35; } readonlyclasstoserializermap = ReadOnlyClassToSerializerMap.from(_sharedMap); _readOnlyMap.set(readonlyclasstoserializermap); this; JVM INSTR monitorexit ; return readonlyclasstoserializermap; Exception exception; exception; throw exception; } public void addAndResolveNonTypedSerializer(JavaType javatype, JsonSerializer jsonserializer, SerializerProvider serializerprovider) throws JsonMappingException { this; JVM INSTR monitorenter ; if (_sharedMap.put(new TypeKey(javatype, false), jsonserializer) == null) { _readOnlyMap.set(null); } if (jsonserializer instanceof ResolvableSerializer) { ((ResolvableSerializer)jsonserializer).resolve(serializerprovider); } this; JVM INSTR monitorexit ; return; javatype; this; JVM INSTR monitorexit ; throw javatype; } public void addAndResolveNonTypedSerializer(Class class1, JsonSerializer jsonserializer, SerializerProvider serializerprovider) throws JsonMappingException { this; JVM INSTR monitorenter ; if (_sharedMap.put(new TypeKey(class1, false), jsonserializer) == null) { _readOnlyMap.set(null); } if (jsonserializer instanceof ResolvableSerializer) { ((ResolvableSerializer)jsonserializer).resolve(serializerprovider); } this; JVM INSTR monitorexit ; return; class1; this; JVM INSTR monitorexit ; throw class1; } public void addTypedSerializer(JavaType javatype, JsonSerializer jsonserializer) { this; JVM INSTR monitorenter ; if (_sharedMap.put(new TypeKey(javatype, true), jsonserializer) == null) { _readOnlyMap.set(null); } this; JVM INSTR monitorexit ; return; javatype; this; JVM INSTR monitorexit ; throw javatype; } public void addTypedSerializer(Class class1, JsonSerializer jsonserializer) { this; JVM INSTR monitorenter ; if (_sharedMap.put(new TypeKey(class1, true), jsonserializer) == null) { _readOnlyMap.set(null); } this; JVM INSTR monitorexit ; return; class1; this; JVM INSTR monitorexit ; throw class1; } public void flush() { this; JVM INSTR monitorenter ; _sharedMap.clear(); this; JVM INSTR monitorexit ; return; Exception exception; exception; throw exception; } public ReadOnlyClassToSerializerMap getReadOnlyLookupMap() { ReadOnlyClassToSerializerMap readonlyclasstoserializermap = (ReadOnlyClassToSerializerMap)_readOnlyMap.get(); if (readonlyclasstoserializermap != null) { return readonlyclasstoserializermap; } else { return _makeReadOnlyLookupMap(); } } public int size() { this; JVM INSTR monitorenter ; int i = _sharedMap.size(); this; JVM INSTR monitorexit ; return i; Exception exception; exception; throw exception; } public JsonSerializer typedValueSerializer(JavaType javatype) { this; JVM INSTR monitorenter ; javatype = (JsonSerializer)_sharedMap.get(new TypeKey(javatype, true)); this; JVM INSTR monitorexit ; return javatype; javatype; this; JVM INSTR monitorexit ; throw javatype; } public JsonSerializer typedValueSerializer(Class class1) { this; JVM INSTR monitorenter ; class1 = (JsonSerializer)_sharedMap.get(new TypeKey(class1, true)); this; JVM INSTR monitorexit ; return class1; class1; this; JVM INSTR monitorexit ; throw class1; } public JsonSerializer untypedValueSerializer(JavaType javatype) { this; JVM INSTR monitorenter ; javatype = (JsonSerializer)_sharedMap.get(new TypeKey(javatype, false)); this; JVM INSTR monitorexit ; return javatype; javatype; this; JVM INSTR monitorexit ; throw javatype; } public JsonSerializer untypedValueSerializer(Class class1) { this; JVM INSTR monitorenter ; class1 = (JsonSerializer)_sharedMap.get(new TypeKey(class1, false)); this; JVM INSTR monitorexit ; return class1; class1; this; JVM INSTR monitorexit ; throw class1; } }