public class org.apache.cassandra.cql3.statements.AlterRoleStatement 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.AlterRoleStatement
  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

  public void <init>(org.apache.cassandra.cql3.RoleName, org.apache.cassandra.auth.RoleOptions);
    descriptor: (Lorg/apache/cassandra/cql3/RoleName;Lorg/apache/cassandra/auth/RoleOptions;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=3, args_size=3
        start local 0 // org.apache.cassandra.cql3.statements.AlterRoleStatement this
        start local 1 // org.apache.cassandra.cql3.RoleName name
        start local 2 // org.apache.cassandra.auth.RoleOptions opts
         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.AlterRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
         2: .line 36
            aload 0 /* this */
            aload 2 /* opts */
            putfield org.apache.cassandra.cql3.statements.AlterRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
         3: .line 37
            return
        end local 2 // org.apache.cassandra.auth.RoleOptions opts
        end local 1 // org.apache.cassandra.cql3.RoleName name
        end local 0 // org.apache.cassandra.cql3.statements.AlterRoleStatement this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    4     0  this  Lorg/apache/cassandra/cql3/statements/AlterRoleStatement;
            0    4     1  name  Lorg/apache/cassandra/cql3/RoleName;
            0    4     2  opts  Lorg/apache/cassandra/auth/RoleOptions;
    MethodParameters:
      Name  Flags
      name  
      opts  

  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.AlterRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 41
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.validate:()V
         1: .line 43
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.isEmpty:()Z
            ifeq 3
         2: .line 44
            new org.apache.cassandra.exceptions.InvalidRequestException
            dup
            ldc "ALTER [ROLE|USER] can't be empty"
            invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 47
      StackMap locals:
      StackMap stack:
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.ensureNotAnonymous:()V
         4: .line 48
            invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokeinterface org.apache.cassandra.auth.IRoleManager.isExistingRole:(Lorg/apache/cassandra/auth/RoleResource;)Z
            ifne 6
         5: .line 49
            new org.apache.cassandra.exceptions.InvalidRequestException
            dup
            ldc "%s doesn't exist"
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.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 50
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.AlterRoleStatement this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    7     0   this  Lorg/apache/cassandra/cql3/statements/AlterRoleStatement;
            0    7     1  state  Lorg/apache/cassandra/service/ClientState;
    Exceptions:
      throws org.apache.cassandra.exceptions.RequestValidationException
    MethodParameters:
       Name  Flags
      state  

  public void checkAccess(org.apache.cassandra.service.ClientState);
    descriptor: (Lorg/apache/cassandra/service/ClientState;)V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=7, locals=6, args_size=2
        start local 0 // org.apache.cassandra.cql3.statements.AlterRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 54
            aload 1 /* state */
            invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
            astore 2 /* user */
        start local 2 // org.apache.cassandra.auth.AuthenticatedUser user
         1: .line 55
            aload 2 /* user */
            invokevirtual org.apache.cassandra.auth.AuthenticatedUser.isSuper:()Z
            istore 3 /* isSuper */
        start local 3 // boolean isSuper
         2: .line 57
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.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
            aload 2 /* user */
            invokevirtual org.apache.cassandra.auth.AuthenticatedUser.getRoles:()Ljava/util/Set;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
            ifeq 4
         3: .line 58
            new org.apache.cassandra.exceptions.UnauthorizedException
            dup
            ldc "You aren't allowed to alter your own superuser status or that of a role granted to you"
            invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 61
      StackMap locals: org.apache.cassandra.auth.AuthenticatedUser int
      StackMap stack:
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.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 6
            iload 3 /* isSuper */
            ifne 6
         5: .line 62
            new org.apache.cassandra.exceptions.UnauthorizedException
            dup
            ldc "Only superusers are allowed to alter superuser status"
            invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;)V
            athrow
         6: .line 65
      StackMap locals:
      StackMap stack:
            iload 3 /* isSuper */
            ifeq 8
         7: .line 66
            return
         8: .line 69
      StackMap locals:
      StackMap stack:
            aload 2 /* user */
            invokevirtual org.apache.cassandra.auth.AuthenticatedUser.getName:()Ljava/lang/String;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifeq 15
         9: .line 71
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.getOptions:()Ljava/util/Map;
            invokeinterface java.util.Map.keySet:()Ljava/util/Set;
            invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
            astore 5
            goto 13
      StackMap locals: org.apache.cassandra.cql3.statements.AlterRoleStatement org.apache.cassandra.service.ClientState org.apache.cassandra.auth.AuthenticatedUser int top java.util.Iterator
      StackMap stack:
        10: aload 5
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.apache.cassandra.auth.IRoleManager$Option
            astore 4 /* option */
        start local 4 // org.apache.cassandra.auth.IRoleManager$Option option
        11: .line 73
            invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
            invokeinterface org.apache.cassandra.auth.IRoleManager.alterableOptions:()Ljava/util/Set;
            aload 4 /* option */
            invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
            ifne 13
        12: .line 74
            new org.apache.cassandra.exceptions.UnauthorizedException
            dup
            ldc "You aren't allowed to alter %s"
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
            aload 4 /* option */
            aastore
            invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
            invokespecial org.apache.cassandra.exceptions.UnauthorizedException.<init>:(Ljava/lang/String;)V
            athrow
        end local 4 // org.apache.cassandra.auth.IRoleManager$Option option
        13: .line 71
      StackMap locals:
      StackMap stack:
            aload 5
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 10
        14: .line 76
            goto 16
        15: .line 80
      StackMap locals: org.apache.cassandra.cql3.statements.AlterRoleStatement org.apache.cassandra.service.ClientState org.apache.cassandra.auth.AuthenticatedUser int
      StackMap stack:
            aload 0 /* this */
            aload 1 /* state */
            getstatic org.apache.cassandra.auth.Permission.ALTER:Lorg/apache/cassandra/auth/Permission;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.role: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
        16: .line 82
      StackMap locals:
      StackMap stack:
            return
        end local 3 // boolean isSuper
        end local 2 // org.apache.cassandra.auth.AuthenticatedUser user
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.AlterRoleStatement this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   17     0     this  Lorg/apache/cassandra/cql3/statements/AlterRoleStatement;
            0   17     1    state  Lorg/apache/cassandra/service/ClientState;
            1   17     2     user  Lorg/apache/cassandra/auth/AuthenticatedUser;
            2   17     3  isSuper  Z
           11   13     4   option  Lorg/apache/cassandra/auth/IRoleManager$Option;
    Exceptions:
      throws org.apache.cassandra.exceptions.UnauthorizedException
    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.AlterRoleStatement this
        start local 1 // org.apache.cassandra.service.ClientState state
         0: .line 86
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokevirtual org.apache.cassandra.auth.RoleOptions.isEmpty:()Z
            ifne 2
         1: .line 87
            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.AlterRoleStatement.role:Lorg/apache/cassandra/auth/RoleResource;
            aload 0 /* this */
            getfield org.apache.cassandra.cql3.statements.AlterRoleStatement.opts:Lorg/apache/cassandra/auth/RoleOptions;
            invokeinterface org.apache.cassandra.auth.IRoleManager.alterRole:(Lorg/apache/cassandra/auth/AuthenticatedUser;Lorg/apache/cassandra/auth/RoleResource;Lorg/apache/cassandra/auth/RoleOptions;)V
         2: .line 88
      StackMap locals:
      StackMap stack:
            aconst_null
            areturn
        end local 1 // org.apache.cassandra.service.ClientState state
        end local 0 // org.apache.cassandra.cql3.statements.AlterRoleStatement this
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    3     0   this  Lorg/apache/cassandra/cql3/statements/AlterRoleStatement;
            0    3     1  state  Lorg/apache/cassandra/service/ClientState;
    Exceptions:
      throws org.apache.cassandra.exceptions.RequestValidationException, org.apache.cassandra.exceptions.RequestExecutionException
    MethodParameters:
       Name  Flags
      state  
}
SourceFile: "AlterRoleStatement.java"
InnerClasses:
  public final Option = org.apache.cassandra.auth.IRoleManager$Option of org.apache.cassandra.auth.IRoleManager