Refine search
String namespace = p.getKey(); Attrs capabilityAttrs = p.getValue(); String name = capabilityAttrs.get(ContractNamespace.CONTRACT_NAMESPACE); if (name == null) { analyzer.warning("No name (attr %s) defined in bundle %s from contract namespace: %s", Instruction instruction = i.getKey(); if (instruction.matches(name)) { if (instruction.isNegated()) { c.name = name; String list = capabilityAttrs.get(Namespace.CAPABILITY_USES_DIRECTIVE + ":"); if (list == null || list.length() == 0) { analyzer.warning("Contract %s has no uses: directive in %s.", name, from); analyzer.warning("%s does not declare a version, assumed 0.0.0.", c); c.decorators = new Attrs(i.getValue());
for ( Map.Entry<Object, Object> entry : attributes.entrySet() ) Object name = entry.getKey(); String value = (String) entry.getValue(); String oldValue = (String) mergedAttributes.put( name, value ); if ( oldValue != null ) String clause = clauseEntry.getKey(); Attrs attrs = clauseEntry.getValue(); Attrs mergedAttrs = mergedClauses.get( clause ); if ( mergedAttrs == null) String adname = adentry.getKey(); String ad = adentry.getValue(); if ( mergedAttrs.containsKey( adname ) ) case LONGS: case DOUBLES: ExtList<String> mergedAd = ExtList.from( mergedAttrs.get( adname ) ); ExtList.from( ad ).addAll( ExtList.from( ad ) ); mergedAttrs.put(adname, mergedAd.join() );
String namespace = p.getKey(); Attrs capabilityAttrs = p.getValue(); String name = capabilityAttrs.get(ContractNamespace.CONTRACT_NAMESPACE); if (name == null) { analyzer.warning("No name (attr %s) defined in bundle %s from contract namespace: %s", Instruction instruction = i.getKey(); if (instruction.matches(name)) { if (instruction.isNegated()) { c.name = name; String list = capabilityAttrs.get(Namespace.CAPABILITY_USES_DIRECTIVE + ":"); if (list == null || list.length() == 0) { analyzer.warning("Contract %s has no uses: directive in %s.", name, from); analyzer.warning("%s does not declare a version, assumed 0.0.0.", c); c.decorators = new Attrs(i.getValue());
private void replaceParameters(Attrs attrs) throws IllegalArgumentException { for (Entry<String, String> entry : attrs.entrySet()) { boolean modified = false; StringBuffer sb = new StringBuffer(); Matcher matcher = SIMPLE_PARAM_PATTERN.matcher(entry.getValue()); while (matcher.find()) { modified = true; String key = matcher.group(1); String substitution = attrs.get(key); if (substitution == null) { matcher.appendReplacement(sb, ""); sb.append(matcher.group(0)); } else if (SIMPLE_PARAM_PATTERN.matcher(substitution) .find()) throw new IllegalArgumentException("nested substitutions not permitted"); else matcher.appendReplacement(sb, substitution); } if (modified) { matcher.appendTail(sb); entry.setValue(sb.toString()); } } }
if (exporterAttributes != null) { for (Map.Entry<String,String> entry : exporterAttributes.entrySet()) { String key = entry.getKey(); attributes.put(key, entry.getValue()); else { if (since(About._2_4)) { "Version for package %s is set to different values in the source (%s) and in the manifest (%s). The version in the manifest is not " + "picked up by an other sibling bundles in this project or projects that directly depend on this project", packageName, attributes.get(key), exporterAttributes.get(key)); if (getPropertiesFile() != null) location.file(getPropertiesFile().getAbsolutePath());
String namespace = p.getKey(); Attrs capabilityAttrs = p.getValue(); String name = capabilityAttrs.get(ContractNamespace.CONTRACT_NAMESPACE); if (name == null) { analyzer.warning("No name (attr %s) defined in bundle %s from contract namespace: %s", Instruction instruction = i.getKey(); if (instruction.matches(name)) { if (instruction.isNegated()) { c.name = name; String list = capabilityAttrs.get(ContractNamespace.CAPABILITY_USES_DIRECTIVE + ":"); if (list == null || list.length() == 0) { analyzer.warning("Contract %s has no uses: directive in %s.", name, from); analyzer.warning("%s does not declare a version, assumed 0.0.0.", c); c.decorators = new Attrs(i.getValue());
/** * Load the effective set from the properties */ Map<String, Set<String>> loadEffectiveSet() { String effective = properties.getProperty(RUN_EFFECTIVE_INSTRUCTION); if (effective == null) return null; HashMap<String, Set<String>> effectiveSet = new HashMap<>(); for (Entry<String, Attrs> entry : new Parameters(effective, project).entrySet()) { String skip = entry.getValue() .get("skip:"); Set<String> toSkip = skip == null ? new HashSet<>() : new HashSet<>(Arrays.asList(skip.split(","))); effectiveSet.put(entry.getKey(), toSkip); } return effectiveSet; }
if (exporterAttributes != null) { for (Map.Entry<String,String> entry : exporterAttributes.entrySet()) { String key = entry.getKey(); attributes.put(key, entry.getValue()); else { if (since(About._2_4)) { "Version for package %s is set to different values in the source (%s) and in the manifest (%s). The version in the manifest is not " + "picked up by an other sibling bundles in this project or projects that directly depend on this project", packageName, attributes.get(key), exporterAttributes.get(key)); if (getPropertiesFile() != null) location.file(getPropertiesFile().getAbsolutePath());
String namespace = p.getKey(); Attrs capabilityAttrs = p.getValue(); String name = capabilityAttrs.get(ContractNamespace.CONTRACT_NAMESPACE); if (name == null) { analyzer.warning("No name (attr %s) defined in bundle %s from contract namespace: %s", Instruction instruction = i.getKey(); if (instruction.matches(name)) { if (instruction.isNegated()) { c.name = name; String list = capabilityAttrs.get(ContractNamespace.CAPABILITY_USES_DIRECTIVE + ":"); if (list == null || list.length() == 0) { analyzer.warning("Contract %s has no uses: directive in %s.", name, from); analyzer.warning("%s does not declare a version, assumed 0.0.0.", c); c.decorators = new Attrs(i.getValue());
/** * Load the effective set from the properties */ Map<String, Set<String>> loadEffectiveSet() { String effective = properties.getProperty(RUN_EFFECTIVE_INSTRUCTION); if (effective == null) return null; HashMap<String, Set<String>> effectiveSet = new HashMap<>(); for (Entry<String, Attrs> entry : new Parameters(effective, project).entrySet()) { String skip = entry.getValue() .get("skip:"); Set<String> toSkip = skip == null ? new HashSet<>() : new HashSet<>(Arrays.asList(skip.split(","))); effectiveSet.put(entry.getKey(), toSkip); } return effectiveSet; }
String key = entry.getKey(); attributes.put(key, entry.getValue()); else { if (since(About._2_4)) { "Version for package %s is set to different values in the source (%s) and in the manifest (%s). The version in the manifest is not " + "picked up by an other sibling bundles in this project or projects that directly depend on this project", packageName, attributes.get(key), exporterAttributes.get(key)); if (getPropertiesFile() != null) location.file(getPropertiesFile().getAbsolutePath());
public static Set<String> getDeclaredServices(Builder builder) { Set<String> declaredServices = new TreeSet<>(); for (Entry<String, Attrs> entry : builder.getProvideCapability() .entrySet()) { if (Processor.removeDuplicateMarker(entry.getKey()) .equals("osgi.service")) { Attrs attrs = entry.getValue(); String ifaces = attrs.get("objectClass"); if (ifaces != null) { for (String iface : ifaces.split(",")) { declaredServices.add(iface.trim()); } } } } return declaredServices; }
String key = entry.getKey(); attributes.put(key, entry.getValue()); else { if (since(About._2_4)) { "Version for package %s is set to different values in the source (%s) and in the manifest (%s). The version in the manifest is not " + "picked up by an other sibling bundles in this project or projects that directly depend on this project", packageName, attributes.get(key), exporterAttributes.get(key)); if (getPropertiesFile() != null) location.file(getPropertiesFile().getAbsolutePath());
private void replaceParameters(Attrs attrs) throws IllegalArgumentException { for (Entry<String, String> entry : attrs.entrySet()) { boolean modified = false; StringBuffer sb = new StringBuffer(); Matcher matcher = SIMPLE_PARAM_PATTERN.matcher(entry.getValue()); while (matcher.find()) { modified = true; String key = matcher.group(1); String substitution = attrs.get(key); if (substitution == null) { matcher.appendReplacement(sb, ""); sb.append(matcher.group(0)); } else if (SIMPLE_PARAM_PATTERN.matcher(substitution) .find()) throw new IllegalArgumentException("nested substitutions not permitted"); else matcher.appendReplacement(sb, substitution); } if (modified) { matcher.appendTail(sb); entry.setValue(sb.toString()); } } }
public static Set<String> getDeclaredServices(Builder builder) { Set<String> declaredServices = new TreeSet<>(); for (Entry<String, Attrs> entry : builder.getProvideCapability() .entrySet()) { if (Processor.removeDuplicateMarker(entry.getKey()) .equals("osgi.service")) { Attrs attrs = entry.getValue(); String ifaces = attrs.get("objectClass"); if (ifaces != null) { for (String iface : ifaces.split(",")) { declaredServices.add(iface.trim()); } } } } return declaredServices; }
public void fillActions(Map<String,Action> all) { List<NamedAction> plugins = getPlugins(NamedAction.class); for (NamedAction a : plugins) all.put(a.getName(), a); Parameters actions = new Parameters(getProperty("-actions", DEFAULT_ACTIONS)); for (Entry<String,Attrs> 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); } }