public final class com.oracle.truffle.js.runtime.java.JavaAccess
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.oracle.truffle.js.runtime.java.JavaAccess
super_class: java.lang.Object
{
private static final java.lang.String PERMISSION_JAVA_REFLECTION;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "truffle.js.JavaReflection"
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/oracle/truffle/js/runtime/java/JavaAccess;
public static boolean isReflectionClass(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
ldc Ljava/lang/Class;
if_acmpeq 1
ldc Ljava/lang/ClassLoader;
aload 0
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 2
1: StackMap locals:
StackMap stack:
iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
astore 1
start local 1 3: aload 1
ldc "java.lang.reflect."
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 4
aload 1
ldc "java.lang.invoke."
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 4
aload 1
ldc "java.beans."
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifne 4
iconst_0
ireturn
StackMap locals: java.lang.String
StackMap stack:
4: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 type Ljava/lang/Class<*>;
3 5 1 name Ljava/lang/String;
Signature: (Ljava/lang/Class<*>;)Z
MethodParameters:
Name Flags
type final
public static void checkReflectionAccess(java.lang.Class<?>, boolean, );
descriptor: (Ljava/lang/Class;ZZ)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: iload 2
ifne 2
aload 0
iload 1
invokestatic com.oracle.truffle.js.runtime.java.JavaAccess.isReflectiveCheckNeeded:(Ljava/lang/Class;Z)Z
ifeq 2
1: new java.lang.SecurityException
dup
ldc "Java reflection not allowed"
invokespecial java.lang.SecurityException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 3
start local 3 3: aload 3
ifnull 5
aload 0
iload 1
invokestatic com.oracle.truffle.js.runtime.java.JavaAccess.isReflectiveCheckNeeded:(Ljava/lang/Class;Z)Z
ifeq 5
4: aload 3
invokestatic com.oracle.truffle.js.runtime.java.JavaAccess.checkReflectionPermission:(Ljava/lang/SecurityManager;)V
5: StackMap locals: java.lang.SecurityManager
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 clazz Ljava/lang/Class<*>;
0 6 1 isStatic Z
0 6 2 allowReflection Z
3 6 3 sm Ljava/lang/SecurityManager;
Signature: (Ljava/lang/Class<*>;ZZ)V
MethodParameters:
Name Flags
clazz final
isStatic final
allowReflection final
public static boolean isReflectiveCheckNeeded(java.lang.Class<?>, );
descriptor: (Ljava/lang/Class;Z)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: ldc Ljava/lang/reflect/Proxy;
aload 0
invokevirtual java.lang.Class.isAssignableFrom:(Ljava/lang/Class;)Z
ifeq 4
1: aload 0
invokestatic java.lang.reflect.Proxy.isProxyClass:(Ljava/lang/Class;)Z
ifeq 3
2: iload 1
ireturn
3: StackMap locals:
StackMap stack:
iconst_1
ireturn
4: StackMap locals:
StackMap stack:
aload 0
invokestatic com.oracle.truffle.js.runtime.java.JavaAccess.isReflectionClass:(Ljava/lang/Class;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 type Ljava/lang/Class<*>;
0 5 1 isStatic Z
Signature: (Ljava/lang/Class<*>;Z)Z
MethodParameters:
Name Flags
type final
isStatic final
private static void checkReflectionPermission(java.lang.SecurityManager);
descriptor: (Ljava/lang/SecurityManager;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
new java.lang.RuntimePermission
dup
ldc "truffle.js.JavaReflection"
invokespecial java.lang.RuntimePermission.<init>:(Ljava/lang/String;)V
invokevirtual java.lang.SecurityManager.checkPermission:(Ljava/security/Permission;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 sm Ljava/lang/SecurityManager;
MethodParameters:
Name Flags
sm final
public static boolean isReflectionAllowed(com.oracle.truffle.js.runtime.JSContext);
descriptor: (Lcom/oracle/truffle/js/runtime/JSContext;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual com.oracle.truffle.js.runtime.JSContext.getRealm:()Lcom/oracle/truffle/js/runtime/JSRealm;
invokevirtual com.oracle.truffle.js.runtime.JSRealm.getEnv:()Lcom/oracle/truffle/api/TruffleLanguage$Env;
astore 1
start local 1 1: aload 1
ifnull 6
aload 1
invokevirtual com.oracle.truffle.api.TruffleLanguage$Env.isHostLookupAllowed:()Z
ifeq 6
2: aload 1
ldc Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual com.oracle.truffle.api.TruffleLanguage$Env.lookupHostSymbol:(Ljava/lang/String;)Ljava/lang/Object;
astore 2
start local 2 3: aload 2
ifnull 6
4: iconst_0
ireturn
end local 2 5: StackMap locals: com.oracle.truffle.js.runtime.JSContext com.oracle.truffle.api.TruffleLanguage$Env
StackMap stack: java.lang.Exception
pop
6: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 context Lcom/oracle/truffle/js/runtime/JSContext;
1 7 1 env Lcom/oracle/truffle/api/TruffleLanguage$Env;
3 5 2 found Ljava/lang/Object;
Exception table:
from to target type
2 4 5 Class java.lang.Exception
MethodParameters:
Name Flags
context
public static void checkAccess(java.lang.Class<?>[], com.oracle.truffle.js.runtime.JSContext);
descriptor: ([Ljava/lang/Class;Lcom/oracle/truffle/js/runtime/JSContext;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=8, args_size=2
start local 0 start local 1 0: invokestatic java.lang.System.getSecurityManager:()Ljava/lang/SecurityManager;
astore 2
start local 2 1: aload 2
ifnull 8
2: aload 1
invokestatic com.oracle.truffle.js.runtime.java.JavaAccess.isReflectionAllowed:(Lcom/oracle/truffle/js/runtime/JSContext;)Z
istore 3
start local 3 3: aload 0
dup
astore 7
arraylength
istore 6
iconst_0
istore 5
goto 7
StackMap locals: java.lang.Class[] com.oracle.truffle.js.runtime.JSContext java.lang.SecurityManager int top int int java.lang.Class[]
StackMap stack:
4: aload 7
iload 5
aaload
astore 4
start local 4 5: aload 4
iconst_1
iload 3
invokestatic com.oracle.truffle.js.runtime.java.JavaAccess.checkReflectionAccess:(Ljava/lang/Class;ZZ)V
end local 4 6: iinc 5 1
StackMap locals:
StackMap stack:
7: iload 5
iload 6
if_icmplt 4
end local 3 8: StackMap locals: java.lang.Class[] com.oracle.truffle.js.runtime.JSContext java.lang.SecurityManager
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 types [Ljava/lang/Class;
0 9 1 context Lcom/oracle/truffle/js/runtime/JSContext;
1 9 2 sm Ljava/lang/SecurityManager;
3 8 3 allowReflection Z
5 6 4 type Ljava/lang/Class<*>;
Signature: ([Ljava/lang/Class<*>;Lcom/oracle/truffle/js/runtime/JSContext;)V
RuntimeVisibleAnnotations:
com.oracle.truffle.api.CompilerDirectives$TruffleBoundary()
MethodParameters:
Name Flags
types
context
}
SourceFile: "JavaAccess.java"
InnerClasses:
public abstract TruffleBoundary = com.oracle.truffle.api.CompilerDirectives$TruffleBoundary of com.oracle.truffle.api.CompilerDirectives
public final Env = com.oracle.truffle.api.TruffleLanguage$Env of com.oracle.truffle.api.TruffleLanguage