public class org.apache.cassandra.cql3.statements.CreateRoleStatement extends org.apache.cassandra.cql3.statements.AuthenticationStatement
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.apache.cassandra.cql3.statements.CreateRoleStatement
  super_class: org.apache.cassandra.cql3.statements.AuthenticationStatement
{
  private final org.apache.cassandra.auth.RoleResource role;
    descriptor: Lorg/apache/cassandra/auth/RoleResource;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final org.apache.cassandra.auth.RoleOptions opts;
    descriptor: Lorg/apache/cassandra/auth/RoleOptions;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final boolean ifNotExists;
    descriptor: Z
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  public void <init>(org.apache.cassandra.cql3.RoleName, org.apache.cassandra.auth.RoleOptions, boolean);
    descriptor: (Lorg/apache/cassandra/cql3/RoleName;Lorg/apache/cassandra/auth/RoleOptions;Z)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=4, args_size=4
        start local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
        start local 1 // org.apache.cassandra.cql3.RoleName name
        start local 2 // org.apache.cassandra.auth.RoleOptions options
        start local 3 // boolean ifNotExists
         0: .line 33
            aload 0 /* this */
            invokespecial org.apache.cassandra.cql3.statements.AuthenticationStatement.<init>:()V
         1: .line 35
            aload 0 /* this */
            aload 1 /* name */
            invokevirtual org.apache.cassandra.cql3.RoleName.getName:()Ljava/lang/String;
            invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
            putfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
         2: .line 36
            aload 0 /* this */
            aload 2 /* options */
            putfield org.apache.cassandra.cql3.statements.CreateRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
         3: .line 37
            aload 0 /* this */
            iload 3 /* ifNotExists */
            putfield org.apache.cassandra.cql3.statements.CreateRoleStatement.ifNotExists:Z
         4: .line 38
            return
        end local 3 // boolean ifNotExists
        end local 2 // org.apache.cassandra.auth.RoleOptions options
        end local 1 // org.apache.cassandra.cql3.RoleName name
        end local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
      LocalVariableTable:
        Start  End  Slot         Name  Signature
            0    5     0         this  Lorg/apache/cassandra/cql3/statements/CreateRoleStatement;
            0    5     1         name  Lorg/apache/cassandra/cql3/RoleName;
            0    5     2      options  Lorg/apache/cassandra/auth/RoleOptions;
            0    5     3  ifNotExists  Z
    MethodParameters:
             Name  Flags
      name         
      options      
      ifNotExists  

  public void checkAccess(org.apache.cassandra.service.ClientState);
    descriptor: (Lorg/apache/cassandra/service/ClientState;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 42
            aload 0 /* this */
            aload 1 /* state */
            getstatic org.apache.cassandra.auth.Permission.CREATE:Lorg/apache/cassandra/auth/Permission;
            invokestatic org.apache.cassandra.auth.RoleResource.root:()Lorg/apache/cassandra/auth/RoleResource;
            invokespecial org.apache.cassandra.cql3.statements.AuthenticationStatement.checkPermission:(Lorg/apache/cassandra/service/ClientState;Lorg/apache/cassandra/auth/Permission;Lorg/apache/cassandra/auth/RoleResource;)V
         1: .line 43
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.getSuperuser:()Lcom/google/common/base/Optional;
            invokevirtual com.google.common.base.Optional.isPresent:()Z
            ifeq 4
         2: .line 45
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.getSuperuser:()Lcom/google/common/base/Optional;
            invokevirtual com.google.common.base.Optional.get:()Ljava/lang/Object;
            checkcast java.lang.Boolean
            invokevirtual java.lang.Boolean.booleanValue:()Z
            ifeq 4
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
            invokevirtual org.apache.cassandra.auth.AuthenticatedUser.isSuper:()Z
            ifne 4
         3: .line 46
            new org.apache.cassandra.exceptions.UnauthorizedException
            dup
            ldc "Only superusers can create a role with superuser status"
            invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 48
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    5     0   this  Lorg/apache/cassandra/cql3/statements/CreateRoleStatement;
            0    5     1  state  Lorg/apache/cassandra/service/ClientState;
    Exceptions:
      throws org.apache.cassandra.exceptions.UnauthorizedException
    MethodParameters:
       Name  Flags
      state  

  public void validate(org.apache.cassandra.service.ClientState);
    descriptor: (Lorg/apache/cassandra/service/ClientState;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=7, locals=2, args_size=2
        start local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 52
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.validate:()V
         1: .line 54
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
            invokevirtual java.lang.String.isEmpty:()Z
            ifeq 3
         2: .line 55
            new org.apache.cassandra.exceptions.InvalidRequestException
            dup
            ldc "Role name can't be an empty string"
            invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 58
      StackMap locals:
      StackMap stack:
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.ensureNotAnonymous:()V
         4: .line 60
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.ifNotExists:Z
            ifne 6
            invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokeinterface org.apache.cassandra.auth.IRoleManager.isExistingRole:(Lorg/apache/cassandra/auth/RoleResource;)Z
            ifeq 6
         5: .line 61
            new org.apache.cassandra.exceptions.InvalidRequestException
            dup
            ldc "%s already exists"
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
            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
         6: .line 62
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    7     0   this  Lorg/apache/cassandra/cql3/statements/CreateRoleStatement;
            0    7     1  state  Lorg/apache/cassandra/service/ClientState;
    Exceptions:
      throws org.apache.cassandra.exceptions.RequestValidationException
    MethodParameters:
       Name  Flags
      state  

  public org.apache.cassandra.transport.messages.ResultMessage execute(org.apache.cassandra.service.ClientState);
    descriptor: (Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/transport/messages/ResultMessage;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 67
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.ifNotExists:Z
            ifeq 2
            invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokeinterface org.apache.cassandra.auth.IRoleManager.isExistingRole:(Lorg/apache/cassandra/auth/RoleResource;)Z
            ifeq 2
         1: .line 68
            aconst_null
            areturn
         2: .line 70
      StackMap locals:
      StackMap stack:
            invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokeinterface org.apache.cassandra.auth.IRoleManager.createRole:(Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleOptions;)V
         3: .line 71
            aload 0 /* this */
            aload 1 /* state */
            invokevirtual org.apache.cassandra.cql3.statements.CreateRoleStatement.grantPermissionsToCreator:(Lorg/apache/cassandra/service/ClientState;)V
         4: .line 72
            aconst_null
            areturn
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    5     0   this  Lorg/apache/cassandra/cql3/statements/CreateRoleStatement;
            0    5     1  state  Lorg/apache/cassandra/service/ClientState;
    Exceptions:
      throws org.apache.cassandra.exceptions.RequestExecutionException, org.apache.cassandra.exceptions.RequestValidationException
    MethodParameters:
       Name  Flags
      state  

  private void grantPermissionsToCreator(org.apache.cassandra.service.ClientState);
    descriptor: (Lorg/apache/cassandra/service/ClientState;)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=5, locals=2, args_size=2
        start local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 87
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
            invokevirtual org.apache.cassandra.auth.AuthenticatedUser.isAnonymous:()Z
            ifne 8
         1: .line 91
            invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthorizer:()Lorg/apache/cassandra/auth/IAuthorizer;
            getstatic org.apache.cassandra.auth.AuthenticatedUser.SYSTEM_USER:Lorg/apache/cassandra/auth/AuthenticatedUser;
         2: .line 92
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokevirtual org.apache.cassandra.auth.RoleResource.applicablePermissions:()Ljava/util/Set;
         3: .line 93
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.CreateRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
         4: .line 94
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
            invokevirtual org.apache.cassandra.auth.AuthenticatedUser.getName:()Ljava/lang/String;
            invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
         5: .line 91
            invokeinterface org.apache.cassandra.auth.IAuthorizer.grant:(Lorg/apache/cassandra/auth/AuthenticatedUser;Ljava/util/Set;Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/auth/RoleResource;)V
         6: .line 95
            goto 8
         7: .line 96
      StackMap locals:
      StackMap stack: java.lang.UnsupportedOperationException
            pop
         8: .line 101
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.CreateRoleStatement this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    9     0   this  Lorg/apache/cassandra/cql3/statements/CreateRoleStatement;
            0    9     1  state  Lorg/apache/cassandra/service/ClientState;
      Exception table:
        from    to  target  type
           1     6       7  Class java.lang.UnsupportedOperationException
    MethodParameters:
       Name  Flags
      state  
}
SourceFile: "CreateRoleStatement.java"