Java Code Examples for java.util.jar.Attributes.Name#MANIFEST_VERSION

The following examples show how to use java.util.jar.Attributes.Name#MANIFEST_VERSION . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IterationOrder.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    Attributes.Name k0 = Name.MANIFEST_VERSION;
    Attributes.Name k1 = Name.MAIN_CLASS;
    Attributes.Name k2 = Name.SEALED;
    String v0 = "42.0";
    String v1 = "com.google.Hello";
    String v2 = "yes";
    checkOrder(k0, v0, k1, v1, k2, v2);
    checkOrder(k1, v1, k0, v0, k2, v2);
    checkOrder(k2, v2, k1, v1, k0, v0);
}
 
Example 2
Source File: JarFileSystem.java    From commons-vfs with Apache License 2.0 5 votes vote down vote up
Name lookupName(final String attrName) {
    if (Name.CLASS_PATH.toString().equals(attrName)) {
        return Name.CLASS_PATH;
    } else if (Name.CONTENT_TYPE.toString().equals(attrName)) {
        return Name.CONTENT_TYPE;
    } else if (Name.EXTENSION_INSTALLATION.toString().equals(attrName)) {
        return Name.EXTENSION_INSTALLATION;
    } else if (Name.EXTENSION_LIST.toString().equals(attrName)) {
        return Name.EXTENSION_LIST;
    } else if (Name.EXTENSION_NAME.toString().equals(attrName)) {
        return Name.EXTENSION_NAME;
    } else if (Name.IMPLEMENTATION_TITLE.toString().equals(attrName)) {
        return Name.IMPLEMENTATION_TITLE;
    } else if (Name.IMPLEMENTATION_URL.toString().equals(attrName)) {
        return Name.IMPLEMENTATION_URL;
    } else if (Name.IMPLEMENTATION_VENDOR.toString().equals(attrName)) {
        return Name.IMPLEMENTATION_VENDOR;
    } else if (Name.IMPLEMENTATION_VENDOR_ID.toString().equals(attrName)) {
        return Name.IMPLEMENTATION_VENDOR_ID;
    } else if (Name.IMPLEMENTATION_VERSION.toString().equals(attrName)) {
        return Name.IMPLEMENTATION_VENDOR;
    } else if (Name.MAIN_CLASS.toString().equals(attrName)) {
        return Name.MAIN_CLASS;
    } else if (Name.MANIFEST_VERSION.toString().equals(attrName)) {
        return Name.MANIFEST_VERSION;
    } else if (Name.SEALED.toString().equals(attrName)) {
        return Name.SEALED;
    } else if (Name.SIGNATURE_VERSION.toString().equals(attrName)) {
        return Name.SIGNATURE_VERSION;
    } else if (Name.SPECIFICATION_TITLE.toString().equals(attrName)) {
        return Name.SPECIFICATION_TITLE;
    } else if (Name.SPECIFICATION_VENDOR.toString().equals(attrName)) {
        return Name.SPECIFICATION_VENDOR;
    } else if (Name.SPECIFICATION_VERSION.toString().equals(attrName)) {
        return Name.SPECIFICATION_VERSION;
    } else {
        return new Name(attrName);
    }
}