< prev index next >
src/java.base/share/classes/sun/misc/ExtensionInfo.java
Print this page
*** 43,67 ****
*/
@Deprecated
public class ExtensionInfo {
/**
- * <p>
* public static values returned by the isCompatible method
- * </p>
*/
public static final int COMPATIBLE = 0;
public static final int REQUIRE_SPECIFICATION_UPGRADE = 1;
public static final int REQUIRE_IMPLEMENTATION_UPGRADE = 2;
public static final int REQUIRE_VENDOR_SWITCH = 3;
public static final int INCOMPATIBLE = 4;
/**
- * <p>
* attributes fully describer an extension. The underlying described
* extension may be installed and requested.
- * <p>
*/
public String title;
public String name;
public String specVersion;
public String specVendor;
--- 43,63 ----
*** 74,101 ****
private static final ResourceBundle rb =
ResourceBundle.getBundle("sun.misc.resources.Messages");
/**
- * <p>
* Create a new uninitialized extension information object
- * </p>
*/
public ExtensionInfo() {
}
/**
- * <p>
* Create and initialize an extension information object.
* The initialization uses the attributes passed as being
* the content of a manifest file to load the extension
* information from.
* Since manifest file may contain information on several
* extension they may depend on, the extension key parameter
* is prepanded to the attribute name to make the key used
* to retrieve the attribute from the manifest file
! * <p>
* @param extensionKey unique extension key in the manifest
* @param attr Attributes of a manifest file
*/
public ExtensionInfo(String extensionKey, Attributes attr)
throws NullPointerException
--- 70,94 ----
private static final ResourceBundle rb =
ResourceBundle.getBundle("sun.misc.resources.Messages");
/**
* Create a new uninitialized extension information object
*/
public ExtensionInfo() {
}
/**
* Create and initialize an extension information object.
* The initialization uses the attributes passed as being
* the content of a manifest file to load the extension
* information from.
* Since manifest file may contain information on several
* extension they may depend on, the extension key parameter
* is prepanded to the attribute name to make the key used
* to retrieve the attribute from the manifest file
! *
* @param extensionKey unique extension key in the manifest
* @param attr Attributes of a manifest file
*/
public ExtensionInfo(String extensionKey, Attributes attr)
throws NullPointerException
*** 147,163 ****
if (url != null)
url = url.trim();
}
/**
- * <p>
* @return true if the extension described by this extension information
* is compatible with the extension described by the extension
* information passed as a parameter
- * </p>
*
! * @param the requested extension information to compare to
*/
public int isCompatibleWith(ExtensionInfo ei) {
if (name == null || ei.name == null)
return INCOMPATIBLE;
--- 140,154 ----
if (url != null)
url = url.trim();
}
/**
* @return true if the extension described by this extension information
* is compatible with the extension described by the extension
* information passed as a parameter
*
! * @param ei the requested extension information to compare to
*/
public int isCompatibleWith(ExtensionInfo ei) {
if (name == null || ei.name == null)
return INCOMPATIBLE;
*** 202,233 ****
}
return INCOMPATIBLE;
}
/**
- * <p>
* helper method to print sensible information on the undelying described
* extension
- * </p>
*/
public String toString() {
return "Extension : title(" + title + "), name(" + name + "), spec vendor(" +
specVendor + "), spec version(" + specVersion + "), impl vendor(" +
vendor + "), impl vendor id(" + vendorId + "), impl version(" +
implementationVersion + "), impl url(" + url + ")";
}
/*
- * <p>
* helper method to compare two versions.
* version are in the x.y.z.t pattern.
! * </p>
* @param source version to compare to
* @param target version used to compare against
! * @return < 0 if source < version
* > 0 if source > version
! * = 0 if source = version
*/
private int compareExtensionVersion(String source, String target)
throws NumberFormatException
{
source = source.toLowerCase();
--- 193,222 ----
}
return INCOMPATIBLE;
}
/**
* helper method to print sensible information on the undelying described
* extension
*/
public String toString() {
return "Extension : title(" + title + "), name(" + name + "), spec vendor(" +
specVendor + "), spec version(" + specVersion + "), impl vendor(" +
vendor + "), impl vendor id(" + vendorId + "), impl version(" +
implementationVersion + "), impl url(" + url + ")";
}
/*
* helper method to compare two versions.
* version are in the x.y.z.t pattern.
! *
* @param source version to compare to
* @param target version used to compare against
! * @return <pre>{@code
! * < 0 if source < version
* > 0 if source > version
! * = 0 if source = version}</pre>
*/
private int compareExtensionVersion(String source, String target)
throws NumberFormatException
{
source = source.toLowerCase();
*** 236,254 ****
return strictCompareExtensionVersion(source, target);
}
/*
- * <p>
* helper method to compare two versions.
* version are in the x.y.z.t pattern.
! * </p>
* @param source version to compare to
* @param target version used to compare against
! * @return < 0 if source < version
* > 0 if source > version
! * = 0 if source = version
*/
private int strictCompareExtensionVersion(String source, String target)
throws NumberFormatException
{
if (source.equals(target))
--- 225,243 ----
return strictCompareExtensionVersion(source, target);
}
/*
* helper method to compare two versions.
* version are in the x.y.z.t pattern.
! *
* @param source version to compare to
* @param target version used to compare against
! * @return <pre>{@code
! * < 0 if source < version
* > 0 if source > version
! * = 0 if source = version}</pre>
*/
private int strictCompareExtensionVersion(String source, String target)
throws NumberFormatException
{
if (source.equals(target))
< prev index next >