@Test public void testTwoFilesBagPathImportSuccess() throws CompileException, IOException { File dir = Files.createTempDir(); dir.deleteOnExit(); File f1 = new File(dir, "bagpathimport"); File f2 = createFile(); write(f1, "bag MyBag1 {bool test = 0;}"); write(f2, "import \"%s\";\nbag MyBag2 {bool test = 0;}", f1.getName()); List<String> inputFiles = Lists.newArrayList(f2.getAbsolutePath()); List<String> bagPath = Lists.newArrayList(dir.getAbsolutePath()); Linker.link(inputFiles, bagPath); }
public static Set<BaggageBuffersDeclaration> link(BBC.Settings settings) throws CompileException { return link(settings.files, FileUtils.splitBagPath(settings.bagPath)); }
Linker { public static Set<BaggageBuffersDeclaration> link(BBC.Settings settings) throws CompileException { return link(settings.files, FileUtils.splitBagPath(settings.bagPath)); } }
Linker { public static Set<BaggageBuffersDeclaration> link(BBC.Settings settings) throws CompileException { return link(settings.files, FileUtils.splitBagPath(settings.bagPath)); } private  Linker(List<String> bagPath); }
Linker { public static Set<BaggageBuffersDeclaration> link(BBC.Settings settings) throws CompileException { return link(settings.files, FileUtils.splitBagPath(settings.bagPath)); } private  Linker(List<String> bagPath); static Set<BaggageBuffersDeclaration> link(BBC.Settings settings); static Set<BaggageBuffersDeclaration> link(List<String> inputFiles,
                                                      List<String> bagPath); static BaggageBuffersDeclaration link(String inputFileContents,
                                                 List<String> bagPath); static void checkForDuplicateObjectDeclarations(File inputFile,
                                                           BaggageBuffersDeclaration bbDecl); static void checkForDuplicateFieldDeclarations(File inputFile,
                                                             BaggageBuffersDeclaration bbDecl); static void checkBagForDuplicateFieldDeclarations(File inputFile, BagDeclaration bagDecl); static void checkStructForDuplicateFieldDeclarations(File inputFile, StructDeclaration structDecl); static void fillPackageNames(BaggageBuffersDeclaration bbDecl); void resolveFieldPackageNames(File inputFile, BaggageBuffersDeclaration bbDecl); void resolveField(File inputFile, String bagName, FieldDeclaration fieldDecl, FieldType fieldType,
                             List<BaggageBuffersDeclaration> searchPath); void resolveStructField(File inputFile, String structName, StructFieldDeclaration fieldDecl,
                                   FieldType fieldType,
                                   List<BaggageBuffersDeclaration> searchPath); ObjectDeclaration findObject(String objectNameToFind, String packageNameToFind,
                                  List<BaggageBuffersDeclaration> toSearch); StructDeclaration findStruct(String structNameToFind, String packageNameToFind,
                                        List<BaggageBuffersDeclaration> toSearch); static Map<File, BaggageBuffersDeclaration> loadInputFiles(List<String> fileNames); BaggageBuffersDeclaration getImport(File importedBy, String importedAs); }
Linker { public static Set<BaggageBuffersDeclaration> link(BBC.Settings settings) throws CompileException { return link(settings.files, FileUtils.splitBagPath(settings.bagPath)); } private  Linker(List<String> bagPath); static Set<BaggageBuffersDeclaration> link(BBC.Settings settings); static Set<BaggageBuffersDeclaration> link(List<String> inputFiles,
                                                      List<String> bagPath); static BaggageBuffersDeclaration link(String inputFileContents,
                                                 List<String> bagPath); static void checkForDuplicateObjectDeclarations(File inputFile,
                                                           BaggageBuffersDeclaration bbDecl); static void checkForDuplicateFieldDeclarations(File inputFile,
                                                             BaggageBuffersDeclaration bbDecl); static void checkBagForDuplicateFieldDeclarations(File inputFile, BagDeclaration bagDecl); static void checkStructForDuplicateFieldDeclarations(File inputFile, StructDeclaration structDecl); static void fillPackageNames(BaggageBuffersDeclaration bbDecl); void resolveFieldPackageNames(File inputFile, BaggageBuffersDeclaration bbDecl); void resolveField(File inputFile, String bagName, FieldDeclaration fieldDecl, FieldType fieldType,
                             List<BaggageBuffersDeclaration> searchPath); void resolveStructField(File inputFile, String structName, StructFieldDeclaration fieldDecl,
                                   FieldType fieldType,
                                   List<BaggageBuffersDeclaration> searchPath); ObjectDeclaration findObject(String objectNameToFind, String packageNameToFind,
                                  List<BaggageBuffersDeclaration> toSearch); StructDeclaration findStruct(String structNameToFind, String packageNameToFind,
                                        List<BaggageBuffersDeclaration> toSearch); static Map<File, BaggageBuffersDeclaration> loadInputFiles(List<String> fileNames); BaggageBuffersDeclaration getImport(File importedBy, String importedAs); final List<String> bagPath; final Map<File, BaggageBuffersDeclaration> loadedFiles; }