/** * Parse packages * * @param header the header * @param list the list of packages to create */ public static void parsePackages(String header, List<PackageAttribute> list) { parse(header, list, true, false); }
protected void parseAttribute(String attribute, List<ParameterizedAttribute> list, boolean trace) { ManifestParser.parseParameters(attribute, list); } }
List<String> clauses = parseDelimitedString(header, ","); List<String> pieces = parseDelimitedString(clause, ";"); if (piece.indexOf('=') >= 0) break; paths.add(unquote(piece)); if (directives == null) directives = new HashMap<String, Parameter>(); String unquoted = unquote(name); if (directives.containsKey(unquoted)) throw new IllegalStateException("Dupicate directive: " + unquoted); directives.put(unquoted, new AbstractParameter(unquote(value))); } else { seperator = piece.indexOf("="); if (attributes == null) attributes = new HashMap<String, Parameter>(); String unquoted = unquote(name); Parameter attribute = attributes.get(unquoted); if (attribute != null) { attributes.put(unquoted, attribute); attribute.addValue(unquote(value)); } else { throw new IllegalArgumentException("Path " + piece + " should appear before attributes and directives in " + clause);
public List<PackageAttribute> useString(String attibute) { List<PackageAttribute> list = new ArrayList<PackageAttribute>(); ManifestParser.parsePackages(attibute, list); return list; } }
/** * Parse paths * * @param header the header * @param list the list of paths to create */ public static void parsePaths(String header, List<ParameterizedAttribute> list) { parse(header, list, false, false); }
/** * Parse parameters * * @param header the header * @param list the list of parameters to create */ public static void parseParameters(String header, List<ParameterizedAttribute> list) { parse(header, list, false, false); }
@Override protected void parseAttribute(String attribute, List<ParameterizedAttribute> list, boolean trace) { ManifestParser.parse(attribute, list, false, true); } }