public class org.apache.cassandra.auth.RoleResource implements org.apache.cassandra.auth.IResource, java.lang.Comparable<org.apache.cassandra.auth.RoleResource>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.auth.RoleResource
super_class: java.lang.Object
{
private static final java.util.Set<org.apache.cassandra.auth.Permission> ROOT_LEVEL_PERMISSIONS;
descriptor: Ljava/util/Set;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Set<Lorg/apache/cassandra/auth/Permission;>;
private static final java.util.Set<org.apache.cassandra.auth.Permission> ROLE_LEVEL_PERMISSIONS;
descriptor: Ljava/util/Set;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Set<Lorg/apache/cassandra/auth/Permission;>;
private static final java.lang.String ROOT_NAME;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "roles"
private static final org.apache.cassandra.auth.RoleResource ROOT_RESOURCE;
descriptor: Lorg/apache/cassandra/auth/RoleResource;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final org.apache.cassandra.auth.RoleResource$Level level;
descriptor: Lorg/apache/cassandra/auth/RoleResource$Level;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String name;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=0, args_size=0
0: getstatic org.apache.cassandra.auth.Permission.CREATE:Lorg/apache/cassandra/auth/Permission;
iconst_4
anewarray org.apache.cassandra.auth.Permission
dup
iconst_0
1: getstatic org.apache.cassandra.auth.Permission.ALTER:Lorg/apache/cassandra/auth/Permission;
aastore
dup
iconst_1
2: getstatic org.apache.cassandra.auth.Permission.DROP:Lorg/apache/cassandra/auth/Permission;
aastore
dup
iconst_2
3: getstatic org.apache.cassandra.auth.Permission.AUTHORIZE:Lorg/apache/cassandra/auth/Permission;
aastore
dup
iconst_3
4: getstatic org.apache.cassandra.auth.Permission.DESCRIBE:Lorg/apache/cassandra/auth/Permission;
aastore
5: invokestatic com.google.common.collect.Sets.immutableEnumSet:(Ljava/lang/Enum;[Ljava/lang/Enum;)Lcom/google/common/collect/ImmutableSet;
putstatic org.apache.cassandra.auth.RoleResource.ROOT_LEVEL_PERMISSIONS:Ljava/util/Set;
6: getstatic org.apache.cassandra.auth.Permission.ALTER:Lorg/apache/cassandra/auth/Permission;
iconst_2
anewarray org.apache.cassandra.auth.Permission
dup
iconst_0
7: getstatic org.apache.cassandra.auth.Permission.DROP:Lorg/apache/cassandra/auth/Permission;
aastore
dup
iconst_1
8: getstatic org.apache.cassandra.auth.Permission.AUTHORIZE:Lorg/apache/cassandra/auth/Permission;
aastore
9: invokestatic com.google.common.collect.Sets.immutableEnumSet:(Ljava/lang/Enum;[Ljava/lang/Enum;)Lcom/google/common/collect/ImmutableSet;
putstatic org.apache.cassandra.auth.RoleResource.ROLE_LEVEL_PERMISSIONS:Ljava/util/Set;
10: new org.apache.cassandra.auth.RoleResource
dup
invokespecial org.apache.cassandra.auth.RoleResource.<init>:()V
putstatic org.apache.cassandra.auth.RoleResource.ROOT_RESOURCE:Lorg/apache/cassandra/auth/RoleResource;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
putfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
2: aload 0
aconst_null
putfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/auth/RoleResource;
private void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
getstatic org.apache.cassandra.auth.RoleResource$Level.ROLE:Lorg/apache/cassandra/auth/RoleResource$Level;
putfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
2: aload 0
aload 1
putfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/auth/RoleResource;
0 4 1 name Ljava/lang/String;
MethodParameters:
Name Flags
name
public static org.apache.cassandra.auth.RoleResource root();
descriptor: ()Lorg/apache/cassandra/auth/RoleResource;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.cassandra.auth.RoleResource.ROOT_RESOURCE:Lorg/apache/cassandra/auth/RoleResource;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static org.apache.cassandra.auth.RoleResource role(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new org.apache.cassandra.auth.RoleResource
dup
aload 0
invokespecial org.apache.cassandra.auth.RoleResource.<init>:(Ljava/lang/String;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 name Ljava/lang/String;
MethodParameters:
Name Flags
name
public static org.apache.cassandra.auth.RoleResource fromName(java.lang.String);
descriptor: (Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=2, args_size=1
start local 0 0: aload 0
ldc "/"
iconst_2
invokestatic org.apache.commons.lang3.StringUtils.split:(Ljava/lang/String;Ljava/lang/String;I)[Ljava/lang/String;
astore 1
start local 1 1: aload 1
iconst_0
aaload
ldc "roles"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 3
2: new java.lang.IllegalArgumentException
dup
ldc "%s is not a valid role resource name"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.lang.String[]
StackMap stack:
aload 1
arraylength
iconst_1
if_icmpne 5
4: invokestatic org.apache.cassandra.auth.RoleResource.root:()Lorg/apache/cassandra/auth/RoleResource;
areturn
5: StackMap locals:
StackMap stack:
aload 1
iconst_1
aaload
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 name Ljava/lang/String;
1 6 1 parts [Ljava/lang/String;
MethodParameters:
Name Flags
name
public java.lang.String getName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpne 1
ldc "roles"
goto 2
StackMap locals:
StackMap stack:
1: ldc "%s/%s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
ldc "roles"
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/RoleResource;
public java.lang.String getRoleName();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpne 2
1: new java.lang.IllegalStateException
dup
ldc "%s role resource has no role name"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/RoleResource;
public org.apache.cassandra.auth.IResource getParent();
descriptor: ()Lorg/apache/cassandra/auth/IResource;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROLE:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpne 2
1: invokestatic org.apache.cassandra.auth.RoleResource.root:()Lorg/apache/cassandra/auth/RoleResource;
areturn
2: StackMap locals:
StackMap stack:
new java.lang.IllegalStateException
dup
ldc "Root-level resource can't have a parent"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/RoleResource;
public boolean hasParent();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/auth/RoleResource;
public boolean exists();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpeq 1
invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 0
invokeinterface org.apache.cassandra.auth.IRoleManager.isExistingRole:(Lorg/apache/cassandra/auth/RoleResource;)Z
ifne 1
iconst_0
ireturn
StackMap locals:
StackMap stack:
1: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/auth/RoleResource;
public java.util.Set<org.apache.cassandra.auth.Permission> applicablePermissions();
descriptor: ()Ljava/util/Set;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpne 1
getstatic org.apache.cassandra.auth.RoleResource.ROOT_LEVEL_PERMISSIONS:Ljava/util/Set;
goto 2
StackMap locals:
StackMap stack:
1: getstatic org.apache.cassandra.auth.RoleResource.ROLE_LEVEL_PERMISSIONS:Ljava/util/Set;
StackMap locals:
StackMap stack: java.util.Set
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/RoleResource;
Signature: ()Ljava/util/Set<Lorg/apache/cassandra/auth/Permission;>;
public int compareTo(org.apache.cassandra.auth.RoleResource);
descriptor: (Lorg/apache/cassandra/auth/RoleResource;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
aload 1
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
invokevirtual java.lang.String.compareTo:(Ljava/lang/String;)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/auth/RoleResource;
0 1 1 o Lorg/apache/cassandra/auth/RoleResource;
MethodParameters:
Name Flags
o
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
getstatic org.apache.cassandra.auth.RoleResource$Level.ROOT:Lorg/apache/cassandra/auth/RoleResource$Level;
if_acmpne 1
ldc "<all roles>"
goto 2
StackMap locals:
StackMap stack:
1: ldc "<role %s>"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
2: areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/auth/RoleResource;
public boolean equals(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
if_acmpne 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 1
instanceof org.apache.cassandra.auth.RoleResource
ifne 4
3: iconst_0
ireturn
4: StackMap locals:
StackMap stack:
aload 1
checkcast org.apache.cassandra.auth.RoleResource
astore 2
start local 2 5: aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
aload 2
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
invokestatic com.google.common.base.Objects.equal:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 6
aload 0
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
aload 2
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
invokestatic com.google.common.base.Objects.equal:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 6
iconst_1
ireturn
StackMap locals: org.apache.cassandra.auth.RoleResource
StackMap stack:
6: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/auth/RoleResource;
0 7 1 o Ljava/lang/Object;
5 7 2 rs Lorg/apache/cassandra/auth/RoleResource;
MethodParameters:
Name Flags
o
public int hashCode();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.auth.RoleResource.level:Lorg/apache/cassandra/auth/RoleResource$Level;
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.auth.RoleResource.name:Ljava/lang/String;
aastore
invokestatic com.google.common.base.Objects.hashCode:([Ljava/lang/Object;)I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/auth/RoleResource;
public int compareTo(java.lang.Object);
descriptor: (Ljava/lang/Object;)I
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload 0
aload 1
checkcast org.apache.cassandra.auth.RoleResource
invokevirtual org.apache.cassandra.auth.RoleResource.compareTo:(Lorg/apache/cassandra/auth/RoleResource;)I
ireturn
LocalVariableTable:
Start End Slot Name Signature
}
Signature: Ljava/lang/Object;Lorg/apache/cassandra/auth/IResource;Ljava/lang/Comparable<Lorg/apache/cassandra/auth/RoleResource;>;
SourceFile: "RoleResource.java"
NestMembers:
org.apache.cassandra.auth.RoleResource$Level
InnerClasses:
final Level = org.apache.cassandra.auth.RoleResource$Level of org.apache.cassandra.auth.RoleResource