public static String printClauses(Map<String, Map<String, String>> exports, boolean checkMultipleVersions) { StringBuffer sb = new StringBuffer(); String del = ""; for (Iterator<String> i = exports.keySet().iterator(); i.hasNext();) { String name = i.next(); Map<String, String> clause = exports.get(name); // We allow names to be duplicated in the input // by ending them with '~'. This is necessary to use // the package names as keys. However, we remove these // suffixes in the output so that you can set multiple // exports with different attributes. String outname = removeDuplicateMarker(name); sb.append(del); sb.append(outname); printClause(clause, sb); del = ","; } return sb.toString(); }
public static String printClauses(Map<String, Map<String, String>> exports, String allowedDirectives, boolean checkMultipleVersions) { StringBuffer sb = new StringBuffer(); String del = ""; for (Iterator<String> i = exports.keySet().iterator(); i.hasNext();) { String name = i.next(); Map<String, String> clause = exports.get(name); // We allow names to be duplicated in the input // by ending them with '~'. This is necessary to use // the package names as keys. However, we remove these // suffixes in the output so that you can set multiple // exports with different attributes. String outname = removeDuplicateMarker(name); sb.append(del); sb.append(outname); printClause(clause, allowedDirectives, sb); del = ","; } return sb.toString(); }
Map<Instruction, Map<String, String>> getMakeHeader() { if (make != null) return make; make = Processor.newMap(); String s = builder.getProperty(Builder.MAKE); Map<String, Map<String, String>> make = builder.parseHeader(s); for (Iterator<Map.Entry<String, Map<String, String>>> e = make .entrySet().iterator(); e.hasNext();) { Map.Entry<String, Map<String, String>> entry = e.next(); String pattern = Processor.removeDuplicateMarker(entry.getKey()); Instruction instr = Instruction.getPattern(pattern); this.make.put(instr, entry.getValue()); } return this.make; } }
Map<Instruction, Map<String, String>> getMakeHeader() { if (make != null) return make; make = Processor.newMap(); String s = builder.getProperty(Builder.MAKE); Map<String, Map<String, String>> make = builder.parseHeader(s); for (Iterator<Map.Entry<String, Map<String, String>>> e = make .entrySet().iterator(); e.hasNext();) { Map.Entry<String, Map<String, String>> entry = e.next(); String pattern = Processor.removeDuplicateMarker(entry.getKey()); Instruction instr = Instruction.getPattern(pattern); this.make.put(instr, entry.getValue()); } return this.make; } }
public void fillActions(Map<String, Action> all) { List<NamedAction> plugins = getPlugins(NamedAction.class); for (NamedAction a : plugins) all.put(a.getName(), a); Map<String, Map<String, String>> actions = parseHeader(getProperty("-actions", DEFAULT_ACTIONS)); for (Map.Entry<String, Map<String, String>> entry : actions.entrySet()) { String key = Processor.removeDuplicateMarker(entry.getKey()); Action action; if (entry.getValue().get("script") != null) { // TODO check for the type action = new ScriptAction(entry.getValue().get("type"), entry.getValue().get( "script")); } else { action = new ReflectAction(key); } String label = entry.getValue().get("label"); all.put(label.toLowerCase(), action); } }
public void fillActions(Map<String, Action> all) { List<NamedAction> plugins = getPlugins(NamedAction.class); for (NamedAction a : plugins) all.put(a.getName(), a); Map<String, Map<String, String>> actions = parseHeader(getProperty( "-actions", DEFAULT_ACTIONS)); for (Map.Entry<String, Map<String, String>> entry : actions.entrySet()) { String key = Processor.removeDuplicateMarker(entry.getKey()); Action action; if (entry.getValue().get("script") != null) { // TODO check for the type action = new ScriptAction(entry.getValue().get("type"), entry .getValue().get("script")); } else { action = new ReflectAction(key); } String label = entry.getValue().get("label"); all.put(label, action); } }
key = removeDuplicateMarker(key);
key = removeDuplicateMarker(key);