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.BytecodeGen;
|
||||||
import de.dhbwstuttgart.bytecode.Exception.BytecodeGeneratorError;
|
import de.dhbwstuttgart.bytecode.Exception.BytecodeGeneratorError;
|
||||||
import de.dhbwstuttgart.bytecode.descriptor.TypeToDescriptor;
|
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.core.JavaTXCompiler;
|
||||||
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
import de.dhbwstuttgart.exceptions.TypeinferenceException;
|
||||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
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) {
|
public synchronized HashMap<String, byte[]> getBytecode(SourceFile sf, Collection<ResultSet> resultSets, String path) {
|
||||||
HashMap<String, byte[]> classFiles = new HashMap<>();
|
try {
|
||||||
BytecodeGen bytecodeGen = new BytecodeGen(classFiles, resultSets, sf, path);
|
HashMap<String, byte[]> classFiles = new HashMap<>();
|
||||||
bytecodeGen.visit(sf);
|
List<GenericGenratorResultForSourceFile> genericResults = compiler.getGeneratedGenericResultsForAllSourceFiles(new ArrayList<>(resultSets));
|
||||||
List<HashMap<String, SimplifyResult>> simplifyResultsList = bytecodeGen.getSimplifyResultsList();
|
BytecodeGen bytecodeGen = new BytecodeGen(classFiles,resultSets, genericResults, sf,path);
|
||||||
return bytecodeGen.getClassFiles();
|
bytecodeGen.visit(sf);
|
||||||
|
return bytecodeGen.getClassFiles();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeClassFile(String outputDirectory, HashMap<String, byte[]> classFiles) {
|
public void writeClassFile(String outputDirectory, HashMap<String, byte[]> classFiles) {
|
||||||
|
Loading…
Reference in New Issue
Block a user