Search in sources :

Example 6 with GenerationUnit

use of com.google.devtools.j2objc.gen.GenerationUnit in project j2objc by google.

the class GenerationTest method generateFromUnit.

protected String generateFromUnit(CompilationUnit unit, String filename) throws IOException {
    GenerationUnit genUnit = new GenerationUnit(unit.getSourceFilePath(), options);
    genUnit.incrementInputs();
    genUnit.addCompilationUnit(unit);
    TranslationProcessor.generateObjectiveCSource(genUnit);
    return getTranslatedFile(filename);
}
Also used : GenerationUnit(com.google.devtools.j2objc.gen.GenerationUnit)

Aggregations

GenerationUnit (com.google.devtools.j2objc.gen.GenerationUnit)6 Options (com.google.devtools.j2objc.Options)2 RegularInputFile (com.google.devtools.j2objc.file.RegularInputFile)2 InputFile (com.google.devtools.j2objc.file.InputFile)1 InputFilePreprocessor (com.google.devtools.j2objc.pipeline.InputFilePreprocessor)1 ProcessingContext (com.google.devtools.j2objc.pipeline.ProcessingContext)1 TranslationProcessor (com.google.devtools.j2objc.pipeline.TranslationProcessor)1 TimeTracker (com.google.devtools.j2objc.util.TimeTracker)1 File (java.io.File)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 ZipEntry (java.util.zip.ZipEntry)1 ZipException (java.util.zip.ZipException)1 ZipFile (java.util.zip.ZipFile)1