本文整理匯總了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);
}
示例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);
}
}