當前位置: 首頁>>代碼示例>>Java>>正文


Java Name.MAIN_CLASS屬性代碼示例

本文整理匯總了Java中java.util.jar.Attributes.Name.MAIN_CLASS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Name.MAIN_CLASS屬性的具體用法?Java Name.MAIN_CLASS怎麽用?Java Name.MAIN_CLASS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.util.jar.Attributes.Name的用法示例。


在下文中一共展示了Name.MAIN_CLASS屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: main

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);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:11,代碼來源:IterationOrder.java

示例2: lookupName

Name lookupName(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);
    }
}
 
開發者ID:wso2,項目名稱:wso2-commons-vfs,代碼行數:75,代碼來源:JarFileSystem.java


注:本文中的java.util.jar.Attributes.Name.MAIN_CLASS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。