structure additional resources in lib folder
This commit is contained in:
parent
c718104fee
commit
5096661e95
@ -5,7 +5,7 @@ DESTDIR="out/src"
|
||||
TESTDESTDIR="out/tests"
|
||||
DEPENDENCIES="dependencies/*"
|
||||
JAVAC_FLAGS="-g:none -nowarn"
|
||||
JAVATX_COMPILER_PATH="JavaTXcompiler"
|
||||
JAVATX_COMPILER_PATH="JavaTXcompiler.jar"
|
||||
COMPILED_CLASSES="classes"
|
||||
|
||||
#remove all files, if the script is called with parameter "clear"
|
||||
|
BIN
lib/dependencies/ST4-4.3.4.jar
Normal file
BIN
lib/dependencies/ST4-4.3.4.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/animal-sniffer-annotations-1.14.jar
Normal file
BIN
lib/dependencies/animal-sniffer-annotations-1.14.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/antlr-runtime-3.5.3.jar
Normal file
BIN
lib/dependencies/antlr-runtime-3.5.3.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/antlr4-4.11.1.jar
Normal file
BIN
lib/dependencies/antlr4-4.11.1.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/antlr4-runtime-4.11.1.jar
Normal file
BIN
lib/dependencies/antlr4-runtime-4.11.1.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/asm-9.5.jar
Normal file
BIN
lib/dependencies/asm-9.5.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/commons-io-2.6.jar
Normal file
BIN
lib/dependencies/commons-io-2.6.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/error_prone_annotations-2.0.18.jar
Normal file
BIN
lib/dependencies/error_prone_annotations-2.0.18.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/guava-22.0.jar
Normal file
BIN
lib/dependencies/guava-22.0.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/hamcrest-core-1.3.jar
Normal file
BIN
lib/dependencies/hamcrest-core-1.3.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/icu4j-71.1.jar
Normal file
BIN
lib/dependencies/icu4j-71.1.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/j2objc-annotations-1.1.jar
Normal file
BIN
lib/dependencies/j2objc-annotations-1.1.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/javassist-3.21.0-GA.jar
Normal file
BIN
lib/dependencies/javassist-3.21.0-GA.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/javax.json-1.1.4.jar
Normal file
BIN
lib/dependencies/javax.json-1.1.4.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/jsr305-1.3.9.jar
Normal file
BIN
lib/dependencies/jsr305-1.3.9.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/junit-4.11.jar
Normal file
BIN
lib/dependencies/junit-4.11.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/org.abego.treelayout.core-1.0.3.jar
Normal file
BIN
lib/dependencies/org.abego.treelayout.core-1.0.3.jar
Normal file
Binary file not shown.
BIN
lib/dependencies/reflections-0.9.11.jar
Normal file
BIN
lib/dependencies/reflections-0.9.11.jar
Normal file
Binary file not shown.
10
lib/resources/AllgemeinTest/Assign.jav
Normal file
10
lib/resources/AllgemeinTest/Assign.jav
Normal file
@ -0,0 +1,10 @@
|
||||
class Assign {
|
||||
|
||||
assign(x, y) {
|
||||
x = y;
|
||||
}
|
||||
|
||||
assign2(x, y) {
|
||||
assign(x,y);
|
||||
}
|
||||
}
|
18
lib/resources/AllgemeinTest/CaptureConversion.jav
Normal file
18
lib/resources/AllgemeinTest/CaptureConversion.jav
Normal file
@ -0,0 +1,18 @@
|
||||
import java.lang.Object;
|
||||
import java.util.Vector;
|
||||
|
||||
class CaptureConversion {
|
||||
|
||||
<X> void assign(Vector<X> v1, Vector<X> v2) {
|
||||
v1 = v2;
|
||||
}
|
||||
|
||||
void main() {
|
||||
Vector<?> v1;
|
||||
v1 = new Vector<Object>();
|
||||
Vector<? extends Object> v2;
|
||||
v2 = new Vector<Object>();
|
||||
v1 = v2;
|
||||
assign(v1, v2);
|
||||
}
|
||||
}
|
22
lib/resources/AllgemeinTest/Complex.jav
Normal file
22
lib/resources/AllgemeinTest/Complex.jav
Normal file
@ -0,0 +1,22 @@
|
||||
class Pair<U, T> {
|
||||
U a;
|
||||
T b;
|
||||
Pair(U x, T y) {
|
||||
a = x; b = y;
|
||||
}
|
||||
}
|
||||
|
||||
class Complex {
|
||||
m(b) {
|
||||
var c = b;
|
||||
var d = c;
|
||||
var e;
|
||||
d = e;
|
||||
var r1 = e;
|
||||
var f = e;
|
||||
var g;
|
||||
f = g;
|
||||
var r2 = g;
|
||||
return new Pair<>(r1, r2);
|
||||
}
|
||||
}
|
7
lib/resources/AllgemeinTest/InfReturn.jav
Normal file
7
lib/resources/AllgemeinTest/InfReturn.jav
Normal file
@ -0,0 +1,7 @@
|
||||
public class InfReturn {
|
||||
m(a) {
|
||||
var ret;
|
||||
a = ret;
|
||||
return ret;
|
||||
}
|
||||
}
|
8
lib/resources/AllgemeinTest/InfReturnII.jav
Normal file
8
lib/resources/AllgemeinTest/InfReturnII.jav
Normal file
@ -0,0 +1,8 @@
|
||||
public class InfReturnII {
|
||||
m(a, b) {
|
||||
var ret;
|
||||
a = ret;
|
||||
b = ret;
|
||||
return ret;
|
||||
}
|
||||
}
|
7
lib/resources/AllgemeinTest/InnerInf.jav
Normal file
7
lib/resources/AllgemeinTest/InnerInf.jav
Normal file
@ -0,0 +1,7 @@
|
||||
class InnerInf {
|
||||
m(a, b) {
|
||||
var i;
|
||||
a = i;
|
||||
b = i;
|
||||
}
|
||||
}
|
43
lib/resources/AllgemeinTest/Iteration.jav
Normal file
43
lib/resources/AllgemeinTest/Iteration.jav
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
class Pair<T, U> {
|
||||
T x;
|
||||
U y;
|
||||
|
||||
public Pair() { }
|
||||
public Pair(T x, U y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public T fst () {
|
||||
return x;
|
||||
}
|
||||
|
||||
public U snd () {
|
||||
return y;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public class Iteration {
|
||||
id(x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
m1(x, y) {
|
||||
var help;
|
||||
help = m2(x, y);
|
||||
var y2 = help.snd();
|
||||
var x2 = id(x);
|
||||
return new Pair<>(x2,y2);
|
||||
|
||||
}
|
||||
|
||||
m2(x,y) {
|
||||
var help = m1(x, y);
|
||||
var x2 = help.fst();
|
||||
var y2 = id(y);
|
||||
return new Pair<>(x2, y2);
|
||||
}
|
||||
}
|
||||
|
46
lib/resources/AllgemeinTest/List.jav
Normal file
46
lib/resources/AllgemeinTest/List.jav
Normal file
@ -0,0 +1,46 @@
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Object;
|
||||
|
||||
class List {
|
||||
elem;
|
||||
next;
|
||||
|
||||
List() {
|
||||
super();
|
||||
}
|
||||
|
||||
List(elem, next) {
|
||||
this.elem = elem;
|
||||
this.next = next;
|
||||
}
|
||||
|
||||
addElement(newElem) {
|
||||
return new List(newElem, this);
|
||||
}
|
||||
|
||||
append(l) {
|
||||
if (next == null) {
|
||||
return l;
|
||||
}
|
||||
else {
|
||||
return new List(elem, next.append(l));
|
||||
}
|
||||
}
|
||||
/*
|
||||
addAll(l) {
|
||||
var nextLoc = next;
|
||||
while (//nextLoc != null
|
||||
true) {
|
||||
nextLoc = nextLoc.next;
|
||||
}
|
||||
nextLoc = l;
|
||||
}
|
||||
|
||||
void m() {
|
||||
List<? extends Object> l; // = new List<Integer>(1, null);
|
||||
List<? extends Object> l2; // = new List<String>("SSS", null);
|
||||
l.addAll(l2);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
7
lib/resources/AllgemeinTest/Overloading.jav
Normal file
7
lib/resources/AllgemeinTest/Overloading.jav
Normal file
@ -0,0 +1,7 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
|
||||
class Overloading {
|
||||
m(x) { return x + x; }
|
||||
m(x) { return x || x; }
|
||||
}
|
36
lib/resources/AllgemeinTest/Pair.jav
Normal file
36
lib/resources/AllgemeinTest/Pair.jav
Normal file
@ -0,0 +1,36 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Object;
|
||||
|
||||
class Pair<U, T> {
|
||||
U a;
|
||||
T b;
|
||||
|
||||
make(x) {
|
||||
var ret = new Pair<>();
|
||||
ret.a = x.elementAt(0);
|
||||
ret.b = x.elementAt(1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
eq(a, b) {
|
||||
b = a;
|
||||
return a == b;
|
||||
}
|
||||
|
||||
|
||||
compare( p) {
|
||||
return eq(p.a, p.b);
|
||||
//return p.a == p.b;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void m(Pair<?, ?> p, Vector<?> b)
|
||||
{
|
||||
//this.compare(p); //1, type incorrect
|
||||
this.compare(this.make(b)); //2, OK
|
||||
}
|
||||
*/
|
||||
}
|
8
lib/resources/AllgemeinTest/RecursionCond.jav
Normal file
8
lib/resources/AllgemeinTest/RecursionCond.jav
Normal file
@ -0,0 +1,8 @@
|
||||
class RecursionCond {
|
||||
m(a, b, c) {
|
||||
if (1 == 2) {
|
||||
b = m(a, b);
|
||||
c = m(a, b);
|
||||
} else return a;
|
||||
}
|
||||
}
|
14
lib/resources/AllgemeinTest/StreamTest.jav
Normal file
14
lib/resources/AllgemeinTest/StreamTest.jav
Normal file
@ -0,0 +1,14 @@
|
||||
import java.util.stream.Stream;
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
|
||||
class StreamTest {
|
||||
|
||||
m() {
|
||||
var vecInt = new Vector<Integer>();
|
||||
var strInt = vecInt.stream();
|
||||
var dup = x -> x*2;
|
||||
strInt.map(dup);
|
||||
return dup;
|
||||
}
|
||||
}
|
9
lib/resources/AllgemeinTest/Test.jav
Normal file
9
lib/resources/AllgemeinTest/Test.jav
Normal file
@ -0,0 +1,9 @@
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Test {
|
||||
fac = (x) -> {
|
||||
if (x == 1) { return 1; }
|
||||
return x * fac.apply(x - 1);
|
||||
};
|
||||
}
|
19
lib/resources/AllgemeinTest/TripleTest.jav
Normal file
19
lib/resources/AllgemeinTest/TripleTest.jav
Normal file
@ -0,0 +1,19 @@
|
||||
class Triple<U, T, S> {
|
||||
U a;
|
||||
T b;
|
||||
S c;
|
||||
|
||||
Triple(U x, T y, S z) {
|
||||
a = x; b = y; c = z;
|
||||
}
|
||||
|
||||
U fst() { return a; }
|
||||
T snd() { return b; }
|
||||
S thrd() { return c; }
|
||||
}
|
||||
|
||||
public class TripleTest {
|
||||
m() {
|
||||
return new Triple<>(m().thrd(), m().thrd(), m().thrd());
|
||||
}
|
||||
}
|
12
lib/resources/AllgemeinTest/Twice2.jav
Normal file
12
lib/resources/AllgemeinTest/Twice2.jav
Normal file
@ -0,0 +1,12 @@
|
||||
class Twice2 {
|
||||
id1inst = new Id<>();
|
||||
id1 = id1inst.id;
|
||||
id2inst = new Id<>();
|
||||
id2 = id2inst.id;
|
||||
twice = id1.apply(id2);
|
||||
|
||||
}
|
||||
|
||||
class Id<T> {
|
||||
id = (T x) -> x;
|
||||
}
|
12
lib/resources/AllgemeinTest/UseWildcardPair.jav
Normal file
12
lib/resources/AllgemeinTest/UseWildcardPair.jav
Normal file
@ -0,0 +1,12 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Boolean;
|
||||
|
||||
class UseWildcardPair{
|
||||
|
||||
void m(Pair<?, ?> p, Vector<?> b)
|
||||
{
|
||||
p.compare(p); //1, type incorrect
|
||||
p.compare(p.make(b)); //2, OK
|
||||
}
|
||||
|
||||
}
|
8
lib/resources/bytecode/javFiles/AA.jav
Normal file
8
lib/resources/bytecode/javFiles/AA.jav
Normal file
@ -0,0 +1,8 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
|
||||
public class AA {
|
||||
public m(Integer i) { return "AA"; }
|
||||
|
||||
public m2(AA x) { return "AA"; }
|
||||
}
|
14
lib/resources/bytecode/javFiles/Access.jav
Normal file
14
lib/resources/bytecode/javFiles/Access.jav
Normal file
@ -0,0 +1,14 @@
|
||||
public class Access {
|
||||
public int fPublic;
|
||||
int fDefault;
|
||||
private int fPrivate;
|
||||
protected int fProtected;
|
||||
|
||||
public void mPublic() {}
|
||||
void mDefault() {}
|
||||
private void mPrivate() {}
|
||||
protected void mProtected() {}
|
||||
}
|
||||
|
||||
class AccessDefault {
|
||||
}
|
9
lib/resources/bytecode/javFiles/AddLong.jav
Normal file
9
lib/resources/bytecode/javFiles/AddLong.jav
Normal file
@ -0,0 +1,9 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Long;
|
||||
|
||||
public class AddLong{
|
||||
Long add(Integer a, Long b) {
|
||||
Long c = a+b;
|
||||
return c;
|
||||
}
|
||||
}
|
8
lib/resources/bytecode/javFiles/Annotation.jav
Normal file
8
lib/resources/bytecode/javFiles/Annotation.jav
Normal file
@ -0,0 +1,8 @@
|
||||
class Base {
|
||||
public void foo() {}
|
||||
}
|
||||
|
||||
public class Annotation extends Base {
|
||||
@Override
|
||||
public void foo() {}
|
||||
}
|
30
lib/resources/bytecode/javFiles/AssignToLit.jav
Normal file
30
lib/resources/bytecode/javFiles/AssignToLit.jav
Normal file
@ -0,0 +1,30 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Boolean;
|
||||
import java.lang.String;
|
||||
import java.lang.Byte;
|
||||
import java.lang.Short;
|
||||
import java.lang.Long;
|
||||
import java.lang.Float;
|
||||
import java.lang.Double;
|
||||
import java.lang.Character;
|
||||
|
||||
class AssignToLit {
|
||||
void m(){
|
||||
// String s = "Test";
|
||||
// Boolean b = false;
|
||||
// Byte byte1 = 5;
|
||||
// Byte byte2 = 55;
|
||||
// Short short1 = 5;
|
||||
// Short short2 = 55;
|
||||
// Integer int1 = 5;
|
||||
// Integer int2 = 8888888;
|
||||
// Long long1 = 1;
|
||||
// Long long2 = 5;
|
||||
// Long long3 = 89989898;
|
||||
// Float float1 = 1;
|
||||
// Float float2 = 55;
|
||||
// Double d1 = 1;
|
||||
// Double d2 = 55;
|
||||
Character c = 'A';
|
||||
}
|
||||
}
|
4
lib/resources/bytecode/javFiles/BB.jav
Normal file
4
lib/resources/bytecode/javFiles/BB.jav
Normal file
@ -0,0 +1,4 @@
|
||||
import java.lang.Integer;
|
||||
import AA;
|
||||
|
||||
public class BB extends AA { }
|
17
lib/resources/bytecode/javFiles/BinaryInMeth.jav
Normal file
17
lib/resources/bytecode/javFiles/BinaryInMeth.jav
Normal file
@ -0,0 +1,17 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
|
||||
public class BinaryInMeth {
|
||||
|
||||
public m(a){
|
||||
return ++a;
|
||||
}
|
||||
|
||||
public m2(a,b){
|
||||
return m(a+b);
|
||||
}
|
||||
|
||||
public m3(a) {
|
||||
return m(++a);
|
||||
}
|
||||
}
|
7
lib/resources/bytecode/javFiles/Box.jav
Normal file
7
lib/resources/bytecode/javFiles/Box.jav
Normal file
@ -0,0 +1,7 @@
|
||||
class B { }
|
||||
class Box_Main extends B {
|
||||
m(b) {
|
||||
b.m(new Box_Main());
|
||||
b.m(new B());
|
||||
}
|
||||
}
|
3
lib/resources/bytecode/javFiles/Box.java
Normal file
3
lib/resources/bytecode/javFiles/Box.java
Normal file
@ -0,0 +1,3 @@
|
||||
class Box<A> {
|
||||
void m(A a) { }
|
||||
}
|
7
lib/resources/bytecode/javFiles/Bug112.jav
Normal file
7
lib/resources/bytecode/javFiles/Bug112.jav
Normal file
@ -0,0 +1,7 @@
|
||||
public class Bug112 {
|
||||
public m(x) {
|
||||
var y;
|
||||
x = y;
|
||||
return y;
|
||||
}
|
||||
}
|
12
lib/resources/bytecode/javFiles/Bug122.jav
Normal file
12
lib/resources/bytecode/javFiles/Bug122.jav
Normal file
@ -0,0 +1,12 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class Bug122 {
|
||||
public void main() {
|
||||
if (true) {
|
||||
for (Integer i = 0; i < 10; i++) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
13
lib/resources/bytecode/javFiles/Bug123.jav
Normal file
13
lib/resources/bytecode/javFiles/Bug123.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug123 {
|
||||
public Boolean works(){
|
||||
if(true) return true;
|
||||
else return false;
|
||||
}
|
||||
public void fails(){
|
||||
Boolean a = true;
|
||||
if(true) a = false;
|
||||
}
|
||||
}
|
16
lib/resources/bytecode/javFiles/Bug125.jav
Normal file
16
lib/resources/bytecode/javFiles/Bug125.jav
Normal file
@ -0,0 +1,16 @@
|
||||
import java.lang.Boolean;
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import java.util.List;
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Bug125 {
|
||||
static ArrayList<String> works = new ArrayList<>();
|
||||
static List<String> fails = new ArrayList<>();
|
||||
|
||||
public void main() {
|
||||
works.toString();
|
||||
fails.toString();
|
||||
}
|
||||
}
|
15
lib/resources/bytecode/javFiles/Bug285.jav
Normal file
15
lib/resources/bytecode/javFiles/Bug285.jav
Normal file
@ -0,0 +1,15 @@
|
||||
import java.util.Optional;
|
||||
import java.lang.Integer;
|
||||
|
||||
public class StaticClass {
|
||||
public static StaticClass barbar() {
|
||||
return new StaticClass();
|
||||
}
|
||||
}
|
||||
|
||||
public class Bug285 {
|
||||
public void foo() {
|
||||
Optional<Integer> opt = Optional.empty();
|
||||
StaticClass b = StaticClass.barbar();
|
||||
}
|
||||
}
|
7
lib/resources/bytecode/javFiles/Bug290A.jav
Normal file
7
lib/resources/bytecode/javFiles/Bug290A.jav
Normal file
@ -0,0 +1,7 @@
|
||||
import Bug290B;
|
||||
|
||||
public class Bug290A {
|
||||
public void m() {
|
||||
new Bug290B();
|
||||
}
|
||||
}
|
11
lib/resources/bytecode/javFiles/Bug290B.jav
Normal file
11
lib/resources/bytecode/javFiles/Bug290B.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.lang.String;
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug290B {
|
||||
String name;
|
||||
|
||||
public Bug290B() {
|
||||
Integer i = 0;
|
||||
name = i.toString() + "$$";
|
||||
}
|
||||
}
|
13
lib/resources/bytecode/javFiles/Bug293.jav
Normal file
13
lib/resources/bytecode/javFiles/Bug293.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Float;
|
||||
|
||||
public class Bug293 {
|
||||
bar(a) {
|
||||
return 2 * a;
|
||||
}
|
||||
}
|
||||
|
||||
interface IFoo {
|
||||
void ga();
|
||||
}
|
||||
|
18
lib/resources/bytecode/javFiles/Bug295.jav
Normal file
18
lib/resources/bytecode/javFiles/Bug295.jav
Normal file
@ -0,0 +1,18 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug295 {
|
||||
public Integer a;
|
||||
public Integer b;
|
||||
public Integer c;
|
||||
|
||||
public Bug295(a, b, c) {
|
||||
this(a);
|
||||
this.b = b;
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public Bug295(a) {
|
||||
this.a = a;
|
||||
}
|
||||
}
|
||||
|
11
lib/resources/bytecode/javFiles/Bug296.jav
Normal file
11
lib/resources/bytecode/javFiles/Bug296.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug296 {
|
||||
public static m1() {
|
||||
return m2();
|
||||
}
|
||||
|
||||
static m2() {
|
||||
return 10;
|
||||
}
|
||||
}
|
11
lib/resources/bytecode/javFiles/Bug297.jav
Normal file
11
lib/resources/bytecode/javFiles/Bug297.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug297 {
|
||||
public static operation(func, a, b) {
|
||||
return func.apply(a, b);
|
||||
}
|
||||
|
||||
public exec() {
|
||||
return Foo.operation((x, y) -> x + y, 10, 10);
|
||||
}
|
||||
}
|
17
lib/resources/bytecode/javFiles/Bug298.jav
Normal file
17
lib/resources/bytecode/javFiles/Bug298.jav
Normal file
@ -0,0 +1,17 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.lang.Integer;
|
||||
import java.lang.System;
|
||||
import java.lang.Boolean;
|
||||
import java.io.PrintStream;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class Bug298 {
|
||||
public void m() {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.stream().map(x -> 2 * x);
|
||||
|
||||
Function<Integer, Boolean> filter = x -> true;
|
||||
}
|
||||
}
|
17
lib/resources/bytecode/javFiles/Bug300.jav
Normal file
17
lib/resources/bytecode/javFiles/Bug300.jav
Normal file
@ -0,0 +1,17 @@
|
||||
import java.lang.String;
|
||||
|
||||
class Base {
|
||||
toString() {
|
||||
return "Base";
|
||||
}
|
||||
}
|
||||
|
||||
public class Bug300 extends Base {
|
||||
public m() {
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
toString() {
|
||||
return "Derived";
|
||||
}
|
||||
}
|
4
lib/resources/bytecode/javFiles/Bug301.jav
Normal file
4
lib/resources/bytecode/javFiles/Bug301.jav
Normal file
@ -0,0 +1,4 @@
|
||||
import java.util.HashSet;
|
||||
|
||||
public class Bug301<A> extends HashSet<A> {
|
||||
}
|
11
lib/resources/bytecode/javFiles/Bug302.jav
Normal file
11
lib/resources/bytecode/javFiles/Bug302.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug302 {
|
||||
public Bug302(List<Integer> a){}
|
||||
|
||||
public static m() {
|
||||
new Bug302(new ArrayList<Integer>());
|
||||
}
|
||||
}
|
13
lib/resources/bytecode/javFiles/Bug306.jav
Normal file
13
lib/resources/bytecode/javFiles/Bug306.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.List;
|
||||
|
||||
class Base {
|
||||
m(List<Integer> a) {}
|
||||
}
|
||||
|
||||
public class Bug306 extends Base {
|
||||
@Override
|
||||
m(List<Integer> b) {
|
||||
b.add(1);
|
||||
}
|
||||
}
|
46
lib/resources/bytecode/javFiles/Bug307.jav
Normal file
46
lib/resources/bytecode/javFiles/Bug307.jav
Normal file
@ -0,0 +1,46 @@
|
||||
public class Bug307 {
|
||||
public void main() {
|
||||
IVisitor v = new Visitor();
|
||||
Impl2 f = new Impl2();
|
||||
Impl1 g = new Impl1();
|
||||
|
||||
f.accept(v);
|
||||
g.accept(v);
|
||||
}
|
||||
}
|
||||
|
||||
interface IVisitor {
|
||||
void visit(Impl1 f);
|
||||
void visit(Impl2 fb);
|
||||
}
|
||||
|
||||
interface IAcceptor {
|
||||
void accept(IVisitor v);
|
||||
}
|
||||
|
||||
class Visitor implements IVisitor {
|
||||
|
||||
@Override
|
||||
public void visit(Impl1 f) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visit(Impl2 fb) {
|
||||
}
|
||||
}
|
||||
|
||||
class Impl1 implements IAcceptor {
|
||||
|
||||
@Override
|
||||
public void accept(IVisitor v) {
|
||||
v.visit(this);
|
||||
}
|
||||
}
|
||||
|
||||
class Impl2 implements IAcceptor {
|
||||
|
||||
@Override
|
||||
public void accept(IVisitor v) {
|
||||
v.visit(this);
|
||||
}
|
||||
}
|
16
lib/resources/bytecode/javFiles/Bug309.jav
Normal file
16
lib/resources/bytecode/javFiles/Bug309.jav
Normal file
@ -0,0 +1,16 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.lang.Integer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.Optional;
|
||||
|
||||
public class Bug309 {
|
||||
public main() {
|
||||
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5,6,7,8,9));
|
||||
var res = list.stream().filter(x -> x == 5).map(x -> x * 2).findFirst();
|
||||
return res;
|
||||
}
|
||||
}
|
9
lib/resources/bytecode/javFiles/Bug310.jav
Normal file
9
lib/resources/bytecode/javFiles/Bug310.jav
Normal file
@ -0,0 +1,9 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
|
||||
public class Bug310 {
|
||||
Integer i = 3;
|
||||
public toString() {
|
||||
return i.toString();
|
||||
}
|
||||
}
|
10
lib/resources/bytecode/javFiles/Bug311.jav
Normal file
10
lib/resources/bytecode/javFiles/Bug311.jav
Normal file
@ -0,0 +1,10 @@
|
||||
import java.lang.String;
|
||||
|
||||
public class Bug311 {
|
||||
Bug311A i = new Bug311A();
|
||||
public toString() {
|
||||
return i.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class Bug311A {}
|
8
lib/resources/bytecode/javFiles/Bug312.jav
Normal file
8
lib/resources/bytecode/javFiles/Bug312.jav
Normal file
@ -0,0 +1,8 @@
|
||||
public class Bug312 {
|
||||
Bug312A i = new Bug312A();
|
||||
public main() {
|
||||
if (i == null) {}
|
||||
}
|
||||
}
|
||||
|
||||
class Bug312A {}
|
13
lib/resources/bytecode/javFiles/Bug314.jav
Normal file
13
lib/resources/bytecode/javFiles/Bug314.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class Bug314 {
|
||||
public List<Integer> convert(List<Integer> in) {
|
||||
return in.stream().filter(x -> x > 5).collect(Collectors.toList());
|
||||
}
|
||||
}
|
13
lib/resources/bytecode/javFiles/Bug325.jav
Normal file
13
lib/resources/bytecode/javFiles/Bug325.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.function.Function;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Bug325 {
|
||||
public main() {
|
||||
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5));
|
||||
var func = x -> x*2;
|
||||
return list.stream().map(func).toList();
|
||||
}
|
||||
}
|
8
lib/resources/bytecode/javFiles/Bug326.jav
Normal file
8
lib/resources/bytecode/javFiles/Bug326.jav
Normal file
@ -0,0 +1,8 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Bug326 {
|
||||
public Bug326() {
|
||||
var func = x -> y -> x * y;
|
||||
return func.apply(3).apply(4);
|
||||
}
|
||||
}
|
8
lib/resources/bytecode/javFiles/Bug328.jav
Normal file
8
lib/resources/bytecode/javFiles/Bug328.jav
Normal file
@ -0,0 +1,8 @@
|
||||
import java.lang.Integer;
|
||||
import Bug328B;
|
||||
|
||||
public class Bug328 extends Bug328B {
|
||||
public Bug328() {
|
||||
super(1);
|
||||
}
|
||||
}
|
3
lib/resources/bytecode/javFiles/Bug328B.java
Normal file
3
lib/resources/bytecode/javFiles/Bug328B.java
Normal file
@ -0,0 +1,3 @@
|
||||
public class Bug328B {
|
||||
public Bug328B(int a) {}
|
||||
}
|
16
lib/resources/bytecode/javFiles/Bug98.jav
Normal file
16
lib/resources/bytecode/javFiles/Bug98.jav
Normal file
@ -0,0 +1,16 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
|
||||
public class Bug98 {
|
||||
|
||||
public m(x, y ,z) {
|
||||
x = new Vector<Integer>();
|
||||
y = new Vector<String>();
|
||||
x.add(1);
|
||||
y.add("2");
|
||||
//Integer i = x.elementAt(0);
|
||||
//String s = y.elementAt(0);
|
||||
return z.vectorAddAll(x, y);
|
||||
}
|
||||
}
|
16
lib/resources/bytecode/javFiles/BugXXX.jav
Normal file
16
lib/resources/bytecode/javFiles/BugXXX.jav
Normal file
@ -0,0 +1,16 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.lang.String;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.lang.Integer;
|
||||
|
||||
class BugXXX {
|
||||
public main() {
|
||||
List<Integer> i = new ArrayList<>(List.of(1,2,3,4,5,6,7,8,9,10));
|
||||
Optional<Integer> tmp = i.stream().filter(x -> x == 5).map(x -> x*2).findFirst();
|
||||
return tmp;
|
||||
}
|
||||
}
|
11
lib/resources/bytecode/javFiles/CC.jav
Normal file
11
lib/resources/bytecode/javFiles/CC.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import BB;
|
||||
|
||||
public class CC extends BB {
|
||||
public m(Integer i) {
|
||||
return "CC";
|
||||
}
|
||||
|
||||
public m2(CC x) { return "CC"; }
|
||||
}
|
13
lib/resources/bytecode/javFiles/Chain.jav
Normal file
13
lib/resources/bytecode/javFiles/Chain.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Chain {
|
||||
x = 5;
|
||||
|
||||
chain() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public m() {
|
||||
return this.chain().chain().chain().x;
|
||||
}
|
||||
}
|
8
lib/resources/bytecode/javFiles/ClassGenLam.jav
Normal file
8
lib/resources/bytecode/javFiles/ClassGenLam.jav
Normal file
@ -0,0 +1,8 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class ClassGenLam {
|
||||
lam = x-> x;
|
||||
// public ClassGenLam() {
|
||||
// lam = x->x;
|
||||
// }
|
||||
}
|
6
lib/resources/bytecode/javFiles/Cycle.jav
Normal file
6
lib/resources/bytecode/javFiles/Cycle.jav
Normal file
@ -0,0 +1,6 @@
|
||||
public class Cycle {
|
||||
public m(x, y) {
|
||||
y = x;
|
||||
x = y;
|
||||
}
|
||||
}
|
5
lib/resources/bytecode/javFiles/DD.jav
Normal file
5
lib/resources/bytecode/javFiles/DD.jav
Normal file
@ -0,0 +1,5 @@
|
||||
import java.lang.Integer;
|
||||
import CC;
|
||||
|
||||
public class DD extends CC { }
|
||||
|
11
lib/resources/bytecode/javFiles/DuMethod.jav
Normal file
11
lib/resources/bytecode/javFiles/DuMethod.jav
Normal file
@ -0,0 +1,11 @@
|
||||
public class DuMethod{
|
||||
|
||||
method(a){
|
||||
return a+a;
|
||||
}
|
||||
|
||||
method(a){
|
||||
return a;
|
||||
}
|
||||
|
||||
}
|
3
lib/resources/bytecode/javFiles/EmptyClass.jav
Normal file
3
lib/resources/bytecode/javFiles/EmptyClass.jav
Normal file
@ -0,0 +1,3 @@
|
||||
public class EmptyClass{
|
||||
|
||||
}
|
8
lib/resources/bytecode/javFiles/EmptyMethod.jav
Normal file
8
lib/resources/bytecode/javFiles/EmptyMethod.jav
Normal file
@ -0,0 +1,8 @@
|
||||
public class EmptyMethod{
|
||||
|
||||
public void m1(){
|
||||
System.out.println("test");
|
||||
}
|
||||
|
||||
public void m2(){}
|
||||
}
|
9
lib/resources/bytecode/javFiles/Example.jav
Normal file
9
lib/resources/bytecode/javFiles/Example.jav
Normal file
@ -0,0 +1,9 @@
|
||||
import java.lang.String;
|
||||
|
||||
public class Example {
|
||||
|
||||
public m() {
|
||||
String x = "X";
|
||||
return x;
|
||||
}
|
||||
}
|
8
lib/resources/bytecode/javFiles/Exceptions.jav
Normal file
8
lib/resources/bytecode/javFiles/Exceptions.jav
Normal file
@ -0,0 +1,8 @@
|
||||
import java.lang.String;
|
||||
import java.lang.RuntimeException;
|
||||
|
||||
public class Exceptions {
|
||||
public m() {
|
||||
throw new RuntimeException("Some Exception");
|
||||
}
|
||||
}
|
8
lib/resources/bytecode/javFiles/Expressions.jav
Normal file
8
lib/resources/bytecode/javFiles/Expressions.jav
Normal file
@ -0,0 +1,8 @@
|
||||
class Expressions{
|
||||
|
||||
void test(){
|
||||
var x = 2;
|
||||
x = x + 2;
|
||||
}
|
||||
|
||||
}
|
10
lib/resources/bytecode/javFiles/FC_Matrix.jav
Normal file
10
lib/resources/bytecode/javFiles/FC_Matrix.jav
Normal file
@ -0,0 +1,10 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class Matrix extends Vector<Vector<Integer>> {
|
||||
|
||||
methode(m) {
|
||||
m.add(1);
|
||||
Matrix i;
|
||||
methode(i);
|
||||
}
|
||||
}
|
15
lib/resources/bytecode/javFiles/Fac.jav
Normal file
15
lib/resources/bytecode/javFiles/Fac.jav
Normal file
@ -0,0 +1,15 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Double;
|
||||
import java.lang.String;
|
||||
|
||||
public class Fac {
|
||||
getFac(n) {
|
||||
var res = 1;
|
||||
var i = 1;
|
||||
while (i <= n) {
|
||||
res = res * i;
|
||||
i++;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
52
lib/resources/bytecode/javFiles/Faculty.jav
Normal file
52
lib/resources/bytecode/javFiles/Faculty.jav
Normal file
@ -0,0 +1,52 @@
|
||||
import java.lang.Integer;
|
||||
//import java.lang.Long;
|
||||
//import java.lang.Short;
|
||||
|
||||
public class Faculty {
|
||||
public fact;
|
||||
Faculty() {
|
||||
fact = (x) -> {
|
||||
if (x == 1) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
return x * (fact.apply(x-1));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
public getFact(java.lang.Integer x) {
|
||||
return fact.apply(x);
|
||||
}
|
||||
}
|
||||
// m (x) {
|
||||
//
|
||||
//// var fact = (x) -> {
|
||||
//// if (x == 1) {
|
||||
//// return x;
|
||||
//// }
|
||||
//// else {
|
||||
//// return x * (fact.apply(x-1));
|
||||
//// }
|
||||
//// };
|
||||
//// return fact;
|
||||
//// var x = 13;
|
||||
//// if(x>22) {
|
||||
//// return 0;
|
||||
//// }else if(x <1){
|
||||
//// return x;
|
||||
//// }else {
|
||||
//// return 1;
|
||||
//// }
|
||||
//
|
||||
// if (x < 0) {
|
||||
// return 0;
|
||||
// }else if(x<2) {
|
||||
// return x;
|
||||
// } else {
|
||||
// return x * m(x-1);
|
||||
// }
|
||||
// }
|
||||
//}
|
10
lib/resources/bytecode/javFiles/Faculty2.jav
Normal file
10
lib/resources/bytecode/javFiles/Faculty2.jav
Normal file
@ -0,0 +1,10 @@
|
||||
class Faculty2 {
|
||||
|
||||
m () {
|
||||
|
||||
var fact = (Integer x) -> {
|
||||
return x;
|
||||
};
|
||||
return fact;
|
||||
}
|
||||
}
|
17
lib/resources/bytecode/javFiles/FacultyIf.jav
Normal file
17
lib/resources/bytecode/javFiles/FacultyIf.jav
Normal file
@ -0,0 +1,17 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
class Faculty {
|
||||
|
||||
m () {
|
||||
|
||||
var fact = (Integer x) -> {
|
||||
if (x == 1) {
|
||||
return x;
|
||||
}
|
||||
else {
|
||||
return x * (fact.apply(x-1));
|
||||
}
|
||||
};
|
||||
return fact;
|
||||
}
|
||||
}
|
19
lib/resources/bytecode/javFiles/FacultyTyped.jav
Normal file
19
lib/resources/bytecode/javFiles/FacultyTyped.jav
Normal file
@ -0,0 +1,19 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
class Faculty {
|
||||
|
||||
Integer mul(Integer x, Integer y) {
|
||||
return x;
|
||||
}
|
||||
|
||||
Fun1<java.lang.Integer,java.lang.Integer> m () {
|
||||
var fact = (Integer x) -> {
|
||||
return mul(x, fact.apply(x));
|
||||
};
|
||||
return fact;
|
||||
}
|
||||
}
|
||||
|
||||
interface Fun1<A,B>{
|
||||
B apply(A a);
|
||||
}
|
9
lib/resources/bytecode/javFiles/Field.jav
Normal file
9
lib/resources/bytecode/javFiles/Field.jav
Normal file
@ -0,0 +1,9 @@
|
||||
import java.lang.Integer;
|
||||
|
||||
public class Field {
|
||||
public x = 5;
|
||||
|
||||
m(){
|
||||
return x;
|
||||
}
|
||||
}
|
13
lib/resources/bytecode/javFiles/FieldAccess.jav
Normal file
13
lib/resources/bytecode/javFiles/FieldAccess.jav
Normal file
@ -0,0 +1,13 @@
|
||||
class Box<A> {
|
||||
A f;
|
||||
}
|
||||
class B {
|
||||
}
|
||||
|
||||
class Box_Main extends B {
|
||||
|
||||
m(b) {
|
||||
b.f = new Box_Main();
|
||||
b.f = new B();
|
||||
}
|
||||
}
|
4
lib/resources/bytecode/javFiles/FieldTph.jav
Normal file
4
lib/resources/bytecode/javFiles/FieldTph.jav
Normal file
@ -0,0 +1,4 @@
|
||||
public class FieldTph {
|
||||
a;
|
||||
|
||||
}
|
14
lib/resources/bytecode/javFiles/FieldTph2.jav
Normal file
14
lib/resources/bytecode/javFiles/FieldTph2.jav
Normal file
@ -0,0 +1,14 @@
|
||||
import java.lang.String;
|
||||
|
||||
public class FieldTph2 {
|
||||
public a;
|
||||
|
||||
public m(b){
|
||||
b = a;
|
||||
return b;
|
||||
}
|
||||
|
||||
public m2(c){
|
||||
a = c;
|
||||
}
|
||||
}
|
26
lib/resources/bytecode/javFiles/FieldTphConsMeth.jav
Normal file
26
lib/resources/bytecode/javFiles/FieldTphConsMeth.jav
Normal file
@ -0,0 +1,26 @@
|
||||
public class FieldTphConsMeth {
|
||||
|
||||
public a;
|
||||
public FieldTphConsMeth(c) {
|
||||
a = id(c);
|
||||
}
|
||||
|
||||
public id(b) {
|
||||
return b;
|
||||
}
|
||||
|
||||
public setA(x) {
|
||||
a = x;
|
||||
return a;
|
||||
}
|
||||
|
||||
public m(x,y) {
|
||||
x = id(y);
|
||||
}
|
||||
|
||||
/*m2(x,y) {
|
||||
x = setA(y);
|
||||
return x;
|
||||
}*/
|
||||
|
||||
}
|
27
lib/resources/bytecode/javFiles/FieldTphMMeth.jav
Normal file
27
lib/resources/bytecode/javFiles/FieldTphMMeth.jav
Normal file
@ -0,0 +1,27 @@
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class FieldTphMMeth {
|
||||
public a;
|
||||
|
||||
public FieldTphMMeth(c,d,e) {
|
||||
a = m(c,d,e);
|
||||
}
|
||||
|
||||
public m(b,d,e) {
|
||||
if(e) {
|
||||
return m3(b);
|
||||
} else{
|
||||
return m3(d);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public m2(b) {
|
||||
a = m3(b);
|
||||
}
|
||||
|
||||
public m3(b){
|
||||
return b;
|
||||
}
|
||||
|
||||
}
|
11
lib/resources/bytecode/javFiles/Fields.jav
Normal file
11
lib/resources/bytecode/javFiles/Fields.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.lang.String;
|
||||
|
||||
class Fields{
|
||||
test2 = "test";
|
||||
test;
|
||||
m(){
|
||||
var test3;
|
||||
return test;
|
||||
}
|
||||
|
||||
}
|
30
lib/resources/bytecode/javFiles/For.jav
Normal file
30
lib/resources/bytecode/javFiles/For.jav
Normal file
@ -0,0 +1,30 @@
|
||||
import java.lang.Integer;
|
||||
import java.lang.Boolean;
|
||||
|
||||
public class For{
|
||||
public Integer m(Integer x){
|
||||
var c = x + 2;
|
||||
Boolean b = true;
|
||||
c = 5;
|
||||
c++;
|
||||
++c;
|
||||
c--;
|
||||
--c;
|
||||
while(x<2){
|
||||
x = x +1;
|
||||
b = false;
|
||||
}
|
||||
for(int i = 0; i<10; i++) {
|
||||
x = x + 5;
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
// m2(Integer x){
|
||||
// if(x<2) {
|
||||
// return 1;
|
||||
// }else {
|
||||
// return 2;
|
||||
// }
|
||||
// }
|
||||
}
|
23
lib/resources/bytecode/javFiles/ForEach.jav
Normal file
23
lib/resources/bytecode/javFiles/ForEach.jav
Normal file
@ -0,0 +1,23 @@
|
||||
import java.util.ArrayList;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Number;
|
||||
|
||||
public class ForEach {
|
||||
public m() {
|
||||
var list = new ArrayList<>();
|
||||
list.add(1); list.add(2); list.add(3);
|
||||
|
||||
var sum = 0;
|
||||
for (var i : list) {
|
||||
sum = sum + i;
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
public m2() {
|
||||
var list = new ArrayList<? extends Number>();
|
||||
|
||||
for (Number n : list) {
|
||||
}
|
||||
}
|
||||
}
|
12
lib/resources/bytecode/javFiles/FunOL.jav
Normal file
12
lib/resources/bytecode/javFiles/FunOL.jav
Normal file
@ -0,0 +1,12 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
//import java.lang.Byte;
|
||||
//import java.lang.Boolean;
|
||||
|
||||
public class FunOL {
|
||||
|
||||
add(f, y) {
|
||||
return f.apply() + y;
|
||||
}
|
||||
}
|
15
lib/resources/bytecode/javFiles/FunctionalInterface.jav
Normal file
15
lib/resources/bytecode/javFiles/FunctionalInterface.jav
Normal file
@ -0,0 +1,15 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class FunctionalInterface {
|
||||
Integer accept(Function<Integer, Integer> f) {
|
||||
return f.apply(20);
|
||||
}
|
||||
|
||||
public Integer m() {
|
||||
var v = accept(i -> {
|
||||
return i * 10;
|
||||
});
|
||||
return v;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user