Package objects contain version information about a Java package.
Get package for a name
Return | Method | Summary |
---|---|---|
static Package | getPackage(String name) | Find a package by name in the callers ClassLoader instance. |
Get all packages
Return | Method | Summary |
---|---|---|
static Package[] | getPackages() | Get all the packages currently known for the caller's ClassLoader instance. |
Get the annotations
Return | Method | Summary |
---|---|---|
<A extends Annotation>A | getAnnotation(Class<A> annotationClass) | Returns this element's annotation for the specified type if such an annotation is present, else null. |
Annotation[] | getAnnotations() | Returns all annotations present on this element. |
Annotation[] | getDeclaredAnnotations() | Returns all annotations that are directly present on this element. |
Get implementation title, vendor and version
Return | Method | Summary |
---|---|---|
String | getImplementationTitle() | Return the title of this package. |
String | getImplementationVendor() | Returns the name of the organization, vendor or company that provided this implementation. |
String | getImplementationVersion() | Return the version of this implementation. |
Get the package name
Return | Method | Summary |
---|---|---|
String | getName() | Return the name of this package. |
Get the specification title, vendor and version
Return | Method | Summary |
---|---|---|
String | getSpecificationTitle() | Return the title of the specification. |
String | getSpecificationVendor() | Return the name of the organization, vendor. |
String | getSpecificationVersion() | Returns the version number. |
Is Annotation present
Return | Method | Summary |
---|---|---|
boolean | isAnnotationPresent(Class<? extends Annotation> annotationClass) | Returns true if an annotation for the specified type is present on this element, else false. |
Is this Package compatible with passed in package
Return | Method | Summary |
---|---|---|
boolean | isCompatibleWith(String desired) | Compare this package's specification version with a desired version. |
Is this Package sealed
Return | Method | Summary |
---|---|---|
boolean | isSealed() | Returns true if this package is sealed. |
boolean | isSealed(URL url) | Returns true if this package is sealed with respect to the specified code source url. |
Get the string representation of the Package
Return | Method | Summary |
---|---|---|
String | toString() | Returns the string representation of this Package. |
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |