@@ -21,32 +21,21 @@ import org.objectweb.asm.Opcodes
21
21
* Opcodes}
22
22
*/
23
23
class AccessDescriptor (private val access : Int ) {
24
- fun isProtected (): Boolean {
25
- return accessIs(Opcodes .ACC_PROTECTED )
26
- }
27
- fun isPublic (): Boolean {
28
- return accessIs(Opcodes .ACC_PUBLIC )
29
- }
30
- fun isStatic (): Boolean {
31
- return accessIs(Opcodes .ACC_STATIC )
32
- }
33
- fun isSynthetic (): Boolean {
34
- return accessIs(Opcodes .ACC_SYNTHETIC )
35
- }
36
- fun isBridge (): Boolean {
37
- return accessIs(Opcodes .ACC_BRIDGE )
38
- }
39
- fun isAbstract (): Boolean {
40
- return accessIs(Opcodes .ACC_ABSTRACT )
41
- }
24
+ fun isProtected (): Boolean = accessIs(Opcodes .ACC_PROTECTED )
42
25
43
- fun isFinal (): Boolean {
44
- return accessIs(Opcodes .ACC_FINAL )
45
- }
26
+ fun isPublic (): Boolean = accessIs(Opcodes .ACC_PUBLIC )
46
27
47
- fun isPrivate (): Boolean {
48
- return ! this .isProtected() && ! this .isPublic()
49
- }
28
+ fun isStatic (): Boolean = accessIs(Opcodes .ACC_STATIC )
29
+
30
+ fun isSynthetic (): Boolean = accessIs(Opcodes .ACC_SYNTHETIC )
31
+
32
+ fun isBridge (): Boolean = accessIs(Opcodes .ACC_BRIDGE )
33
+
34
+ fun isAbstract (): Boolean = accessIs(Opcodes .ACC_ABSTRACT )
35
+
36
+ fun isFinal (): Boolean = accessIs(Opcodes .ACC_FINAL )
37
+
38
+ fun isPrivate (): Boolean = ! this .isProtected() && ! this .isPublic()
50
39
51
40
fun getVerboseDescription (): String {
52
41
val outputStringList = mutableListOf<String >()
@@ -71,7 +60,5 @@ class AccessDescriptor(private val access: Int) {
71
60
return outputStringList.joinToString(" " )
72
61
}
73
62
/* * Returns true if the given access modifier matches the given opcode. */
74
- fun accessIs (opcode : Int ): Boolean {
75
- return (access and opcode) != 0
76
- }
63
+ fun accessIs (opcode : Int ): Boolean = (access and opcode) != 0
77
64
}
0 commit comments