/*
 * %W% %E%
 *
 * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package java.lang;

import java.lang.annotation.Annotation;
import java.net.URL;

public class Package implements java.lang.reflect.AnnotatedElement {

    private final String pkgName;
    private final String specTitle;
    private final String specVersion;
    private final String specVendor;
    private final String implTitle;
    private final String implVersion;
    private final String implVendor;
    public String getName() {
        return pkgName;
    }

    public String getSpecificationTitle() {
        return specTitle;
    }

    public String getSpecificationVersion() {
        return specVersion;
    }

    public String getSpecificationVendor() {
        return specVendor;
    }

    public String getImplementationTitle() {
        return implTitle;
    }

    public String getImplementationVersion() {
        return implVersion;
    }

    public String getImplementationVendor() {
        return implVendor;
    }

    public static Package getPackage(String name) {
        return null;
    }

    public static Package[] getPackages() {
        return null;
    }

    public int hashCode(){
        return pkgName.hashCode();
    }

    public String toString() {
        return "package " + pkgName;
    }

    Package(String name,
        String spectitle, String specversion, String specvendor,
        String impltitle, String implversion, String implvendor,
        URL sealbase, ClassLoader loader)
    {
        pkgName = name;
        implTitle = impltitle;
        implVersion = implversion;
        implVendor = implvendor;
        specTitle = spectitle;
        specVersion = specversion;
        specVendor = specvendor;
    }

    public boolean isAnnotationPresent(java.lang.Class<? extends Annotation> annotationType) {
        // TODO Auto-generated method stub
        return false;
    }

    public <T extends Annotation> T getAnnotation(java.lang.Class<T> annotationType) {
        // TODO Auto-generated method stub
        return null;
    }

    public Annotation[] getAnnotations() {
        // TODO Auto-generated method stub
        return null;
    }

    public Annotation[] getDeclaredAnnotations() {
        // TODO Auto-generated method stub
        return null;
    }
}

@@ -1206,33 +1206,561 @@
 tic 
-Package%5B%5D getPackages() %7B
+void package2Array (Package pkgs, Package%5B%5D arrayPkg) %7B%0A        /**%0A         * @j2sNative%0A         * for(var n in pkgs) %7B%0A         *     if(pkgs%5Bn%5D.__PKG_NAME__) %7B%0A         *         arrayPkg.push(pkgs%5Bn%5D);%0A         *         this.package2Array(pkgs%5Bn%5D, arrayPkg);%0A         *     %7D%0A         * %7D%0A         **/%7B%7D%0A        %0A    %7D%0A%0A    public static Package%5B%5D getPackages() %7B%0A        /**%0A         * @j2sNative%0A         * var pkgs=%5B%5D;%0A         * var allPkg = Clazz.allPackage;%0A         * this.package2Array(allPkg, pkgs);%0A         * return pkgs;%0A         **/%7B%7D
 %0A   

fix part of bug 1273 case test_getPackages in PackageTest will failed.