public class com.oracle.truffle.api.test.polyglot.InteractiveEvalTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.api.test.polyglot.InteractiveEvalTest
super_class: java.lang.Object
{
static final java.lang.String DEFAULT_INTERACTIVE;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "DefaultInteractive"
static final java.lang.String SPECIAL_INTERACTIVE;
descriptor: Ljava/lang/String;
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: "SpecialInteractive"
private java.io.ByteArrayOutputStream out;
descriptor: Ljava/io/ByteArrayOutputStream;
flags: (0x0002) ACC_PRIVATE
private org.graalvm.polyglot.Context context;
descriptor: Lorg/graalvm/polyglot/Context;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
public void setup();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
putfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.out:Ljava/io/ByteArrayOutputStream;
1: aload 0
iconst_0
anewarray java.lang.String
invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.out:Ljava/io/ByteArrayOutputStream;
invokevirtual org.graalvm.polyglot.Context$Builder.out:(Ljava/io/OutputStream;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
putfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
RuntimeVisibleAnnotations:
org.junit.Before()
public void tearDown();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
invokevirtual org.graalvm.polyglot.Context.close:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
RuntimeVisibleAnnotations:
org.junit.After()
public void testDefaultInteractiveLanguage();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: ldc "DefaultInteractive"
ldc ""
ldc ""
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Source$Builder.interactive:(Z)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.buildLiteral:()Lorg/graalvm/polyglot/Source;
astore 1
start local 1 1: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
aload 1
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc "42"
aload 2
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
3: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.out:Ljava/io/ByteArrayOutputStream;
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
invokevirtual java.io.ByteArrayOutputStream.toString:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 4: new java.lang.StringBuilder
dup
ldc "42"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "line.separator"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 3
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
1 6 1 s Lorg/graalvm/polyglot/Source;
2 6 2 value Lorg/graalvm/polyglot/Value;
4 6 3 strOutput Ljava/lang/String;
Exceptions:
throws java.io.UnsupportedEncodingException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSpecialInteractiveLanguage();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: ldc "SpecialInteractive"
ldc ""
ldc ""
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
iconst_1
invokevirtual org.graalvm.polyglot.Source$Builder.interactive:(Z)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.buildLiteral:()Lorg/graalvm/polyglot/Source;
astore 1
start local 1 1: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
aload 1
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc "42"
aload 2
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
3: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.out:Ljava/io/ByteArrayOutputStream;
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
invokevirtual java.io.ByteArrayOutputStream.toString:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 4: ldc "\"42\""
aload 3
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
1 6 1 s Lorg/graalvm/polyglot/Source;
2 6 2 value Lorg/graalvm/polyglot/Value;
4 6 3 strOutput Ljava/lang/String;
Exceptions:
throws java.io.UnsupportedEncodingException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testDefaultNoninteractiveLanguage();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: ldc "DefaultInteractive"
ldc ""
ldc "defnoninteract"
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
iconst_0
invokevirtual org.graalvm.polyglot.Source$Builder.interactive:(Z)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.buildLiteral:()Lorg/graalvm/polyglot/Source;
astore 1
start local 1 1: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
aload 1
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc "42"
aload 2
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
3: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.out:Ljava/io/ByteArrayOutputStream;
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
invokevirtual java.io.ByteArrayOutputStream.toString:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 4: aload 3
invokevirtual java.lang.String.isEmpty:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
1 6 1 s Lorg/graalvm/polyglot/Source;
2 6 2 value Lorg/graalvm/polyglot/Value;
4 6 3 strOutput Ljava/lang/String;
Exceptions:
throws java.io.UnsupportedEncodingException
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSpecialNoninteractiveLanguage();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: ldc "SpecialInteractive"
ldc ""
ldc ""
invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
iconst_0
invokevirtual org.graalvm.polyglot.Source$Builder.interactive:(Z)Lorg/graalvm/polyglot/Source$Builder;
invokevirtual org.graalvm.polyglot.Source$Builder.buildLiteral:()Lorg/graalvm/polyglot/Source;
astore 1
start local 1 1: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
aload 1
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: ldc "42"
aload 2
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
3: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.out:Ljava/io/ByteArrayOutputStream;
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokevirtual java.nio.charset.Charset.name:()Ljava/lang/String;
invokevirtual java.io.ByteArrayOutputStream.toString:(Ljava/lang/String;)Ljava/lang/String;
astore 3
start local 3 4: aload 3
invokevirtual java.lang.String.isEmpty:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
1 6 1 s Lorg/graalvm/polyglot/Source;
2 6 2 value Lorg/graalvm/polyglot/Value;
4 6 3 strOutput Ljava/lang/String;
Exceptions:
throws java.io.UnsupportedEncodingException
RuntimeVisibleAnnotations:
org.junit.Test()
public void isInteractive1();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
invokevirtual org.graalvm.polyglot.Context.getEngine:()Lorg/graalvm/polyglot/Engine;
invokevirtual org.graalvm.polyglot.Engine.getLanguages:()Ljava/util/Map;
ldc "SpecialInteractive"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.graalvm.polyglot.Language
invokevirtual org.graalvm.polyglot.Language.isInteractive:()Z
invokestatic org.junit.Assert.assertFalse:(Z)V
1: aload 0
getfield com.oracle.truffle.api.test.polyglot.InteractiveEvalTest.context:Lorg/graalvm/polyglot/Context;
invokevirtual org.graalvm.polyglot.Context.getEngine:()Lorg/graalvm/polyglot/Engine;
invokevirtual org.graalvm.polyglot.Engine.getLanguages:()Ljava/util/Map;
ldc "DefaultInteractive"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.graalvm.polyglot.Language
invokevirtual org.graalvm.polyglot.Language.isInteractive:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/oracle/truffle/api/test/polyglot/InteractiveEvalTest;
RuntimeVisibleAnnotations:
org.junit.Test()
}
SourceFile: "InteractiveEvalTest.java"
NestMembers:
com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$DefaultInteractiveLanguage com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$DefaultInteractiveLanguage$1 com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$InteractiveContext com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$SpecialInteractiveLanguage com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$SpecialInteractiveLanguage$1
InnerClasses:
public DefaultInteractiveLanguage = com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$DefaultInteractiveLanguage of com.oracle.truffle.api.test.polyglot.InteractiveEvalTest
private InteractiveContext = com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$InteractiveContext of com.oracle.truffle.api.test.polyglot.InteractiveEvalTest
public SpecialInteractiveLanguage = com.oracle.truffle.api.test.polyglot.InteractiveEvalTest$SpecialInteractiveLanguage of com.oracle.truffle.api.test.polyglot.InteractiveEvalTest
public final Builder = org.graalvm.polyglot.Context$Builder of org.graalvm.polyglot.Context
public Builder = org.graalvm.polyglot.Source$Builder of org.graalvm.polyglot.Source