/** * Print a standard Map based OSGi header. * * @param exports * map { name => Map { attribute|directive => value } } * @return the clauses */ public static String printClauses(Map<String, Map<String, String>> exports, String allowedDirectives) { return printClauses(exports, allowedDirectives, false); }
/** * Print a standard Map based OSGi header. * * @param exports * map { name => Map { attribute|directive => value } } * @return the clauses */ public static String printClauses(Map<String, Map<String, String>> exports) { return printClauses(exports, false); }
private void write(File index, Map<String, Map<String, String>> map) throws Exception { String s = Processor.printClauses(map); index.getParentFile().mkdirs(); FileWriter fw = new FileWriter(index); try { fw.write(s); } finally { fw.close(); } }
public boolean analyzeJar(Analyzer analyzer) throws Exception { ComponentMaker m = new ComponentMaker(analyzer); Map<String, Map<String, String>> l = m.doServiceComponent(); if (!l.isEmpty()) analyzer.setProperty(Constants.SERVICE_COMPONENT, Processor .printClauses(l, "")); analyzer.getInfo(m, "Service Component"); m.close(); return false; }
public boolean analyzeJar(Analyzer analyzer) throws Exception { ComponentMaker m = new ComponentMaker(analyzer); Map<String, Map<String, String>> l = m.doServiceComponent(); analyzer.setProperty(Constants.SERVICE_COMPONENT, Processor.printClauses(l)); analyzer.getInfo(m, "Service-Component: "); m.close(); return false; }
importPackages = Processor.printClauses(values, ALLOWED_PACKAGE_CLAUSES); if (notEmpty(importPackages)) { main.putValue(Analyzer.IMPORT_PACKAGE, importPackages); exportPackages = Processor.printClauses(exports, ALLOWED_PACKAGE_CLAUSES); if (notEmpty(exportPackages)) { main.putValue(Analyzer.EXPORT_PACKAGE, exportPackages);
importPackages = Processor.printClauses(values, ALLOWED_PACKAGE_CLAUSES); if (notEmpty(importPackages)) { main.putValue(Analyzer.IMPORT_PACKAGE, importPackages); exportPackages = Processor.printClauses(exports, ALLOWED_PACKAGE_CLAUSES); if (notEmpty(exportPackages)) { main.putValue(Analyzer.EXPORT_PACKAGE, exportPackages);