Get the specification title, vendor and version
String getSpecificationTitle()
- Return the title of the specification.
String getSpecificationVendor()
- Return the name of the organization, vendor.
String getSpecificationVersion()
- Returns the version number.
public class Main {
public static void main(String[] args) {
Package p = Package.getPackage("javax.swing");
System.out.println(p.getSpecificationTitle());
System.out.println(p.getSpecificationVendor());
System.out.println(p.getSpecificationVersion());
}
}
The output:
Java Platform API Specification
Sun Microsystems, Inc.
1.6
Home
Java Book
Reflection
Java Book
Reflection
Package:
- Package Reflection
- Get package for a name
- Get all packages
- Get the annotations
- Get implementation title, vendor and version
- Get the package name
- Get the specification title, vendor and version
- Get the string representation of the Package