public class org.bson.codecs.BsonDocumentCodec implements org.bson.codecs.CollectibleCodec<org.bson.BsonDocument>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bson.codecs.BsonDocumentCodec
super_class: java.lang.Object
{
private static final java.lang.String ID_FIELD_NAME;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "_id"
private static final org.bson.codecs.configuration.CodecRegistry DEFAULT_REGISTRY;
descriptor: Lorg/bson/codecs/configuration/CodecRegistry;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final org.bson.codecs.configuration.CodecRegistry codecRegistry;
descriptor: Lorg/bson/codecs/configuration/CodecRegistry;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.bson.codecs.BsonTypeCodecMap bsonTypeCodecMap;
descriptor: Lorg/bson/codecs/BsonTypeCodecMap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=0, args_size=0
0: iconst_1
anewarray org.bson.codecs.configuration.CodecProvider
dup
iconst_0
new org.bson.codecs.BsonValueCodecProvider
dup
invokespecial org.bson.codecs.BsonValueCodecProvider.<init>:()V
aastore
invokestatic org.bson.codecs.configuration.CodecRegistries.fromProviders:([Lorg/bson/codecs/configuration/CodecProvider;)Lorg/bson/codecs/configuration/CodecRegistry;
putstatic org.bson.codecs.BsonDocumentCodec.DEFAULT_REGISTRY:Lorg/bson/codecs/configuration/CodecRegistry;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getstatic org.bson.codecs.BsonDocumentCodec.DEFAULT_REGISTRY:Lorg/bson/codecs/configuration/CodecRegistry;
invokespecial org.bson.codecs.BsonDocumentCodec.<init>:(Lorg/bson/codecs/configuration/CodecRegistry;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/codecs/BsonDocumentCodec;
public void <init>(org.bson.codecs.configuration.CodecRegistry);
descriptor: (Lorg/bson/codecs/configuration/CodecRegistry;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 1
ifnonnull 3
2: new java.lang.IllegalArgumentException
dup
ldc "Codec registry can not be null"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: org.bson.codecs.BsonDocumentCodec org.bson.codecs.configuration.CodecRegistry
StackMap stack:
aload 0
aload 1
putfield org.bson.codecs.BsonDocumentCodec.codecRegistry:Lorg/bson/codecs/configuration/CodecRegistry;
4: aload 0
new org.bson.codecs.BsonTypeCodecMap
dup
invokestatic org.bson.codecs.BsonValueCodecProvider.getBsonTypeClassMap:()Lorg/bson/codecs/BsonTypeClassMap;
aload 1
invokespecial org.bson.codecs.BsonTypeCodecMap.<init>:(Lorg/bson/codecs/BsonTypeClassMap;Lorg/bson/codecs/configuration/CodecRegistry;)V
putfield org.bson.codecs.BsonDocumentCodec.bsonTypeCodecMap:Lorg/bson/codecs/BsonTypeCodecMap;
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 6 1 codecRegistry Lorg/bson/codecs/configuration/CodecRegistry;
MethodParameters:
Name Flags
codecRegistry final
public org.bson.codecs.configuration.CodecRegistry getCodecRegistry();
descriptor: ()Lorg/bson/codecs/configuration/CodecRegistry;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.bson.codecs.BsonDocumentCodec.codecRegistry:Lorg/bson/codecs/configuration/CodecRegistry;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/codecs/BsonDocumentCodec;
public org.bson.BsonDocument decode(org.bson.BsonReader, org.bson.codecs.DecoderContext);
descriptor: (Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Lorg/bson/BsonDocument;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=5, args_size=3
start local 0 start local 1 start local 2 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 3
start local 3 1: aload 1
invokeinterface org.bson.BsonReader.readStartDocument:()V
2: goto 5
3: StackMap locals: java.util.List
StackMap stack:
aload 1
invokeinterface org.bson.BsonReader.readName:()Ljava/lang/String;
astore 4
start local 4 4: aload 3
new org.bson.BsonElement
dup
aload 4
aload 0
aload 1
aload 2
invokevirtual org.bson.codecs.BsonDocumentCodec.readValue:(Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Lorg/bson/BsonValue;
invokespecial org.bson.BsonElement.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 4 5: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.bson.BsonReader.readBsonType:()Lorg/bson/BsonType;
getstatic org.bson.BsonType.END_OF_DOCUMENT:Lorg/bson/BsonType;
if_acmpne 3
6: aload 1
invokeinterface org.bson.BsonReader.readEndDocument:()V
7: new org.bson.BsonDocument
dup
aload 3
invokespecial org.bson.BsonDocument.<init>:(Ljava/util/List;)V
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 8 1 reader Lorg/bson/BsonReader;
0 8 2 decoderContext Lorg/bson/codecs/DecoderContext;
1 8 3 keyValuePairs Ljava/util/List<Lorg/bson/BsonElement;>;
4 5 4 fieldName Ljava/lang/String;
MethodParameters:
Name Flags
reader final
decoderContext final
protected org.bson.BsonValue readValue(org.bson.BsonReader, org.bson.codecs.DecoderContext);
descriptor: (Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Lorg/bson/BsonValue;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.bson.codecs.BsonDocumentCodec.bsonTypeCodecMap:Lorg/bson/codecs/BsonTypeCodecMap;
aload 1
invokeinterface org.bson.BsonReader.getCurrentBsonType:()Lorg/bson/BsonType;
invokevirtual org.bson.codecs.BsonTypeCodecMap.get:(Lorg/bson/BsonType;)Lorg/bson/codecs/Codec;
aload 1
aload 2
invokeinterface org.bson.codecs.Codec.decode:(Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Ljava/lang/Object;
checkcast org.bson.BsonValue
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 1 1 reader Lorg/bson/BsonReader;
0 1 2 decoderContext Lorg/bson/codecs/DecoderContext;
MethodParameters:
Name Flags
reader final
decoderContext final
public void encode(org.bson.BsonWriter, org.bson.BsonDocument, org.bson.codecs.EncoderContext);
descriptor: (Lorg/bson/BsonWriter;Lorg/bson/BsonDocument;Lorg/bson/codecs/EncoderContext;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 1
invokeinterface org.bson.BsonWriter.writeStartDocument:()V
1: aload 0
aload 1
aload 3
aload 2
invokevirtual org.bson.codecs.BsonDocumentCodec.beforeFields:(Lorg/bson/BsonWriter;Lorg/bson/codecs/EncoderContext;Lorg/bson/BsonDocument;)V
2: aload 2
invokevirtual org.bson.BsonDocument.entrySet:()Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 5
goto 8
StackMap locals: org.bson.codecs.BsonDocumentCodec org.bson.BsonWriter org.bson.BsonDocument org.bson.codecs.EncoderContext top java.util.Iterator
StackMap stack:
3: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.util.Map$Entry
astore 4
start local 4 4: aload 0
aload 3
aload 4
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
checkcast java.lang.String
invokevirtual org.bson.codecs.BsonDocumentCodec.skipField:(Lorg/bson/codecs/EncoderContext;Ljava/lang/String;)Z
ifeq 6
5: goto 8
6: StackMap locals: org.bson.codecs.BsonDocumentCodec org.bson.BsonWriter org.bson.BsonDocument org.bson.codecs.EncoderContext java.util.Map$Entry java.util.Iterator
StackMap stack:
aload 1
aload 4
invokeinterface java.util.Map$Entry.getKey:()Ljava/lang/Object;
checkcast java.lang.String
invokeinterface org.bson.BsonWriter.writeName:(Ljava/lang/String;)V
7: aload 0
aload 1
aload 3
aload 4
invokeinterface java.util.Map$Entry.getValue:()Ljava/lang/Object;
checkcast org.bson.BsonValue
invokevirtual org.bson.codecs.BsonDocumentCodec.writeValue:(Lorg/bson/BsonWriter;Lorg/bson/codecs/EncoderContext;Lorg/bson/BsonValue;)V
end local 4 8: StackMap locals: org.bson.codecs.BsonDocumentCodec org.bson.BsonWriter org.bson.BsonDocument org.bson.codecs.EncoderContext top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
9: aload 1
invokeinterface org.bson.BsonWriter.writeEndDocument:()V
10: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 11 1 writer Lorg/bson/BsonWriter;
0 11 2 value Lorg/bson/BsonDocument;
0 11 3 encoderContext Lorg/bson/codecs/EncoderContext;
4 8 4 entry Ljava/util/Map$Entry<Ljava/lang/String;Lorg/bson/BsonValue;>;
MethodParameters:
Name Flags
writer final
value final
encoderContext final
private void beforeFields(org.bson.BsonWriter, org.bson.codecs.EncoderContext, org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonWriter;Lorg/bson/codecs/EncoderContext;Lorg/bson/BsonDocument;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
invokevirtual org.bson.codecs.EncoderContext.isEncodingCollectibleDocument:()Z
ifeq 3
aload 3
ldc "_id"
invokevirtual org.bson.BsonDocument.containsKey:(Ljava/lang/Object;)Z
ifeq 3
1: aload 1
ldc "_id"
invokeinterface org.bson.BsonWriter.writeName:(Ljava/lang/String;)V
2: aload 0
aload 1
aload 2
aload 3
ldc "_id"
invokevirtual org.bson.BsonDocument.get:(Ljava/lang/Object;)Lorg/bson/BsonValue;
invokevirtual org.bson.codecs.BsonDocumentCodec.writeValue:(Lorg/bson/BsonWriter;Lorg/bson/codecs/EncoderContext;Lorg/bson/BsonValue;)V
3: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 4 1 bsonWriter Lorg/bson/BsonWriter;
0 4 2 encoderContext Lorg/bson/codecs/EncoderContext;
0 4 3 value Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
bsonWriter final
encoderContext final
value final
private boolean skipField(org.bson.codecs.EncoderContext, java.lang.String);
descriptor: (Lorg/bson/codecs/EncoderContext;Ljava/lang/String;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
invokevirtual org.bson.codecs.EncoderContext.isEncodingCollectibleDocument:()Z
ifeq 1
aload 2
ldc "_id"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 2 1 encoderContext Lorg/bson/codecs/EncoderContext;
0 2 2 key Ljava/lang/String;
MethodParameters:
Name Flags
encoderContext final
key final
private void writeValue(org.bson.BsonWriter, org.bson.codecs.EncoderContext, org.bson.BsonValue);
descriptor: (Lorg/bson/BsonWriter;Lorg/bson/codecs/EncoderContext;Lorg/bson/BsonValue;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield org.bson.codecs.BsonDocumentCodec.codecRegistry:Lorg/bson/codecs/configuration/CodecRegistry;
aload 3
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokeinterface org.bson.codecs.configuration.CodecRegistry.get:(Ljava/lang/Class;)Lorg/bson/codecs/Codec;
astore 4
start local 4 1: aload 2
aload 4
aload 1
aload 3
invokevirtual org.bson.codecs.EncoderContext.encodeWithChildContext:(Lorg/bson/codecs/Encoder;Lorg/bson/BsonWriter;Ljava/lang/Object;)V
2: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 3 1 writer Lorg/bson/BsonWriter;
0 3 2 encoderContext Lorg/bson/codecs/EncoderContext;
0 3 3 value Lorg/bson/BsonValue;
1 3 4 codec Lorg/bson/codecs/Codec;
MethodParameters:
Name Flags
writer final
encoderContext final
value final
public java.lang.Class<org.bson.BsonDocument> getEncoderClass();
descriptor: ()Ljava/lang/Class;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: ldc Lorg/bson/BsonDocument;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/codecs/BsonDocumentCodec;
Signature: ()Ljava/lang/Class<Lorg/bson/BsonDocument;>;
public org.bson.BsonDocument generateIdIfAbsentFromDocument(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Lorg/bson/BsonDocument;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.bson.codecs.BsonDocumentCodec.documentHasId:(Lorg/bson/BsonDocument;)Z
ifne 2
1: aload 1
ldc "_id"
new org.bson.BsonObjectId
dup
new org.bson.types.ObjectId
dup
invokespecial org.bson.types.ObjectId.<init>:()V
invokespecial org.bson.BsonObjectId.<init>:(Lorg/bson/types/ObjectId;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
2: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 3 1 document Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
document final
public boolean documentHasId(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ldc "_id"
invokevirtual org.bson.BsonDocument.containsKey:(Ljava/lang/Object;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 1 1 document Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
document final
public org.bson.BsonValue getDocumentId(org.bson.BsonDocument);
descriptor: (Lorg/bson/BsonDocument;)Lorg/bson/BsonValue;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ldc "_id"
invokevirtual org.bson.BsonDocument.get:(Ljava/lang/Object;)Lorg/bson/BsonValue;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bson/codecs/BsonDocumentCodec;
0 1 1 document Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
document final
public org.bson.BsonValue getDocumentId(java.lang.Object);
descriptor: (Ljava/lang/Object;)Lorg/bson/BsonValue;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast org.bson.BsonDocument
invokevirtual org.bson.codecs.BsonDocumentCodec.getDocumentId:(Lorg/bson/BsonDocument;)Lorg/bson/BsonValue;
areturn
LocalVariableTable:
Start End Slot Name Signature
public java.lang.Object generateIdIfAbsentFromDocument(java.lang.Object);
descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast org.bson.BsonDocument
invokevirtual org.bson.codecs.BsonDocumentCodec.generateIdIfAbsentFromDocument:(Lorg/bson/BsonDocument;)Lorg/bson/BsonDocument;
areturn
LocalVariableTable:
Start End Slot Name Signature
public java.lang.Object decode(org.bson.BsonReader, org.bson.codecs.DecoderContext);
descriptor: (Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Ljava/lang/Object;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
aload 2
invokevirtual org.bson.codecs.BsonDocumentCodec.decode:(Lorg/bson/BsonReader;Lorg/bson/codecs/DecoderContext;)Lorg/bson/BsonDocument;
areturn
LocalVariableTable:
Start End Slot Name Signature
public boolean documentHasId(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast org.bson.BsonDocument
invokevirtual org.bson.codecs.BsonDocumentCodec.documentHasId:(Lorg/bson/BsonDocument;)Z
ireturn
LocalVariableTable:
Start End Slot Name Signature
public void encode(org.bson.BsonWriter, java.lang.Object, org.bson.codecs.EncoderContext);
descriptor: (Lorg/bson/BsonWriter;Ljava/lang/Object;Lorg/bson/codecs/EncoderContext;)V
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=4, locals=4, args_size=4
0: aload 0
aload 1
aload 2
checkcast org.bson.BsonDocument
aload 3
invokevirtual org.bson.codecs.BsonDocumentCodec.encode:(Lorg/bson/BsonWriter;Lorg/bson/BsonDocument;Lorg/bson/codecs/EncoderContext;)V
return
LocalVariableTable:
Start End Slot Name Signature
}
Signature: Ljava/lang/Object;Lorg/bson/codecs/CollectibleCodec<Lorg/bson/BsonDocument;>;
SourceFile: "BsonDocumentCodec.java"
InnerClasses:
public abstract Entry = java.util.Map$Entry of java.util.Map