|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.rice.cs.cunit.subAnnot.AAnnotatedElementEx edu.rice.cs.cunit.subAnnot.PackageEx
public class PackageEx
Extended Package class to support annotations with subclassing.
Field Summary | |
---|---|
java.lang.Package |
java
The java.lang.reflect.Package object that represents the package. |
Fields inherited from class edu.rice.cs.cunit.subAnnot.AAnnotatedElementEx |
---|
_ai, _classFileNotFound, _classLoader, _classPath |
Constructor Summary | |
---|---|
PackageEx(java.lang.Package p)
Create an extended Package instance for the specified package. |
|
PackageEx(java.lang.Package p,
java.lang.ClassLoader c)
Create an extended Package instance for the specified package. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this Constructor against the specified object. |
protected java.lang.reflect.AnnotatedElement |
getAnnotatedElement()
Return the annotated element. |
java.lang.String |
getImplementationTitle()
Return the title of this package. |
java.lang.String |
getImplementationVendor()
Returns the name of the organization, vendor or company that provided this implementation. |
java.lang.String |
getImplementationVersion()
Return the version of this implementation. |
java.lang.String |
getName()
Return the name of this package. |
static PackageEx |
getPackage(java.lang.String s)
Return an extended Package instance for the class with the specified package name. |
static PackageEx[] |
getPackages()
Return an array of all extended Package instances known to the caller's ClassLoader instance. |
java.lang.String |
getSpecificationTitle()
Return the title of the specification that this package implements. |
java.lang.String |
getSpecificationVendor()
Return the name of the organization, vendor, or company that owns and maintains the specification of the classes that implement this package. |
java.lang.String |
getSpecificationVersion()
Returns the version number of the specification that this package implements. |
int |
hashCode()
Return the hash code computed from the package name. |
boolean |
isCompatibleWith(java.lang.String desired)
Compare this package's specification version with a desired version. |
boolean |
isSealed()
Returns true if this package is sealed. |
boolean |
isSealed(java.net.URL url)
Returns true if this package is sealed with respect to the specified code source url. |
java.lang.String |
toString()
Returns the string representation of this Package. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.lang.Package java
Constructor Detail |
---|
public PackageEx(java.lang.Package p)
p
- packagepublic PackageEx(java.lang.Package p, java.lang.ClassLoader c)
p
- packagec
- class loaderMethod Detail |
---|
public static PackageEx getPackage(java.lang.String s)
s
- package name
public static PackageEx[] getPackages()
protected java.lang.reflect.AnnotatedElement getAnnotatedElement()
getAnnotatedElement
in class AAnnotatedElementEx
public java.lang.String getName()
public java.lang.String getSpecificationTitle()
public java.lang.String getSpecificationVersion()
public java.lang.String getSpecificationVendor()
public java.lang.String getImplementationTitle()
public java.lang.String getImplementationVersion()
public java.lang.String getImplementationVendor()
public boolean isSealed()
public boolean isSealed(java.net.URL url)
url
- the code source url
public boolean isCompatibleWith(java.lang.String desired) throws java.lang.NumberFormatException
Version numbers are compared by sequentially comparing corresponding components of the desired and specification strings. Each component is converted as a decimal integer and the values compared. If the specification value is greater than the desired value true is returned. If the value is less false is returned. If the values are equal the period is skipped and the next pair of components is compared.
desired
- the version string of the desired version.
java.lang.NumberFormatException
- if the desired or current version is not of the correct dotted form.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
Constructor
against the specified object. Returns true if the objects are the same. Two
Constructor
objects are the same if they were declared by the same class and have the same formal
parameter types.
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |