Java Jar Manifest getAttribute(final Manifest manifest, final String name, final String defValue)

Here you can find the source of getAttribute(final Manifest manifest, final String name, final String defValue)

Description

get Attribute

License

Open Source License

Declaration

public static String getAttribute(final Manifest manifest, final String name, final String defValue) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.jar.Manifest;

public class Main {
    public static String getAttribute(final Manifest manifest, final String name, final String defValue) {
        if (manifest == null) {
            return defValue;
        }/*from  w  w w  .  j a  v a 2s.c  om*/

        return manifest.getMainAttributes().getValue(name) != null ? manifest.getMainAttributes().getValue(name)
                : defValue;
    }
}

Related

  1. createManifest(Map customFields)
  2. createManifest(String manifestVerion, String mainClass, String jarInternalClasspath)
  3. createTestManifest(Attributes.Name name, String value)
  4. formatDisplay(String src, Manifest manifest)
  5. generateEmptyManifest()
  6. getAttribute(String attributeName, Manifest manifest)
  7. getBundleClassPath(Manifest manifest)
  8. getBundleVersion(Manifest manifest)
  9. getHeader(String name, Manifest manifest)