Merge with bigRefactoring
This commit is contained in:
commit
96ffc12ebc
BIN
doc/Studienarbeiten/S2021_Etienne_Zink.pdf
Normal file
BIN
doc/Studienarbeiten/S2021_Etienne_Zink.pdf
Normal file
Binary file not shown.
77
pom.xml
77
pom.xml
@ -43,39 +43,18 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<artifactId>asm</artifactId>
|
||||
<version>7.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-all</artifactId>
|
||||
<version>[4.0.0,)</version> </dependency> -->
|
||||
<!-- <dependency> <groupId>org.bitbucket.mstrobel</groupId> <artifactId>procyon-reflection</artifactId>
|
||||
<version>[0.5.32,)</version> </dependency> -->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<directory>target</directory>
|
||||
<outputDirectory>target/classes</outputDirectory>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<testOutputDirectory>target/test-classes</testOutputDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<fork>true</fork>
|
||||
<executable>/home/michael/programs/jdk/jdk8u232-b09/bin/javac</executable>
|
||||
<compilerVersion>1.8</compilerVersion>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin -->
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-maven-plugin</artifactId>
|
||||
@ -86,48 +65,10 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<goals>
|
||||
<goal>antlr4</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>src/main/antlr4/java8</sourceDirectory>
|
||||
<outputDirectory>${project.basedir}/src/main/java/de/dhbwstuttgart/parser/antlr</outputDirectory>
|
||||
<arguments>
|
||||
<argument>-package</argument>
|
||||
<argument>de.dhbwstuttgart.parser.antlr</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>18</source>
|
||||
<target>18</target>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
@ -136,14 +77,8 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>18</maven.compiler.source>
|
||||
<maven.compiler.target>18</maven.compiler.target>
|
||||
<compilerArgs>
|
||||
--enable-preview
|
||||
</compilerArgs>
|
||||
<tycho.version>0.23.0</tycho.version>
|
||||
<maven.compiler.source>19</maven.compiler.source>
|
||||
<maven.compiler.target>19</maven.compiler.target>
|
||||
<mainClass>de.dhbwstuttgart.core.ConsoleInterface</mainClass>
|
||||
</properties>
|
||||
<distributionManagement>
|
||||
|
13
resources/AllgemeinTest/Box.jav
Normal file
13
resources/AllgemeinTest/Box.jav
Normal file
@ -0,0 +1,13 @@
|
||||
class Box<A>{
|
||||
void m(A a){}
|
||||
}
|
||||
|
||||
class B { }
|
||||
|
||||
class Box_Main extends B {
|
||||
|
||||
m(b) {
|
||||
b.m(new Box_Main());
|
||||
b.m(new B());
|
||||
}
|
||||
}
|
13
resources/AllgemeinTest/Box_Main.jav
Normal file
13
resources/AllgemeinTest/Box_Main.jav
Normal file
@ -0,0 +1,13 @@
|
||||
class Box<A>{
|
||||
A f;
|
||||
}
|
||||
|
||||
class B { }
|
||||
|
||||
class Box_Main extends B {//Fehler Bugzilla Bug 230
|
||||
|
||||
m(b) {
|
||||
b.f = new Box_Main();
|
||||
b.f = new B();
|
||||
}
|
||||
}
|
7
resources/AllgemeinTest/M.jav
Executable file
7
resources/AllgemeinTest/M.jav
Executable file
@ -0,0 +1,7 @@
|
||||
import java.util.List;
|
||||
class M {
|
||||
void m(p, p2){
|
||||
|
||||
new addList().addLists(p, p2);
|
||||
}
|
||||
}
|
@ -2,6 +2,12 @@ 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;
|
||||
}
|
19
resources/AllgemeinTest/Put.jav
Normal file
19
resources/AllgemeinTest/Put.jav
Normal file
@ -0,0 +1,19 @@
|
||||
import java.util.Vector;
|
||||
import java.util.Stack;
|
||||
|
||||
class Put {
|
||||
|
||||
putElement(ele, v) {
|
||||
v.addElement(ele);
|
||||
}
|
||||
|
||||
putElement(ele, s) {
|
||||
s.push(ele);
|
||||
}
|
||||
|
||||
|
||||
main(ele, x) {
|
||||
putElement(ele, x);
|
||||
}
|
||||
|
||||
}
|
4
resources/AllgemeinTest/Test.jav
Normal file
4
resources/AllgemeinTest/Test.jav
Normal file
@ -0,0 +1,4 @@
|
||||
class Test {
|
||||
a;
|
||||
Test b;
|
||||
}
|
12
resources/AllgemeinTest/TestSubTypless.jav
Normal file
12
resources/AllgemeinTest/TestSubTypless.jav
Normal file
@ -0,0 +1,12 @@
|
||||
import java.util.ArrayList;
|
||||
|
||||
class TestSubTypless {
|
||||
m(a){
|
||||
var l = new ArrayList<>();
|
||||
l.add(a);
|
||||
return m2(l).get(0);
|
||||
}
|
||||
m2(a){
|
||||
return m(a);
|
||||
}
|
||||
}
|
3
resources/AllgemeinTest/Twice.jav
Normal file
3
resources/AllgemeinTest/Twice.jav
Normal file
@ -0,0 +1,3 @@
|
||||
class Twice {
|
||||
twice = f -> x -> f.apply(f.apply(x));
|
||||
}
|
5
resources/AllgemeinTest/Var.jav
Normal file
5
resources/AllgemeinTest/Var.jav
Normal file
@ -0,0 +1,5 @@
|
||||
class Var {
|
||||
|
||||
var(x) { var y; }
|
||||
|
||||
}
|
15
resources/AllgemeinTest/VectorConstAdd.jav
Normal file
15
resources/AllgemeinTest/VectorConstAdd.jav
Normal file
@ -0,0 +1,15 @@
|
||||
import java.util.Vector;
|
||||
import java.lang.Integer;
|
||||
|
||||
|
||||
public class VectorConstAdd {
|
||||
vectorAdd(v1) {
|
||||
var i = 0;
|
||||
var erg = new Vector<>();
|
||||
while (i < v1.size()) {
|
||||
erg.addElement(v1.elementAt(i) + 1);
|
||||
i++;
|
||||
}
|
||||
return erg;
|
||||
}
|
||||
}
|
8
resources/AllgemeinTest/Wildcard_Andi.jav
Normal file
8
resources/AllgemeinTest/Wildcard_Andi.jav
Normal file
@ -0,0 +1,8 @@
|
||||
class Wildcard_Andi {
|
||||
|
||||
Test<? extends A> ex = new Test<>();
|
||||
|
||||
Test<? super A> sup = new Test<>();
|
||||
}
|
||||
|
||||
|
8
resources/AllgemeinTest/addList.jav
Executable file
8
resources/AllgemeinTest/addList.jav
Executable file
@ -0,0 +1,8 @@
|
||||
import java.util.List;
|
||||
|
||||
class addList {
|
||||
addLists(a, b){
|
||||
a.add(b.get(0));
|
||||
b.add(a.get(0));
|
||||
}
|
||||
}
|
22
resources/AllgemeinTest/wildcardPair.jav
Normal file
22
resources/AllgemeinTest/wildcardPair.jav
Normal file
@ -0,0 +1,22 @@
|
||||
import java.util.List;
|
||||
import java.lang.Integer;
|
||||
import java.lang.Object;
|
||||
import java.lang.Boolean;
|
||||
|
||||
class wildcardPair {
|
||||
|
||||
make(l) {
|
||||
var p = new Pair(l.get(0), l.get(1));
|
||||
return p;
|
||||
}
|
||||
//<X>Boolean compare(Pair<X, X> x) { return true; }
|
||||
void m(l) {
|
||||
Object o = l.get(0);
|
||||
|
||||
//Pair<? extends Object, ? extends Object> p;
|
||||
//List<?> b;
|
||||
//this.compare(p); //1, type incorrect
|
||||
make(l);
|
||||
//this.compare(this.make(b)); //2, OK
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user