Fix tests
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m58s
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 3m58s
This commit is contained in:
parent
df78937ef3
commit
b3bd5cde10
@ -78,7 +78,7 @@ public class JavaTXCompiler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public JavaTXCompiler(File sourceFile) throws IOException, ClassNotFoundException {
|
public JavaTXCompiler(File sourceFile) throws IOException, ClassNotFoundException {
|
||||||
this(Arrays.asList(sourceFile), null, new File(""));
|
this(Arrays.asList(sourceFile), List.of(), new File("."));
|
||||||
}
|
}
|
||||||
|
|
||||||
public JavaTXCompiler(File sourceFile, Boolean log) throws IOException, ClassNotFoundException {
|
public JavaTXCompiler(File sourceFile, Boolean log) throws IOException, ClassNotFoundException {
|
||||||
@ -87,7 +87,7 @@ public class JavaTXCompiler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public JavaTXCompiler(List<File> sourceFiles) throws IOException, ClassNotFoundException {
|
public JavaTXCompiler(List<File> sourceFiles) throws IOException, ClassNotFoundException {
|
||||||
this(sourceFiles, null, new File(""));
|
this(sourceFiles, List.of(), new File("."));
|
||||||
}
|
}
|
||||||
|
|
||||||
public JavaTXCompiler(List<File> sources, List<File> contextPath, File outputPath) throws IOException, ClassNotFoundException {
|
public JavaTXCompiler(List<File> sources, List<File> contextPath, File outputPath) throws IOException, ClassNotFoundException {
|
||||||
@ -113,6 +113,7 @@ public class JavaTXCompiler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ClassOrInterface getClass(JavaClassName name) {
|
public ClassOrInterface getClass(JavaClassName name) {
|
||||||
|
if (loadedClasses.containsKey(name)) return loadedClasses.get(name).cif();
|
||||||
for (var sf : sourceFiles.values()) {
|
for (var sf : sourceFiles.values()) {
|
||||||
for (var clazz : sf.KlassenVektor) {
|
for (var clazz : sf.KlassenVektor) {
|
||||||
if (clazz.getClassName().equals(name)) return clazz;
|
if (clazz.getClassName().equals(name)) return clazz;
|
||||||
@ -685,7 +686,7 @@ public class JavaTXCompiler {
|
|||||||
public ClassOrInterface loadJavaTXClass(JavaClassName name) {
|
public ClassOrInterface loadJavaTXClass(JavaClassName name) {
|
||||||
var file = findFileForClass(name);
|
var file = findFileForClass(name);
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
if (classRegistry.contains(name)) return getClass(name);
|
if (loadedClasses.containsKey(name)) return loadedClasses.get(name).cif();
|
||||||
try {
|
try {
|
||||||
var tree = JavaTXParser.parse(file);
|
var tree = JavaTXParser.parse(file);
|
||||||
classRegistry.addName(name.toString(), 0); // TODO This gets overwritten later, is it bad if we don't know this right away?
|
classRegistry.addName(name.toString(), 0); // TODO This gets overwritten later, is it bad if we don't know this right away?
|
||||||
|
Loading…
Reference in New Issue
Block a user