public class org.apache.cassandra.cql3.functions.ToJsonFct extends org.apache.cassandra.cql3.functions.NativeScalarFunction
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.cql3.functions.ToJsonFct
super_class: org.apache.cassandra.cql3.functions.NativeScalarFunction
{
public static final org.apache.cassandra.cql3.functions.FunctionName NAME;
descriptor: Lorg/apache/cassandra/cql3/functions/FunctionName;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private static final java.util.Map<org.apache.cassandra.db.marshal.AbstractType<?>, org.apache.cassandra.cql3.functions.ToJsonFct> instances;
descriptor: Ljava/util/Map;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Map<Lorg/apache/cassandra/db/marshal/AbstractType<*>;Lorg/apache/cassandra/cql3/functions/ToJsonFct;>;
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/cql3/functions/ToJsonFct;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.cql3.functions.ToJsonFct.$assertionsDisabled:Z
3: ldc "tojson"
invokestatic org.apache.cassandra.cql3.functions.FunctionName.nativeFunction:(Ljava/lang/String;)Lorg/apache/cassandra/cql3/functions/FunctionName;
putstatic org.apache.cassandra.cql3.functions.ToJsonFct.NAME:Lorg/apache/cassandra/cql3/functions/FunctionName;
4: new java.util.concurrent.ConcurrentHashMap
dup
invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
putstatic org.apache.cassandra.cql3.functions.ToJsonFct.instances:Ljava/util/Map;
return
LocalVariableTable:
Start End Slot Name Signature
public static org.apache.cassandra.cql3.functions.ToJsonFct getInstance(java.util.List<org.apache.cassandra.db.marshal.AbstractType<?>>);
descriptor: (Ljava/util/List;)Lorg/apache/cassandra/cql3/functions/ToJsonFct;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=3, args_size=1
start local 0 0: aload 0
invokeinterface java.util.List.size:()I
iconst_1
if_icmpeq 2
1: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "toJson() only accepts one argument (got %d)"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokeinterface java.util.List.size:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.apache.cassandra.db.marshal.AbstractType
astore 1
start local 1 3: getstatic org.apache.cassandra.cql3.functions.ToJsonFct.instances:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.functions.ToJsonFct
astore 2
start local 2 4: aload 2
ifnonnull 7
5: new org.apache.cassandra.cql3.functions.ToJsonFct
dup
aload 1
invokespecial org.apache.cassandra.cql3.functions.ToJsonFct.<init>:(Lorg/apache/cassandra/db/marshal/AbstractType;)V
astore 2
6: getstatic org.apache.cassandra.cql3.functions.ToJsonFct.instances:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
7: StackMap locals: org.apache.cassandra.db.marshal.AbstractType org.apache.cassandra.cql3.functions.ToJsonFct
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 argTypes Ljava/util/List<Lorg/apache/cassandra/db/marshal/AbstractType<*>;>;
3 8 1 fromType Lorg/apache/cassandra/db/marshal/AbstractType<*>;
4 8 2 func Lorg/apache/cassandra/cql3/functions/ToJsonFct;
Exceptions:
throws org.apache.cassandra.exceptions.InvalidRequestException
Signature: (Ljava/util/List<Lorg/apache/cassandra/db/marshal/AbstractType<*>;>;)Lorg/apache/cassandra/cql3/functions/ToJsonFct;
MethodParameters:
Name Flags
argTypes
private void <init>(org.apache.cassandra.db.marshal.AbstractType<?>);
descriptor: (Lorg/apache/cassandra/db/marshal/AbstractType;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 0
ldc "tojson"
getstatic org.apache.cassandra.db.marshal.UTF8Type.instance:Lorg/apache/cassandra/db/marshal/UTF8Type;
iconst_1
anewarray org.apache.cassandra.db.marshal.AbstractType
dup
iconst_0
aload 1
aastore
invokespecial org.apache.cassandra.cql3.functions.NativeScalarFunction.<init>:(Ljava/lang/String;Lorg/apache/cassandra/db/marshal/AbstractType;[Lorg/apache/cassandra/db/marshal/AbstractType;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/cql3/functions/ToJsonFct;
0 2 1 argType Lorg/apache/cassandra/db/marshal/AbstractType<*>;
Signature: (Lorg/apache/cassandra/db/marshal/AbstractType<*>;)V
MethodParameters:
Name Flags
argType
public java.nio.ByteBuffer execute(org.apache.cassandra.transport.ProtocolVersion, java.util.List<java.nio.ByteBuffer>);
descriptor: (Lorg/apache/cassandra/transport/ProtocolVersion;Ljava/util/List;)Ljava/nio/ByteBuffer;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.cql3.functions.ToJsonFct.$assertionsDisabled:Z
ifne 1
aload 2
invokeinterface java.util.List.size:()I
iconst_1
if_icmpeq 1
new java.lang.AssertionError
dup
new java.lang.StringBuilder
dup
ldc "Expected 1 argument for toJson(), but got "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokeinterface java.util.List.size:()I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
1: StackMap locals:
StackMap stack:
aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.nio.ByteBuffer
astore 3
start local 3 2: aload 3
ifnonnull 4
3: ldc "null"
invokestatic org.apache.cassandra.utils.ByteBufferUtil.bytes:(Ljava/lang/String;)Ljava/nio/ByteBuffer;
areturn
4: StackMap locals: java.nio.ByteBuffer
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.functions.ToJsonFct.argTypes:Ljava/util/List;
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.apache.cassandra.db.marshal.AbstractType
aload 3
aload 1
invokevirtual org.apache.cassandra.db.marshal.AbstractType.toJSONString:(Ljava/nio/ByteBuffer;Lorg/apache/cassandra/transport/ProtocolVersion;)Ljava/lang/String;
invokestatic org.apache.cassandra.utils.ByteBufferUtil.bytes:(Ljava/lang/String;)Ljava/nio/ByteBuffer;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/cql3/functions/ToJsonFct;
0 5 1 protocolVersion Lorg/apache/cassandra/transport/ProtocolVersion;
0 5 2 parameters Ljava/util/List<Ljava/nio/ByteBuffer;>;
2 5 3 parameter Ljava/nio/ByteBuffer;
Exceptions:
throws org.apache.cassandra.exceptions.InvalidRequestException
Signature: (Lorg/apache/cassandra/transport/ProtocolVersion;Ljava/util/List<Ljava/nio/ByteBuffer;>;)Ljava/nio/ByteBuffer;
MethodParameters:
Name Flags
protocolVersion
parameters
}
SourceFile: "ToJsonFct.java"