class com.mongodb.util.ClassMapBasedObjectSerializer extends com.mongodb.util.AbstractObjectSerializer
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: com.mongodb.util.ClassMapBasedObjectSerializer
super_class: com.mongodb.util.AbstractObjectSerializer
{
private final org.bson.util.ClassMap<com.mongodb.util.ObjectSerializer> _serializers;
descriptor: Lorg/bson/util/ClassMap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Lorg/bson/util/ClassMap<Lcom/mongodb/util/ObjectSerializer;>;
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial com.mongodb.util.AbstractObjectSerializer.<init>:()V
1: aload 0
new org.bson.util.ClassMap
dup
invokespecial org.bson.util.ClassMap.<init>:()V
putfield com.mongodb.util.ClassMapBasedObjectSerializer._serializers:Lorg/bson/util/ClassMap;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/mongodb/util/ClassMapBasedObjectSerializer;
void addObjectSerializer(java.lang.Class, com.mongodb.util.ObjectSerializer);
descriptor: (Ljava/lang/Class;Lcom/mongodb/util/ObjectSerializer;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield com.mongodb.util.ClassMapBasedObjectSerializer._serializers:Lorg/bson/util/ClassMap;
aload 1
aload 2
invokevirtual org.bson.util.ClassMap.put:(Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;
pop
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/util/ClassMapBasedObjectSerializer;
0 2 1 c Ljava/lang/Class;
0 2 2 serializer Lcom/mongodb/util/ObjectSerializer;
MethodParameters:
Name Flags
c final
serializer final
public void serialize(java.lang.Object, java.lang.StringBuilder);
descriptor: (Ljava/lang/Object;Ljava/lang/StringBuilder;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 1
astore 3
start local 3 1: aload 3
invokestatic com.mongodb.Bytes.applyEncodingHooks:(Ljava/lang/Object;)Ljava/lang/Object;
astore 3
2: aload 3
ifnonnull 5
3: aload 2
ldc " null "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
4: return
5: StackMap locals: java.lang.Object
StackMap stack:
aconst_null
astore 4
start local 4 6: aload 3
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokestatic org.bson.util.ClassMap.getAncestry:(Ljava/lang/Class;)Ljava/util/List;
astore 5
start local 5 7: aload 5
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 12
StackMap locals: com.mongodb.util.ClassMapBasedObjectSerializer java.lang.Object java.lang.StringBuilder java.lang.Object com.mongodb.util.ObjectSerializer java.util.List top java.util.Iterator
StackMap stack:
8: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.Class
astore 6
start local 6 9: aload 0
getfield com.mongodb.util.ClassMapBasedObjectSerializer._serializers:Lorg/bson/util/ClassMap;
aload 6
invokevirtual org.bson.util.ClassMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.util.ObjectSerializer
astore 4
10: aload 4
ifnull 12
11: goto 13
end local 6 12: StackMap locals:
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 8
13: StackMap locals: com.mongodb.util.ClassMapBasedObjectSerializer java.lang.Object java.lang.StringBuilder java.lang.Object com.mongodb.util.ObjectSerializer java.util.List
StackMap stack:
aload 4
ifnonnull 15
aload 3
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.isArray:()Z
ifeq 15
14: aload 0
getfield com.mongodb.util.ClassMapBasedObjectSerializer._serializers:Lorg/bson/util/ClassMap;
ldc [Ljava/lang/Object;
invokevirtual org.bson.util.ClassMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.util.ObjectSerializer
astore 4
15: StackMap locals:
StackMap stack:
aload 4
ifnonnull 17
16: new java.lang.RuntimeException
dup
new java.lang.StringBuilder
dup
ldc "json can't serialize type : "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 3
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
17: StackMap locals:
StackMap stack:
aload 4
aload 3
aload 2
invokeinterface com.mongodb.util.ObjectSerializer.serialize:(Ljava/lang/Object;Ljava/lang/StringBuilder;)V
18: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lcom/mongodb/util/ClassMapBasedObjectSerializer;
0 19 1 obj Ljava/lang/Object;
0 19 2 buf Ljava/lang/StringBuilder;
1 19 3 objectToSerialize Ljava/lang/Object;
6 19 4 serializer Lcom/mongodb/util/ObjectSerializer;
7 19 5 ancestors Ljava/util/List<Ljava/lang/Class<*>;>;
9 12 6 ancestor Ljava/lang/Class<*>;
MethodParameters:
Name Flags
obj final
buf final
}
SourceFile: "ClassMapBasedObjectSerializer.java"