final Iterator<Object> it = at.keySet().iterator(); while (it.hasNext()) { String attrName = ((Attributes.Name) it.next()).toString();
Iterator<?> entries = manifest.mainAttributes.keySet().iterator(); while (entries.hasNext()) { Attributes.Name name = (Attributes.Name) entries.next(); writeEntry(out, Attributes.Name.NAME, key, encoder, buffer); Attributes attributes = manifest.entries.get(key); Iterator<?> entries = attributes.keySet().iterator(); while (entries.hasNext()) { Attributes.Name name = (Attributes.Name) entries.next();
protected Enumeration<String> attributes(String name) { Attributes attr1 = getManifest().getAttributes(name); if (attr1 != null) { class ToString implements org.openide.util.Enumerations.Processor<Object, String> { public String process(Object obj, Collection<Object> ignore) { return obj.toString(); } } return org.openide.util.Enumerations.convert(Collections.enumeration(attr1.keySet()), new ToString()); } else { return org.openide.util.Enumerations.empty(); } }
private static Collection<String> getKeys( Attributes attributes ) { Collection<String> result = new ArrayList<String>(); for ( Object objectObjectEntry : attributes.keySet() ) { result.add( objectObjectEntry.toString() ); } return result; }
/** * Merge in another section * * @param target The target manifest of the merge * @param section the section to be merged with this one. */ public static void mergeAttributes( java.util.jar.Attributes target, java.util.jar.Attributes section ) { for ( Object o : section.keySet() ) { java.util.jar.Attributes.Name key = (Attributes.Name) o; final Object value = section.get( o ); // the merge file always wins target.put( key, value ); } }
for(Object attrkey: entry.getValue().keySet()) { if (attrkey instanceof Attributes.Name && ((Attributes.Name)attrkey).toString().indexOf("-Digest") != -1)
Manifest manifest = new Manifest(url.openStream()); Attributes mainAttributes = manifest.getMainAttributes(); for (Object key : mainAttributes.keySet()) { if (key.toString().equals("Real-Main-Class")) { realMainClass = mainAttributes.get(key).toString();
protected Set<Name> getNames(Attributes attributes) { Set<Name> result = new LinkedHashSet<>(); for (Object key : attributes.keySet()) { Name name = (Name) key; if (!IGNORED_KEYS.contains(name)) { result.add(name); } } return result; } }
public static Dictionary<String, String> getManifestHeaders(Manifest manifest) { Hashtable<String, String> headers = new Hashtable<String, String>(); Attributes mainatts = manifest.getMainAttributes(); for (Object key : mainatts.keySet()) { String name = key.toString(); String value = mainatts.getValue(name); headers.put(name, value); } return headers; } }
private void filterManifestEntryAttributes(final Attributes attrs) { for (final Iterator<Object> i = attrs.keySet().iterator(); i.hasNext();) { if (String.valueOf(i.next()).endsWith(DIGEST_SUFFIX)) { i.remove(); } } }
static Attributes mergeAttributes(Attributes source, Attributes target) { for (Object key : source.keySet()) { target.put(key, source.get(key)); } return target; } }
private Map<String, String> getEntries(Attributes attrs) { Map<String, String> entries = new HashMap<String, String>(); if ((attrs != null) && (!attrs.isEmpty())) { Set<Object> keys = attrs.keySet(); for (Object key : keys) { entries.put(key.toString(), attrs.getValue((Attributes.Name)key)); } } return entries; }
private static boolean hasSignature(Attributes attrs) { for(Object k : attrs.keySet()) { if (((Attributes.Name)k).toString().endsWith("-Digest")) { return true; } } return false; } }
static Attributes mergeAttributes(Attributes source, Attributes target) { for (Object key : source.keySet()) { target.put(key, source.get(key)); } return target; } }
private void verifyHeaders(Attributes main) { for (Object element : main.keySet()) { Attributes.Name header = (Attributes.Name) element; String h = header.toString(); if (!HEADER_PATTERN.matcher(h).matches()) error("Invalid Manifest header: " + h + ", pattern=" + HEADER_PATTERN); } }
protected JogampVersion(final String packageName, final Manifest mf) { this.packageName = packageName; this.mf = ( null != mf ) ? mf : new Manifest(); this.hash = this.mf.hashCode(); mainAttributes = this.mf.getMainAttributes(); mainAttributeNames = mainAttributes.keySet(); androidPackageVersionName = AndroidUtils.getPackageInfoVersionName(packageName); // null if !Android }
private void verifyHeaders(Attributes main) { for (Object element : main.keySet()) { Attributes.Name header = (Attributes.Name) element; String h = header.toString(); if (!HEADER_PATTERN.matcher(h).matches()) error("Invalid Manifest header: " + h + ", pattern=" + HEADER_PATTERN); } }
private void merge(Attributes target, Attributes source) { for (Object o : source.keySet()) { if (target.containsKey(o)) { String sep = mappings.containsKey(o.toString())?mappings.get(o.toString()):","; String newValue = target.get(o) + sep + source.get(o); target.put(o, newValue); } else { target.put(o, source.get(o)); } } }
private void merge(Attributes target, Attributes source) { for (Object o : source.keySet()) { if (target.containsKey(o)) { String sep = mappings.containsKey(o.toString())?mappings.get(o.toString()):","; String newValue = target.get(o) + sep + source.get(o); target.put(o, newValue); } else { target.put(o, source.get(o)); } } }