Generic type inserts.
This commit is contained in:
parent
4a626d0949
commit
77be850557
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/.project
|
@ -24,7 +24,7 @@ import org.eclipse.core.runtime.Status;
|
||||
import de.dhbwstuttgart.bytecode.BytecodeGen;
|
||||
import de.dhbwstuttgart.bytecode.Exception.BytecodeGeneratorError;
|
||||
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
|
||||
import de.dhbwstuttgart.bytecode.utilities.SimplifyResult;
|
||||
import de.dhbwstuttgart.bytecode.simplifyRes.GenericGenratorResultForSourceFile;
|
||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||
@ -146,11 +146,17 @@ public class Typinferenz {
|
||||
}
|
||||
|
||||
public synchronized HashMap<String, byte[]> getBytecode(SourceFile sf, Collection<ResultSet> resultSets, String path) {
|
||||
HashMap<String, byte[]> classFiles = new HashMap<>();
|
||||
BytecodeGen bytecodeGen = new BytecodeGen(classFiles, resultSets, sf, path);
|
||||
bytecodeGen.visit(sf);
|
||||
List<HashMap<String, SimplifyResult>> simplifyResultsList = bytecodeGen.getSimplifyResultsList();
|
||||
return bytecodeGen.getClassFiles();
|
||||
try {
|
||||
HashMap<String, byte[]> classFiles = new HashMap<>();
|
||||
List<GenericGenratorResultForSourceFile> genericResults = compiler.getGeneratedGenericResultsForAllSourceFiles(new ArrayList<>(resultSets));
|
||||
BytecodeGen bytecodeGen = new BytecodeGen(classFiles,resultSets, genericResults, sf,path);
|
||||
bytecodeGen.visit(sf);
|
||||
return bytecodeGen.getClassFiles();
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
return new HashMap<>();
|
||||
}
|
||||
}
|
||||
|
||||
public void writeClassFile(String outputDirectory, HashMap<String, byte[]> classFiles) {
|
||||
|
Loading…
Reference in New Issue
Block a user