2015-03-13 18:52:59 +00:00
|
|
|
/* Copyright (c) 2008-2015, Avian Contributors
|
2009-08-14 14:51:10 +00:00
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software
|
|
|
|
for any purpose with or without fee is hereby granted, provided
|
|
|
|
that the above copyright notice and this permission notice appear
|
|
|
|
in all copies.
|
|
|
|
|
|
|
|
There is NO WARRANTY for this software. See license.txt for
|
|
|
|
details. */
|
|
|
|
|
|
|
|
package java.lang;
|
|
|
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
|
|
|
public class Package {
|
|
|
|
private final String name;
|
|
|
|
private final String implementationTitle;
|
|
|
|
private final String implementationVendor;
|
|
|
|
private final String implementationVersion;
|
2013-02-04 13:09:02 +00:00
|
|
|
private final String specificationTitle;
|
|
|
|
private final String specificationVendor;
|
|
|
|
private final String specificationVersion;
|
2009-08-14 14:51:10 +00:00
|
|
|
private final URL sealed;
|
|
|
|
private final ClassLoader loader;
|
|
|
|
|
|
|
|
Package(String name,
|
2013-02-04 13:09:02 +00:00
|
|
|
String implementationTitle,
|
|
|
|
String implementationVendor,
|
|
|
|
String implementationVersion,
|
|
|
|
String specificationTitle,
|
|
|
|
String specificationVendor,
|
|
|
|
String specificationVersion,
|
|
|
|
URL sealed,
|
2009-08-14 14:51:10 +00:00
|
|
|
ClassLoader loader)
|
|
|
|
{
|
2013-02-04 13:09:02 +00:00
|
|
|
this.name = name;
|
|
|
|
this.implementationTitle = implementationTitle;
|
|
|
|
this.implementationVendor = implementationVendor;
|
2009-08-14 14:51:10 +00:00
|
|
|
this.implementationVersion = implementationVersion;
|
2013-02-04 13:09:02 +00:00
|
|
|
this.specificationTitle = specificationTitle;
|
|
|
|
this.specificationVendor = specificationVendor;
|
|
|
|
this.specificationVersion = specificationVersion;
|
|
|
|
this.sealed = sealed;
|
|
|
|
this.loader = loader;
|
2009-08-14 14:51:10 +00:00
|
|
|
}
|
2011-01-20 16:35:34 +00:00
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
return name;
|
|
|
|
}
|
2013-02-04 13:09:02 +00:00
|
|
|
|
|
|
|
public String getImplementationTitle() {
|
|
|
|
return implementationTitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getImplementationVendor() {
|
|
|
|
return implementationVendor;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getImplementationVersion() {
|
|
|
|
return implementationVersion;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSpecificationTitle() {
|
|
|
|
return specificationTitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSpecificationVendor() {
|
|
|
|
return specificationVendor;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getSpecificationVersion() {
|
|
|
|
return specificationVersion;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isSealed() {
|
|
|
|
return sealed != null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isSealed(URL url) {
|
|
|
|
return sealed.equals(url);
|
|
|
|
}
|
2009-08-14 14:51:10 +00:00
|
|
|
}
|