Java by API/java.lang/Package — различия между версиями

Материал из Java эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 14:40, 31 мая 2010

Package: getImplementationTitle()

 
/*
 * Output: 
java.lang Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.net Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.misc Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset.spi Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.concurrent.atomic Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.ref Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio.cs Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.zip Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.annotation Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.file Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.management Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security.cert Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.action Java Runtime Environment Sun Microsystems, Inc. 1.5.0
 *  
 */
public class MainClass {
  public static void main(String args[]) {
    Package pkgs[];
    pkgs = Package.getPackages();
    for(int i=0; i < pkgs.length; i++)
      System.out.println(
             pkgs[i].getName() + " " +
             pkgs[i].getImplementationTitle() + " " +
             pkgs[i].getImplementationVendor() + " " +
             pkgs[i].getImplementationVersion()
      );
  }
}





Package: getImplementationVendor()

 
/*
 * Output: 
java.lang Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.net Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.misc Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset.spi Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.concurrent.atomic Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.ref Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio.cs Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.zip Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.annotation Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.file Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.management Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security.cert Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.action Java Runtime Environment Sun Microsystems, Inc. 1.5.0
 *  
 */
public class MainClass {
  public static void main(String args[]) {
    Package pkgs[];
    pkgs = Package.getPackages();
    for(int i=0; i < pkgs.length; i++)
      System.out.println(
             pkgs[i].getName() + " " +
             pkgs[i].getImplementationTitle() + " " +
             pkgs[i].getImplementationVendor() + " " +
             pkgs[i].getImplementationVersion()
      );
  }
}





Package: getImplementationVersion()

 
/*
 * Output: 
java.lang Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.net Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.misc Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset.spi Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.concurrent.atomic Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.ref Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio.cs Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.zip Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.annotation Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.file Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.management Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security.cert Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.action Java Runtime Environment Sun Microsystems, Inc. 1.5.0
 *  
 */
public class MainClass {
  public static void main(String args[]) {
    Package pkgs[];
    pkgs = Package.getPackages();
    for(int i=0; i < pkgs.length; i++)
      System.out.println(
             pkgs[i].getName() + " " +
             pkgs[i].getImplementationTitle() + " " +
             pkgs[i].getImplementationVendor() + " " +
             pkgs[i].getImplementationVersion()
      );
  }
}





Package: getName()

 
/*
 * Output: 
java.lang Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.net Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.misc Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset.spi Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.concurrent.atomic Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.ref Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio.cs Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.zip Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.annotation Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.file Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.management Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security.cert Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.action Java Runtime Environment Sun Microsystems, Inc. 1.5.0
 *  
 */
public class MainClass {
  public static void main(String args[]) {
    Package pkgs[];
    pkgs = Package.getPackages();
    for(int i=0; i < pkgs.length; i++)
      System.out.println(
             pkgs[i].getName() + " " +
             pkgs[i].getImplementationTitle() + " " +
             pkgs[i].getImplementationVendor() + " " +
             pkgs[i].getImplementationVersion()
      );
  }
}





Package: getPackages()

 
/*
 * Output: 
java.lang Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.net Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.misc Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio.charset.spi Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.concurrent.atomic Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.ref Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio.cs Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.zip Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.annotation Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.util.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.file Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.management Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.util Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.lang.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.reflect Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.io Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.security.cert Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.net.www.protocol.jar Java Runtime Environment Sun Microsystems, Inc. 1.5.0
java.nio Java Runtime Environment Sun Microsystems, Inc. 1.5.0
sun.security.action Java Runtime Environment Sun Microsystems, Inc. 1.5.0
 *  
 */
public class MainClass {
  public static void main(String args[]) {
    Package pkgs[];
    pkgs = Package.getPackages();
    for(int i=0; i < pkgs.length; i++)
      System.out.println(
             pkgs[i].getName() + " " +
             pkgs[i].getImplementationTitle() + " " +
             pkgs[i].getImplementationVendor() + " " +
             pkgs[i].getImplementationVersion()
      );
  }
}





Package: getPackage(String name)

 
/*
 * Output:
 
 */

public class MainClass {
  public static void main(String[] args) {
    Package p = Package.getPackage("javax.swing");
    System.out.print("Swing Version: ");
    System.out.println(p.getSpecificationVersion());
    p = Package.getPackage("java.awt");
    System.out.print("AWT Version: ");
    System.out.println(p.getSpecificationVersion());
  }
}





Package: getSpecificationTitle()

 
class PackageInfo {
  public static void main(String[] args) {
    Package p = Package.getPackage("java.lang");
    System.out.println("Name = " + p.getName());
    System.out.println("Implementation title = " + p.getImplementationTitle());
    System.out.println("Implementation vendor = " + p.getImplementationVendor());
    System.out.println("Implementation version = " + p.getImplementationVersion());
    System.out.println("Specification title = " + p.getSpecificationTitle());
    System.out.println("Specification vendor = " + p.getSpecificationVendor());
    System.out.println("Specification version = " + p.getSpecificationVersion());
  }
}





Package: getSpecificationVendor()

 
class PackageInfo {
  public static void main(String[] args) {
    Package p = Package.getPackage("java.lang");
    System.out.println("Name = " + p.getName());
    System.out.println("Implementation title = " + p.getImplementationTitle());
    System.out.println("Implementation vendor = " + p.getImplementationVendor());
    System.out.println("Implementation version = " + p.getImplementationVersion());
    System.out.println("Specification title = " + p.getSpecificationTitle());
    System.out.println("Specification vendor = " + p.getSpecificationVendor());
    System.out.println("Specification version = " + p.getSpecificationVersion());
  }
}





Package: getSpecificationVersion()

 
/*
 * Output:
 
 */

public class MainClass {
  public static void main(String[] args) {
    Package p = Package.getPackage("javax.swing");
    System.out.print("Swing Version: ");
    System.out.println(p.getSpecificationVersion());
    p = Package.getPackage("java.awt");
    System.out.print("AWT Version: ");
    System.out.println(p.getSpecificationVersion());
  }
}