java.util.jar
Class Attributes.Name
- Attributes
Represents a name of a Manifest Attribute. Defines a couple of well
know names for the general main attributes, stand alone application
attributes, applet attributes, extension identification attributes,
package versioning and sealing attributes, file contents attributes,
bean objects attribute and signing attributes. See the
The characters of a Name must obey the following restrictions:
- Must contain at least one character
- The first character must be alphanumeric (a-z, A-Z, 0-9)
- All other characters must be alphanumeric, a '-' or a '_'
When comparing Names (with
equals
) all characters are
converted to lowercase. But you can get the original case sensitive
string with the
toString()
method.
Most important attributes have a constant defined in this
class. Some other attributes used in Manifest files are:
- "Created-By" - General main attribute, tool and version
that created this Manifest file.
- "Java-Bean" - Bean objects attribute, whether the entry is a Bean.
Value is either "true" or "false".
- "Magic" - Signing attribute, application specific signing attribute.
Must be understood by the manifest parser when present to validate the
jar (entry).
Name(String name) - Creates a new Name from the given String.
|
boolean | equals(Object o) - Checks if another object is equal to this Name object.
|
int | hashCode() - Returns the hash code of the (lowercase) String representation of
this Name.
|
String | toString() - Returns the string representation of this Name as given to the
constructor (not neccesarily the lower case representation).
|
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
CLASS_PATH
public static final Attributes.Name CLASS_PATH
General main attribute -
(relative) file paths of the libraries/classpaths that the Classes in
this jar file depend on. Paths are separated by spaces.
EXTENSION_LIST
public static final Attributes.Name EXTENSION_LIST
Applet attribute -
a list of extension libraries that the applet in this
jar file depends on.
For every named extension there should be some Attributes in the
Manifest manifest file with the following Names:
- <extension>-Extension-Name:
unique name of the extension
- <extension>-Specification-Version:
minimum specification version
- <extension>-Implementation-Version:
minimum implementation version
- <extension>-Implementation-Vendor-Id:
unique id of implementation vendor
- <extension>-Implementation-URL:
where the latest version of the extension library can be found
EXTENSION_NAME
public static final Attributes.Name EXTENSION_NAME
Extension identification attribute -
the name if the extension library contained in the jar.
MAIN_CLASS
public static final Attributes.Name MAIN_CLASS
Stand alone application attribute -
the entry (without the .class ending) that is the main
class of this jar file.
SEALED
public static final Attributes.Name SEALED
Package sealing -
whether (all) package(s) is(/are) sealed. Value is either "true"
or "false".
equals
public boolean equals(Object o)
Checks if another object is equal to this Name object.
Another object is equal to this Name object if it is an instance of
Name and the (lowercase) string representation of the name is equal.
- equals in interface Object
hashCode
public int hashCode()
Returns the hash code of the (lowercase) String representation of
this Name.
- hashCode in interface Object
toString
public String toString()
Returns the string representation of this Name as given to the
constructor (not neccesarily the lower case representation).
- toString in interface Object
Attributes.java -- Represents attribute name/value pairs from a Manifest
Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.