6572945: javah should be written as an annotation processor, not a doclet

Wed, 23 Sep 2009 19:15:04 -0700

author
jjg
date
Wed, 23 Sep 2009 19:15:04 -0700
changeset 416
c287d51c57da
parent 415
49359d0e6a9c
child 417
d0f541480556

6572945: javah should be written as an annotation processor, not a doclet
Reviewed-by: darcy

make/build.xml file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/Gen.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/InternalError.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/JNI.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/JavahFileManager.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/JavahTask.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/JavahTool.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/LLNI.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/Main.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/MainDoclet.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/Mangle.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/NativeHeaderTool.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/TypeSignature.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/Util.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/resources/Linux_ppc.properties file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/resources/Linux_sparc.properties file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/resources/SunOS_sparc.properties file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/resources/SunOS_sparcv9.properties file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/resources/l10n.properties file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javah/resources/win32_x86.properties file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javap/DisassemblerTool.java file | annotate | diff | comparison | revisions
test/tools/javah/6572945/T6572945.java file | annotate | diff | comparison | revisions
test/tools/javah/6572945/TestClass1.java file | annotate | diff | comparison | revisions
test/tools/javah/6572945/TestClass2.java file | annotate | diff | comparison | revisions
test/tools/javah/6572945/TestClass3.java file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.dir.1/TestClass1.h file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.dir.1/TestClass1_Inner1.h file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.dir.1/TestClass1_Inner2.h file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.dir.1/TestClass2.h file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.file.1 file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.file.2 file | annotate | diff | comparison | revisions
test/tools/javah/6572945/gold/jni.file.3 file | annotate | diff | comparison | revisions
test/tools/javah/MissingParamClassTest.sh file | annotate | diff | comparison | revisions
test/tools/javah/compareTest/CompareTest.java file | annotate | diff | comparison | revisions
test/tools/javah/compareTest/CompareTest.sh file | annotate | diff | comparison | revisions
test/tools/javah/compareTest/FindNativeFiles.java file | annotate | diff | comparison | revisions
test/tools/javah/compareTest/README file | annotate | diff | comparison | revisions
     1.1 --- a/make/build.xml	Wed Sep 23 18:48:13 2009 -0700
     1.2 +++ b/make/build.xml	Wed Sep 23 19:15:04 2009 -0700
     1.3 @@ -286,10 +286,10 @@
     1.4                                jarclasspath="javadoc.jar doclets.jar javac.jar"/>
     1.5      </target>
     1.6  
     1.7 -    <target name="build-javah" depends="build-javadoc">
     1.8 +    <target name="build-javah" depends="build-javac">
     1.9          <build-tool name="javah"
    1.10                      includes="${javah.includes}"
    1.11 -                    jarclasspath="javadoc.jar doclets.jar javac.jar"/>
    1.12 +                    jarclasspath="javac.jar"/>
    1.13      </target>
    1.14  
    1.15      <target name="build-classes-javah" depends="build-classes-javadoc">
     2.1 --- a/src/share/classes/com/sun/tools/javah/Gen.java	Wed Sep 23 18:48:13 2009 -0700
     2.2 +++ b/src/share/classes/com/sun/tools/javah/Gen.java	Wed Sep 23 19:15:04 2009 -0700
     2.3 @@ -27,15 +27,32 @@
     2.4  
     2.5  import java.io.UnsupportedEncodingException;
     2.6  import java.io.ByteArrayOutputStream;
     2.7 +import java.io.FileNotFoundException;
     2.8  import java.io.IOException;
     2.9 +import java.io.InputStream;
    2.10  import java.io.OutputStream;
    2.11 +import java.io.OutputStreamWriter;
    2.12  import java.io.PrintWriter;
    2.13 -import com.sun.javadoc.*;
    2.14 -import java.io.*;
    2.15 +import java.util.ArrayList;
    2.16 +import java.util.Arrays;
    2.17 +import java.util.List;
    2.18 +import java.util.Set;
    2.19  import java.util.Stack;
    2.20 -import java.util.Vector;
    2.21 -import java.util.Arrays;
    2.22  
    2.23 +import javax.annotation.processing.ProcessingEnvironment;
    2.24 +
    2.25 +import javax.lang.model.element.ExecutableElement;
    2.26 +import javax.lang.model.element.Modifier;
    2.27 +import javax.lang.model.element.TypeElement;
    2.28 +import javax.lang.model.element.VariableElement;
    2.29 +import javax.lang.model.util.ElementFilter;
    2.30 +import javax.lang.model.util.Elements;
    2.31 +import javax.lang.model.util.Types;
    2.32 +
    2.33 +import javax.tools.FileObject;
    2.34 +import javax.tools.JavaFileManager;
    2.35 +import javax.tools.JavaFileObject;
    2.36 +import javax.tools.StandardLocation;
    2.37  
    2.38  /**
    2.39   * An abstraction for generating support files required by native methods.
    2.40 @@ -43,31 +60,39 @@
    2.41   * original writing, this interface is rich enough to support JNI and the
    2.42   * old 1.0-style native method interface.
    2.43   *
    2.44 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
    2.45 + * If you write code that depends on this, you do so at your own
    2.46 + * risk.  This code and its internal interfaces are subject to change
    2.47 + * or deletion without notice.</b></p>
    2.48 + *
    2.49   * @author  Sucheta Dambalkar(Revised)
    2.50   */
    2.51 -
    2.52 -
    2.53  public abstract class Gen {
    2.54      protected String lineSep = System.getProperty("line.separator");
    2.55  
    2.56 -    RootDoc root;
    2.57 +    protected ProcessingEnvironment processingEnvironment;
    2.58 +    protected Types types;
    2.59 +    protected Elements elems;
    2.60 +    protected Mangle mangler;
    2.61 +    protected Util util;
    2.62 +
    2.63 +    protected Gen(Util util) {
    2.64 +        this.util = util;
    2.65 +    }
    2.66 +
    2.67      /*
    2.68       * List of classes for which we must generate output.
    2.69       */
    2.70 -    protected ClassDoc[] classes;
    2.71 +    protected Set<TypeElement> classes;
    2.72      static private final boolean isWindows =
    2.73          System.getProperty("os.name").startsWith("Windows");
    2.74  
    2.75 -    public Gen(RootDoc root){
    2.76 -        this.root = root;
    2.77 -    }
    2.78  
    2.79      /**
    2.80       * Override this abstract method, generating content for the named
    2.81       * class into the outputstream.
    2.82       */
    2.83 -    protected abstract void write(OutputStream o, ClassDoc clazz)
    2.84 -        throws ClassNotFoundException;
    2.85 +    protected abstract void write(OutputStream o, TypeElement clazz) throws Util.Exit;
    2.86  
    2.87      /**
    2.88       * Override this method to provide a list of #include statements
    2.89 @@ -78,31 +103,29 @@
    2.90      /*
    2.91       * Output location.
    2.92       */
    2.93 -    protected String outDir;
    2.94 -    protected String outFile;
    2.95 +    protected JavaFileManager fileManager;
    2.96 +    protected JavaFileObject outFile;
    2.97  
    2.98 -    public void setOutDir(String outDir) {
    2.99 -        /* Check important, otherwise concatenation of two null strings
   2.100 -         * produces the "nullnull" String.
   2.101 -         */
   2.102 -        if (outDir != null) {
   2.103 -            this.outDir = outDir + System.getProperty("file.separator");
   2.104 -            File d = new File(outDir);
   2.105 -            if (!d.exists())
   2.106 -                if (!d.mkdirs())
   2.107 -                    Util.error("cant.create.dir", d.toString());
   2.108 -        }
   2.109 +    public void setFileManager(JavaFileManager fm) {
   2.110 +        fileManager = fm;
   2.111      }
   2.112  
   2.113 -    public void setOutFile(String outFile) {
   2.114 +    public void setOutFile(JavaFileObject outFile) {
   2.115          this.outFile = outFile;
   2.116      }
   2.117  
   2.118  
   2.119 -    public void setClasses(ClassDoc[] classes) {
   2.120 +    public void setClasses(Set<TypeElement> classes) {
   2.121          this.classes = classes;
   2.122      }
   2.123  
   2.124 +    void setProcessingEnvironment(ProcessingEnvironment pEnv) {
   2.125 +        processingEnvironment = pEnv;
   2.126 +        elems = pEnv.getElementUtils();
   2.127 +        types = pEnv.getTypeUtils();
   2.128 +        mangler = new Mangle(elems, types);
   2.129 +    }
   2.130 +
   2.131      /*
   2.132       * Smartness with generated files.
   2.133       */
   2.134 @@ -116,12 +139,11 @@
   2.135       * We explicitly need to write ASCII files because that is what C
   2.136       * compilers understand.
   2.137       */
   2.138 -    protected PrintWriter wrapWriter(OutputStream o) {
   2.139 +    protected PrintWriter wrapWriter(OutputStream o) throws Util.Exit {
   2.140          try {
   2.141 -            return new
   2.142 -            PrintWriter(new OutputStreamWriter(o, "ISO8859_1"), true);
   2.143 +            return new PrintWriter(new OutputStreamWriter(o, "ISO8859_1"), true);
   2.144          } catch (UnsupportedEncodingException use) {
   2.145 -            Util.bug("encoding.iso8859_1.not.found");
   2.146 +            util.bug("encoding.iso8859_1.not.found");
   2.147              return null; /* dead code */
   2.148          }
   2.149      }
   2.150 @@ -133,26 +155,25 @@
   2.151       * Buffer size chosen as an approximation from a single sampling of:
   2.152       *         expr `du -sk` / `ls *.h | wc -l`
   2.153       */
   2.154 -    public void run() throws IOException, ClassNotFoundException {
   2.155 +    public void run() throws IOException, ClassNotFoundException, Util.Exit {
   2.156          int i = 0;
   2.157          if (outFile != null) {
   2.158              /* Everything goes to one big file... */
   2.159              ByteArrayOutputStream bout = new ByteArrayOutputStream(8192);
   2.160              writeFileTop(bout); /* only once */
   2.161  
   2.162 -            for (i = 0; i < classes.length; i++) {
   2.163 -                write(bout, classes[i]);
   2.164 +            for (TypeElement t: classes) {
   2.165 +                write(bout, t);
   2.166              }
   2.167  
   2.168              writeIfChanged(bout.toByteArray(), outFile);
   2.169          } else {
   2.170              /* Each class goes to its own file... */
   2.171 -            for (i = 0; i < classes.length; i++) {
   2.172 +            for (TypeElement t: classes) {
   2.173                  ByteArrayOutputStream bout = new ByteArrayOutputStream(8192);
   2.174                  writeFileTop(bout);
   2.175 -                ClassDoc clazz = classes[i];
   2.176 -                write(bout, clazz);
   2.177 -                writeIfChanged(bout.toByteArray(), getFileName(clazz.qualifiedName()));
   2.178 +                write(bout, t);
   2.179 +                writeIfChanged(bout.toByteArray(), getFileObject(t.getQualifiedName()));
   2.180              }
   2.181          }
   2.182      }
   2.183 @@ -162,8 +183,7 @@
   2.184       * is done if either the file doesn't exist or if the contents are
   2.185       * different.
   2.186       */
   2.187 -    private void writeIfChanged(byte[] b, String file) throws IOException {
   2.188 -        File f = new File(file);
   2.189 +    private void writeIfChanged(byte[] b, FileObject file) throws IOException {
   2.190          boolean mustWrite = false;
   2.191          String event = "[No need to update file ";
   2.192  
   2.193 @@ -171,71 +191,80 @@
   2.194              mustWrite = true;
   2.195              event = "[Forcefully writing file ";
   2.196          } else {
   2.197 -            if (!f.exists()) {
   2.198 +            InputStream in;
   2.199 +            byte[] a;
   2.200 +            try {
   2.201 +                // regrettably, there's no API to get the length in bytes
   2.202 +                // for a FileObject, so we can't short-circuit reading the
   2.203 +                // file here
   2.204 +                in = file.openInputStream();
   2.205 +                a = readBytes(in);
   2.206 +                if (!Arrays.equals(a, b)) {
   2.207 +                    mustWrite = true;
   2.208 +                    event = "[Overwriting file ";
   2.209 +
   2.210 +                }
   2.211 +            } catch (FileNotFoundException e) {
   2.212                  mustWrite = true;
   2.213                  event = "[Creating file ";
   2.214 -            } else {
   2.215 -                int l = (int)f.length();
   2.216 -                if (b.length != l) {
   2.217 -                    mustWrite = true;
   2.218 -                    event = "[Overwriting file ";
   2.219 -                } else {
   2.220 -                    /* Lengths are equal, so read it. */
   2.221 -                    byte[] a = new byte[l];
   2.222 -                    FileInputStream in = new FileInputStream(f);
   2.223 -                    if (in.read(a) != l) {
   2.224 -                        in.close();
   2.225 -                        /* This can't happen, we already checked the length. */
   2.226 -                        Util.error("not.enough.bytes", Integer.toString(l),
   2.227 -                                   f.toString());
   2.228 -                    }
   2.229 -                    in.close();
   2.230 -                    while (--l >= 0) {
   2.231 -                        if (a[l] != b[l]) {
   2.232 -                            mustWrite = true;
   2.233 -                            event = "[Overwriting file ";
   2.234 -                        }
   2.235 -                    }
   2.236 -                }
   2.237              }
   2.238          }
   2.239 -        if (Util.verbose)
   2.240 -            Util.log(event + file + "]");
   2.241 +
   2.242 +        if (util.verbose)
   2.243 +            util.log(event + file + "]");
   2.244 +
   2.245          if (mustWrite) {
   2.246 -            OutputStream out = new FileOutputStream(file);
   2.247 +            OutputStream out = file.openOutputStream();
   2.248              out.write(b); /* No buffering, just one big write! */
   2.249              out.close();
   2.250          }
   2.251      }
   2.252  
   2.253 -    protected String defineForStatic(ClassDoc c, FieldDoc f){
   2.254 +    protected byte[] readBytes(InputStream in) throws IOException {
   2.255 +        try {
   2.256 +            byte[] array = new byte[in.available() + 1];
   2.257 +            int offset = 0;
   2.258 +            int n;
   2.259 +            while ((n = in.read(array, offset, array.length - offset)) != -1) {
   2.260 +                offset += n;
   2.261 +                if (offset == array.length)
   2.262 +                    array = Arrays.copyOf(array, array.length * 2);
   2.263 +            }
   2.264  
   2.265 -        String cnamedoc = c.qualifiedName();
   2.266 -        String fnamedoc = f.name();
   2.267 +            return Arrays.copyOf(array, offset);
   2.268 +        } finally {
   2.269 +            in.close();
   2.270 +        }
   2.271 +    }
   2.272  
   2.273 -        String cname = Mangle.mangle(cnamedoc, Mangle.Type.CLASS);
   2.274 -        String fname = Mangle.mangle(fnamedoc, Mangle.Type.FIELDSTUB);
   2.275 +    protected String defineForStatic(TypeElement c, VariableElement f)
   2.276 +            throws Util.Exit {
   2.277 +        CharSequence cnamedoc = c.getQualifiedName();
   2.278 +        CharSequence fnamedoc = f.getSimpleName();
   2.279  
   2.280 -        if (!f.isStatic())
   2.281 -            Util.bug("tried.to.define.non.static");
   2.282 +        String cname = mangler.mangle(cnamedoc, Mangle.Type.CLASS);
   2.283 +        String fname = mangler.mangle(fnamedoc, Mangle.Type.FIELDSTUB);
   2.284  
   2.285 -        if (f.isFinal()) {
   2.286 +        if (!f.getModifiers().contains(Modifier.STATIC))
   2.287 +            util.bug("tried.to.define.non.static");
   2.288 +
   2.289 +        if (f.getModifiers().contains(Modifier.FINAL)) {
   2.290              Object value = null;
   2.291  
   2.292 -            value = f.constantValue();
   2.293 +            value = f.getConstantValue();
   2.294  
   2.295              if (value != null) { /* so it is a ConstantExpression */
   2.296                  String constString = null;
   2.297                  if ((value instanceof Integer)
   2.298                      || (value instanceof Byte)
   2.299 -                    || (value instanceof Character)
   2.300 -                    || (value instanceof Short)
   2.301 -                    || (value instanceof Boolean)) {
   2.302 -                    /* covers byte, boolean, char, short, int */
   2.303 -                    if(value instanceof Boolean)
   2.304 -                        constString = (value.toString() == "true") ? "1L" : "0L";
   2.305 -                    else
   2.306 -                        constString = value.toString() + "L";
   2.307 +                    || (value instanceof Short)) {
   2.308 +                    /* covers byte, short, int */
   2.309 +                    constString = value.toString() + "L";
   2.310 +                } else if (value instanceof Boolean) {
   2.311 +                    constString = ((Boolean) value) ? "1L" : "0L";
   2.312 +                } else if (value instanceof Character) {
   2.313 +                    Character ch = (Character) value;
   2.314 +                    constString = String.valueOf(((int) ch) & 0xffff) + "L";
   2.315                  } else if (value instanceof Long) {
   2.316                      // Visual C++ supports the i64 suffix, not LL.
   2.317                      if (isWindows)
   2.318 @@ -294,24 +323,19 @@
   2.319      /*
   2.320       * File name and file preamble related operations.
   2.321       */
   2.322 -    protected void writeFileTop(OutputStream o) {
   2.323 +    protected void writeFileTop(OutputStream o) throws Util.Exit {
   2.324          PrintWriter pw = wrapWriter(o);
   2.325          pw.println("/* DO NOT EDIT THIS FILE - it is machine generated */" + lineSep +
   2.326                     getIncludes());
   2.327      }
   2.328  
   2.329 -    protected String baseFileName(String clazz) {
   2.330 -        StringBuffer f =
   2.331 -            new StringBuffer(Mangle.mangle(clazz,
   2.332 -                                           Mangle.Type.CLASS));
   2.333 -        if (outDir != null) {
   2.334 -            f.insert(0, outDir);
   2.335 -        }
   2.336 -        return f.toString();
   2.337 +    protected String baseFileName(CharSequence className) {
   2.338 +        return mangler.mangle(className, Mangle.Type.CLASS);
   2.339      }
   2.340  
   2.341 -    protected String getFileName(String clazz) {
   2.342 -        return baseFileName(clazz) + getFileSuffix();
   2.343 +    protected FileObject getFileObject(CharSequence className) throws IOException {
   2.344 +        String name = baseFileName(className) + getFileSuffix();
   2.345 +        return fileManager.getFileForOutput(StandardLocation.SOURCE_OUTPUT, "", name, null);
   2.346      }
   2.347  
   2.348      protected String getFileSuffix() {
   2.349 @@ -322,26 +346,39 @@
   2.350       * Including super classes' fields.
   2.351       */
   2.352  
   2.353 -    FieldDoc[] getAllFields(ClassDoc subclazz)
   2.354 -                throws ClassNotFoundException {
   2.355 -        Vector<FieldDoc> fields = new Vector<FieldDoc>();
   2.356 -        ClassDoc cd = null;
   2.357 -        Stack<Object> s = new Stack<Object>();
   2.358 +    List<VariableElement> getAllFields(TypeElement subclazz) {
   2.359 +        List<VariableElement> fields = new ArrayList<VariableElement>();
   2.360 +        TypeElement cd = null;
   2.361 +        Stack<TypeElement> s = new Stack<TypeElement>();
   2.362  
   2.363          cd = subclazz;
   2.364          while (true) {
   2.365              s.push(cd);
   2.366 -            ClassDoc c = cd.superclass();
   2.367 +            TypeElement c = (TypeElement) (types.asElement(cd.getSuperclass()));
   2.368              if (c == null)
   2.369                  break;
   2.370              cd = c;
   2.371          }
   2.372  
   2.373          while (!s.empty()) {
   2.374 -            cd = (ClassDoc)s.pop();
   2.375 -            fields.addAll(Arrays.asList(cd.fields()));
   2.376 +            cd = s.pop();
   2.377 +            fields.addAll(ElementFilter.fieldsIn(cd.getEnclosedElements()));
   2.378          }
   2.379  
   2.380 -        return fields.toArray(new FieldDoc[fields.size()]);
   2.381 +        return fields;
   2.382 +    }
   2.383 +
   2.384 +    // c.f. MethodDoc.signature
   2.385 +    String signature(ExecutableElement e) {
   2.386 +        StringBuffer sb = new StringBuffer("(");
   2.387 +        String sep = "";
   2.388 +        for (VariableElement p: e.getParameters()) {
   2.389 +            sb.append(sep);
   2.390 +            sb.append(types.erasure(p.asType()).toString());
   2.391 +            sep = ",";
   2.392 +        }
   2.393 +        sb.append(")");
   2.394 +        return sb.toString();
   2.395      }
   2.396  }
   2.397 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/share/classes/com/sun/tools/javah/InternalError.java	Wed Sep 23 19:15:04 2009 -0700
     3.3 @@ -0,0 +1,40 @@
     3.4 +/*
     3.5 + * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
     3.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.7 + *
     3.8 + * This code is free software; you can redistribute it and/or modify it
     3.9 + * under the terms of the GNU General Public License version 2 only, as
    3.10 + * published by the Free Software Foundation.  Sun designates this
    3.11 + * particular file as subject to the "Classpath" exception as provided
    3.12 + * by Sun in the LICENSE file that accompanied this code.
    3.13 + *
    3.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    3.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    3.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    3.17 + * version 2 for more details (a copy is included in the LICENSE file that
    3.18 + * accompanied this code).
    3.19 + *
    3.20 + * You should have received a copy of the GNU General Public License version
    3.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    3.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    3.23 + *
    3.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    3.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    3.26 + * have any questions.
    3.27 + */
    3.28 +
    3.29 +package com.sun.tools.javah;
    3.30 +
    3.31 +/**
    3.32 + *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
    3.33 + *  you write code that depends on this, you do so at your own risk.
    3.34 + *  This code and its internal interfaces are subject to change or
    3.35 + *  deletion without notice.</b>
    3.36 + */
    3.37 +public class InternalError extends Error {
    3.38 +    private static final long serialVersionUID = 8411861562497165022L;
    3.39 +    InternalError(String msg, Throwable cause) {
    3.40 +        super("Internal error: " + msg);
    3.41 +        initCause(cause);
    3.42 +    }
    3.43 +}
     4.1 --- a/src/share/classes/com/sun/tools/javah/JNI.java	Wed Sep 23 18:48:13 2009 -0700
     4.2 +++ b/src/share/classes/com/sun/tools/javah/JNI.java	Wed Sep 23 19:15:04 2009 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright 2002-2005 Sun Microsystems, Inc.  All Rights Reserved.
     4.6 + * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -27,95 +27,98 @@
    4.11  
    4.12  import java.io.OutputStream;
    4.13  import java.io.PrintWriter;
    4.14 -import java.util.Vector;
    4.15 -import java.util.Enumeration;
    4.16 -import com.sun.javadoc.*;
    4.17 +import java.util.ArrayList;
    4.18 +import java.util.List;
    4.19 +import javax.lang.model.element.Element;
    4.20 +import javax.lang.model.element.ExecutableElement;
    4.21 +import javax.lang.model.element.Modifier;
    4.22 +import javax.lang.model.element.TypeElement;
    4.23 +import javax.lang.model.element.VariableElement;
    4.24 +import javax.lang.model.type.ArrayType;
    4.25 +import javax.lang.model.type.TypeMirror;
    4.26 +import javax.lang.model.util.ElementFilter;
    4.27  
    4.28  
    4.29  /**
    4.30   * Header file generator for JNI.
    4.31   *
    4.32 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
    4.33 + * If you write code that depends on this, you do so at your own
    4.34 + * risk.  This code and its internal interfaces are subject to change
    4.35 + * or deletion without notice.</b></p>
    4.36 + *
    4.37   * @author  Sucheta Dambalkar(Revised)
    4.38   */
    4.39 -
    4.40  public class JNI extends Gen {
    4.41 -
    4.42 -    public JNI(RootDoc root){
    4.43 -        super(root);
    4.44 +    JNI(Util util) {
    4.45 +        super(util);
    4.46      }
    4.47  
    4.48      public String getIncludes() {
    4.49          return "#include <jni.h>";
    4.50      }
    4.51  
    4.52 -    public void write(OutputStream o, ClassDoc clazz)
    4.53 -        throws ClassNotFoundException {
    4.54 -
    4.55 -        String cname = Mangle.mangle(clazz.qualifiedName(), Mangle.Type.CLASS);
    4.56 +    public void write(OutputStream o, TypeElement clazz) throws Util.Exit {
    4.57 +        String cname = mangler.mangle(clazz.getQualifiedName(), Mangle.Type.CLASS);
    4.58          PrintWriter pw = wrapWriter(o);
    4.59          pw.println(guardBegin(cname));
    4.60          pw.println(cppGuardBegin());
    4.61  
    4.62          /* Write statics. */
    4.63 -        FieldDoc[] classfields = getAllFields(clazz);
    4.64 +        List<VariableElement> classfields = getAllFields(clazz);
    4.65  
    4.66 -        for (int i = 0; i < classfields.length; i++) {
    4.67 -            if (!classfields[i].isStatic())
    4.68 +        for (VariableElement v: classfields) {
    4.69 +            if (!v.getModifiers().contains(Modifier.STATIC))
    4.70                  continue;
    4.71              String s = null;
    4.72 -            s = defineForStatic(clazz, classfields[i]);
    4.73 +            s = defineForStatic(clazz, v);
    4.74              if (s != null) {
    4.75                  pw.println(s);
    4.76              }
    4.77          }
    4.78  
    4.79          /* Write methods. */
    4.80 -        MethodDoc[] classmethods = clazz.methods();
    4.81 -        for (int i = 0; i < classmethods.length; i++) {
    4.82 -            if(classmethods[i].isNative()){
    4.83 -                MethodDoc md = classmethods[i];
    4.84 -                Type mtr = classmethods[i].returnType();
    4.85 -                String sig = md.signature();
    4.86 -                TypeSignature newtypesig = new TypeSignature(root);
    4.87 -                String methodName = md.name();
    4.88 +        List<ExecutableElement> classmethods = ElementFilter.methodsIn(clazz.getEnclosedElements());
    4.89 +        for (ExecutableElement md: classmethods) {
    4.90 +            if(md.getModifiers().contains(Modifier.NATIVE)){
    4.91 +                TypeMirror mtr = types.erasure(md.getReturnType());
    4.92 +                String sig = signature(md);
    4.93 +                TypeSignature newtypesig = new TypeSignature(elems);
    4.94 +                CharSequence methodName = md.getSimpleName();
    4.95                  boolean longName = false;
    4.96 -                for (int j = 0; j < classmethods.length; j++) {
    4.97 -                    if ((classmethods[j] != md)
    4.98 -                        && (methodName.equals(classmethods[j].name()))
    4.99 -                        && (classmethods[j].isNative()))
   4.100 +                for (ExecutableElement md2: classmethods) {
   4.101 +                    if ((md2 != md)
   4.102 +                        && (methodName.equals(md2.getSimpleName()))
   4.103 +                        && (md2.getModifiers().contains(Modifier.NATIVE)))
   4.104                          longName = true;
   4.105  
   4.106                  }
   4.107                  pw.println("/*");
   4.108                  pw.println(" * Class:     " + cname);
   4.109                  pw.println(" * Method:    " +
   4.110 -                           Mangle.mangle(methodName, Mangle.Type.FIELDSTUB));
   4.111 +                           mangler.mangle(methodName, Mangle.Type.FIELDSTUB));
   4.112                  pw.println(" * Signature: " + newtypesig.getTypeSignature(sig, mtr));
   4.113                  pw.println(" */");
   4.114                  pw.println("JNIEXPORT " + jniType(mtr) +
   4.115                             " JNICALL " +
   4.116 -                           Mangle.mangleMethod(md, root,clazz,
   4.117 +                           mangler.mangleMethod(md, clazz,
   4.118                                                 (longName) ?
   4.119                                                 Mangle.Type.METHOD_JNI_LONG :
   4.120                                                 Mangle.Type.METHOD_JNI_SHORT));
   4.121                  pw.print("  (JNIEnv *, ");
   4.122 -                Parameter[] paramargs = md.parameters();
   4.123 -                Type []args =new Type[ paramargs.length];
   4.124 -                for(int p = 0; p < paramargs.length; p++){
   4.125 -                    args[p] = paramargs[p].type();
   4.126 +                List<? extends VariableElement> paramargs = md.getParameters();
   4.127 +                List<TypeMirror> args = new ArrayList<TypeMirror>();
   4.128 +                for (VariableElement p: paramargs) {
   4.129 +                    args.add(types.erasure(p.asType()));
   4.130                  }
   4.131 -                if (md.isStatic())
   4.132 +                if (md.getModifiers().contains(Modifier.STATIC))
   4.133                      pw.print("jclass");
   4.134                  else
   4.135                      pw.print("jobject");
   4.136 -                if (args.length > 0)
   4.137 +
   4.138 +                for (TypeMirror arg: args) {
   4.139                      pw.print(", ");
   4.140 -
   4.141 -                for (int j = 0; j < args.length; j++) {
   4.142 -                    pw.print(jniType(args[j]));
   4.143 -                    if (j != (args.length - 1)) {
   4.144 -                        pw.print(", ");
   4.145 -                    }
   4.146 +                    pw.print(jniType(arg));
   4.147                  }
   4.148                  pw.println(");" + lineSep);
   4.149              }
   4.150 @@ -125,42 +128,54 @@
   4.151      }
   4.152  
   4.153  
   4.154 -    protected final String jniType(Type t){
   4.155 +    protected final String jniType(TypeMirror t) throws Util.Exit {
   4.156 +        TypeElement throwable = elems.getTypeElement("java.lang.Throwable");
   4.157 +        TypeElement jClass = elems.getTypeElement("java.lang.Class");
   4.158 +        TypeElement jString = elems.getTypeElement("java.lang.String");
   4.159 +        Element tclassDoc = types.asElement(t);
   4.160  
   4.161 -        String elmT = t.typeName();
   4.162 -        ClassDoc throwable = root.classNamed("java.lang.Throwable");
   4.163 -        ClassDoc jClass = root.classNamed("java.lang.Class");
   4.164 -        ClassDoc tclassDoc = t.asClassDoc();
   4.165  
   4.166 -        if((t.dimension()).indexOf("[]") != -1){
   4.167 -            if((t.dimension().indexOf("[][]") != -1)
   4.168 -               || (tclassDoc != null))  return "jobjectArray";
   4.169 -            else if(elmT.equals("boolean"))return  "jbooleanArray";
   4.170 -            else if(elmT.equals("byte"))return  "jbyteArray";
   4.171 -            else if(elmT.equals("char"))return  "jcharArray";
   4.172 -            else if(elmT.equals("short"))return  "jshortArray";
   4.173 -            else if(elmT.equals("int"))return  "jintArray";
   4.174 -            else if(elmT.equals("long"))return  "jlongArray";
   4.175 -            else if(elmT.equals("float"))return  "jfloatArray";
   4.176 -            else if(elmT.equals("double"))return  "jdoubleArray";
   4.177 -        }else{
   4.178 -            if(elmT.equals("void"))return  "void";
   4.179 -            else if(elmT.equals("String"))return  "jstring";
   4.180 -            else if(elmT.equals("boolean"))return  "jboolean";
   4.181 -            else if(elmT.equals("byte"))return  "jbyte";
   4.182 -            else if(elmT.equals("char"))return  "jchar";
   4.183 -            else if(elmT.equals("short"))return  "jshort";
   4.184 -            else if(elmT.equals("int"))return  "jint";
   4.185 -            else if(elmT.equals("long"))return  "jlong";
   4.186 -            else if(elmT.equals("float"))return  "jfloat";
   4.187 -            else if(elmT.equals("double"))return  "jdouble";
   4.188 -            else  if(tclassDoc  != null){
   4.189 -                if(tclassDoc.subclassOf(throwable)) return "jthrowable";
   4.190 -                else if(tclassDoc.subclassOf(jClass)) return "jclass";
   4.191 -                else return "jobject";
   4.192 +        switch (t.getKind()) {
   4.193 +            case ARRAY: {
   4.194 +                TypeMirror ct = ((ArrayType) t).getComponentType();
   4.195 +                switch (ct.getKind()) {
   4.196 +                    case BOOLEAN:  return "jbooleanArray";
   4.197 +                    case BYTE:     return "jbyteArray";
   4.198 +                    case CHAR:     return "jcharArray";
   4.199 +                    case SHORT:    return "jshortArray";
   4.200 +                    case INT:      return "jintArray";
   4.201 +                    case LONG:     return "jlongArray";
   4.202 +                    case FLOAT:    return "jfloatArray";
   4.203 +                    case DOUBLE:   return "jdoubleArray";
   4.204 +                    case ARRAY:
   4.205 +                    case DECLARED: return "jobjectArray";
   4.206 +                    default: throw new Error(ct.toString());
   4.207 +                }
   4.208 +            }
   4.209 +
   4.210 +            case VOID:     return "void";
   4.211 +            case BOOLEAN:  return "jboolean";
   4.212 +            case BYTE:     return "jbyte";
   4.213 +            case CHAR:     return "jchar";
   4.214 +            case SHORT:    return "jshort";
   4.215 +            case INT:      return "jint";
   4.216 +            case LONG:     return "jlong";
   4.217 +            case FLOAT:    return "jfloat";
   4.218 +            case DOUBLE:   return "jdouble";
   4.219 +
   4.220 +            case DECLARED: {
   4.221 +                if (tclassDoc.equals(jString))
   4.222 +                    return "jstring";
   4.223 +                else if (types.isAssignable(t, throwable.asType()))
   4.224 +                    return "jthrowable";
   4.225 +                else if (types.isAssignable(t, jClass.asType()))
   4.226 +                    return "jclass";
   4.227 +                else
   4.228 +                    return "jobject";
   4.229              }
   4.230          }
   4.231 -        Util.bug("jni.unknown.type");
   4.232 +
   4.233 +        util.bug("jni.unknown.type");
   4.234          return null; /* dead code. */
   4.235      }
   4.236  }
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/src/share/classes/com/sun/tools/javah/JavahFileManager.java	Wed Sep 23 19:15:04 2009 -0700
     5.3 @@ -0,0 +1,63 @@
     5.4 +/*
     5.5 + * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
     5.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.7 + *
     5.8 + * This code is free software; you can redistribute it and/or modify it
     5.9 + * under the terms of the GNU General Public License version 2 only, as
    5.10 + * published by the Free Software Foundation.  Sun designates this
    5.11 + * particular file as subject to the "Classpath" exception as provided
    5.12 + * by Sun in the LICENSE file that accompanied this code.
    5.13 + *
    5.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    5.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    5.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    5.17 + * version 2 for more details (a copy is included in the LICENSE file that
    5.18 + * accompanied this code).
    5.19 + *
    5.20 + * You should have received a copy of the GNU General Public License version
    5.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    5.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    5.23 + *
    5.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    5.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    5.26 + * have any questions.
    5.27 + */
    5.28 +
    5.29 +package com.sun.tools.javah;
    5.30 +
    5.31 +import java.io.PrintWriter;
    5.32 +import java.nio.charset.Charset;
    5.33 +import javax.tools.DiagnosticListener;
    5.34 +import javax.tools.JavaFileObject;
    5.35 +
    5.36 +import com.sun.tools.javac.file.JavacFileManager;
    5.37 +import com.sun.tools.javac.util.Context;
    5.38 +
    5.39 +/**
    5.40 + *  javah's implementation of JavaFileManager.
    5.41 + *
    5.42 + *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
    5.43 + *  you write code that depends on this, you do so at your own risk.
    5.44 + *  This code and its internal interfaces are subject to change or
    5.45 + *  deletion without notice.</b>
    5.46 + */
    5.47 +class JavahFileManager extends JavacFileManager {
    5.48 +    private JavahFileManager(Context context, Charset charset) {
    5.49 +        super(context, true, charset);
    5.50 +        setIgnoreSymbolFile(true);
    5.51 +    }
    5.52 +
    5.53 +    static JavahFileManager create(final DiagnosticListener<? super JavaFileObject> dl, PrintWriter log) {
    5.54 +        Context javac_context = new Context();
    5.55 +
    5.56 +        if (dl != null)
    5.57 +            javac_context.put(DiagnosticListener.class, dl);
    5.58 +        javac_context.put(com.sun.tools.javac.util.Log.outKey, log);
    5.59 +
    5.60 +        return new JavahFileManager(javac_context, null);
    5.61 +    }
    5.62 +
    5.63 +    void setIgnoreSymbolFile(boolean b) {
    5.64 +        ignoreSymbolFile = b;
    5.65 +    }
    5.66 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/src/share/classes/com/sun/tools/javah/JavahTask.java	Wed Sep 23 19:15:04 2009 -0700
     6.3 @@ -0,0 +1,724 @@
     6.4 +/*
     6.5 + * Copyright 2002-2009 Sun Microsystems, Inc.  All Rights Reserved.
     6.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.7 + *
     6.8 + * This code is free software; you can redistribute it and/or modify it
     6.9 + * under the terms of the GNU General Public License version 2 only, as
    6.10 + * published by the Free Software Foundation.  Sun designates this
    6.11 + * particular file as subject to the "Classpath" exception as provided
    6.12 + * by Sun in the LICENSE file that accompanied this code.
    6.13 + *
    6.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    6.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    6.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    6.17 + * version 2 for more details (a copy is included in the LICENSE file that
    6.18 + * accompanied this code).
    6.19 + *
    6.20 + * You should have received a copy of the GNU General Public License version
    6.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    6.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    6.23 + *
    6.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    6.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    6.26 + * have any questions.
    6.27 + */
    6.28 +
    6.29 +package com.sun.tools.javah;
    6.30 +
    6.31 +import java.io.File;
    6.32 +import java.io.IOException;
    6.33 +import java.io.OutputStream;
    6.34 +import java.io.PrintWriter;
    6.35 +import java.io.Writer;
    6.36 +import java.text.MessageFormat;
    6.37 +import java.util.ArrayList;
    6.38 +import java.util.Arrays;
    6.39 +import java.util.Collections;
    6.40 +import java.util.HashMap;
    6.41 +import java.util.Iterator;
    6.42 +import java.util.LinkedHashSet;
    6.43 +import java.util.List;
    6.44 +import java.util.Locale;
    6.45 +import java.util.Map;
    6.46 +import java.util.MissingResourceException;
    6.47 +import java.util.ResourceBundle;
    6.48 +import java.util.Set;
    6.49 +
    6.50 +import javax.annotation.processing.AbstractProcessor;
    6.51 +import javax.annotation.processing.Messager;
    6.52 +import javax.annotation.processing.RoundEnvironment;
    6.53 +import javax.annotation.processing.SupportedAnnotationTypes;
    6.54 +import javax.annotation.processing.SupportedSourceVersion;
    6.55 +
    6.56 +import javax.lang.model.SourceVersion;
    6.57 +import javax.lang.model.element.ExecutableElement;
    6.58 +import javax.lang.model.element.TypeElement;
    6.59 +import javax.lang.model.element.VariableElement;
    6.60 +import javax.lang.model.type.ArrayType;
    6.61 +import javax.lang.model.type.DeclaredType;
    6.62 +import javax.lang.model.type.TypeMirror;
    6.63 +import javax.lang.model.type.TypeVisitor;
    6.64 +import javax.lang.model.util.ElementFilter;
    6.65 +import javax.lang.model.util.SimpleTypeVisitor6;
    6.66 +import javax.lang.model.util.Types;
    6.67 +
    6.68 +import javax.tools.Diagnostic;
    6.69 +import javax.tools.DiagnosticListener;
    6.70 +import javax.tools.JavaCompiler;
    6.71 +import javax.tools.JavaCompiler.CompilationTask;
    6.72 +import javax.tools.JavaFileManager;
    6.73 +import javax.tools.JavaFileObject;
    6.74 +import javax.tools.StandardJavaFileManager;
    6.75 +import javax.tools.StandardLocation;
    6.76 +import javax.tools.ToolProvider;
    6.77 +
    6.78 +/**
    6.79 + * Javah generates support files for native methods.
    6.80 + * Parse commandline options & Invokes javadoc to execute those commands.
    6.81 + *
    6.82 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
    6.83 + * If you write code that depends on this, you do so at your own
    6.84 + * risk.  This code and its internal interfaces are subject to change
    6.85 + * or deletion without notice.</b></p>
    6.86 + *
    6.87 + * @author Sucheta Dambalkar
    6.88 + * @author Jonathan Gibbons
    6.89 + */
    6.90 +public class JavahTask implements NativeHeaderTool.NativeHeaderTask {
    6.91 +    public class BadArgs extends Exception {
    6.92 +        private static final long serialVersionUID = 1479361270874789045L;
    6.93 +        BadArgs(String key, Object... args) {
    6.94 +            super(JavahTask.this.getMessage(key, args));
    6.95 +            this.key = key;
    6.96 +            this.args = args;
    6.97 +        }
    6.98 +
    6.99 +        BadArgs showUsage(boolean b) {
   6.100 +            showUsage = b;
   6.101 +            return this;
   6.102 +        }
   6.103 +
   6.104 +        final String key;
   6.105 +        final Object[] args;
   6.106 +        boolean showUsage;
   6.107 +    }
   6.108 +
   6.109 +    static abstract class Option {
   6.110 +        Option(boolean hasArg, String... aliases) {
   6.111 +            this.hasArg = hasArg;
   6.112 +            this.aliases = aliases;
   6.113 +        }
   6.114 +
   6.115 +        boolean isHidden() {
   6.116 +            return false;
   6.117 +        }
   6.118 +
   6.119 +        boolean matches(String opt) {
   6.120 +            for (String a: aliases) {
   6.121 +                if (a.equals(opt))
   6.122 +                    return true;
   6.123 +            }
   6.124 +            return false;
   6.125 +        }
   6.126 +
   6.127 +        boolean ignoreRest() {
   6.128 +            return false;
   6.129 +        }
   6.130 +
   6.131 +        abstract void process(JavahTask task, String opt, String arg) throws BadArgs;
   6.132 +
   6.133 +        final boolean hasArg;
   6.134 +        final String[] aliases;
   6.135 +    }
   6.136 +
   6.137 +    static abstract class HiddenOption extends Option {
   6.138 +        HiddenOption(boolean hasArg, String... aliases) {
   6.139 +            super(hasArg, aliases);
   6.140 +        }
   6.141 +
   6.142 +        @Override
   6.143 +        boolean isHidden() {
   6.144 +            return true;
   6.145 +        }
   6.146 +    }
   6.147 +
   6.148 +    static Option[] recognizedOptions = {
   6.149 +        new Option(true, "-o") {
   6.150 +            void process(JavahTask task, String opt, String arg) {
   6.151 +                task.ofile = new File(arg);
   6.152 +            }
   6.153 +        },
   6.154 +
   6.155 +        new Option(true, "-d") {
   6.156 +            void process(JavahTask task, String opt, String arg) {
   6.157 +                task.odir = new File(arg);
   6.158 +            }
   6.159 +        },
   6.160 +
   6.161 +        new HiddenOption(true, "-td") {
   6.162 +            void process(JavahTask task, String opt, String arg) {
   6.163 +                 // ignored; for backwards compatibility
   6.164 +            }
   6.165 +        },
   6.166 +
   6.167 +        new HiddenOption(false, "-stubs") {
   6.168 +            void process(JavahTask task, String opt, String arg) {
   6.169 +                 // ignored; for backwards compatibility
   6.170 +            }
   6.171 +        },
   6.172 +
   6.173 +        new Option(false, "-v", "-verbose") {
   6.174 +            void process(JavahTask task, String opt, String arg) {
   6.175 +                task.verbose = true;
   6.176 +            }
   6.177 +        },
   6.178 +
   6.179 +        new Option(false, "-help", "--help", "-?") {
   6.180 +            void process(JavahTask task, String opt, String arg) {
   6.181 +                task.help = true;
   6.182 +            }
   6.183 +        },
   6.184 +
   6.185 +        new HiddenOption(false, "-trace") {
   6.186 +            void process(JavahTask task, String opt, String arg) {
   6.187 +                task.trace = true;
   6.188 +            }
   6.189 +        },
   6.190 +
   6.191 +        new Option(false, "-version") {
   6.192 +            void process(JavahTask task, String opt, String arg) {
   6.193 +                task.version = true;
   6.194 +            }
   6.195 +        },
   6.196 +
   6.197 +        new HiddenOption(false, "-fullversion") {
   6.198 +            void process(JavahTask task, String opt, String arg) {
   6.199 +                task.fullVersion = true;
   6.200 +            }
   6.201 +        },
   6.202 +
   6.203 +        new Option(false, "-jni") {
   6.204 +            void process(JavahTask task, String opt, String arg) {
   6.205 +                task.jni = true;
   6.206 +            }
   6.207 +        },
   6.208 +
   6.209 +        new Option(false, "-force") {
   6.210 +            void process(JavahTask task, String opt, String arg) {
   6.211 +                task.force = true;
   6.212 +            }
   6.213 +        },
   6.214 +
   6.215 +        new HiddenOption(false, "-Xnew") {
   6.216 +            void process(JavahTask task, String opt, String arg) {
   6.217 +                // we're already using the new javah
   6.218 +            }
   6.219 +        },
   6.220 +
   6.221 +        new HiddenOption(false, "-old") {
   6.222 +            void process(JavahTask task, String opt, String arg) {
   6.223 +                task.old = true;
   6.224 +            }
   6.225 +        },
   6.226 +
   6.227 +        new HiddenOption(false, "-llni", "-Xllni") {
   6.228 +            void process(JavahTask task, String opt, String arg) {
   6.229 +                task.llni = true;
   6.230 +            }
   6.231 +        },
   6.232 +
   6.233 +        new HiddenOption(false, "-llnidouble") {
   6.234 +            void process(JavahTask task, String opt, String arg) {
   6.235 +                task.llni = true;
   6.236 +                task.doubleAlign = true;
   6.237 +            }
   6.238 +        },
   6.239 +    };
   6.240 +
   6.241 +    JavahTask() {
   6.242 +    }
   6.243 +
   6.244 +    JavahTask(Writer out,
   6.245 +            JavaFileManager fileManager,
   6.246 +            DiagnosticListener<? super JavaFileObject> diagnosticListener,
   6.247 +            Iterable<String> options,
   6.248 +            Iterable<String> classes) {
   6.249 +        this();
   6.250 +        this.log = getPrintWriterForWriter(out);
   6.251 +        this.fileManager = fileManager;
   6.252 +        this.diagnosticListener = diagnosticListener;
   6.253 +
   6.254 +        try {
   6.255 +            handleOptions(options, false);
   6.256 +        } catch (BadArgs e) {
   6.257 +            throw new IllegalArgumentException(e.getMessage());
   6.258 +        }
   6.259 +
   6.260 +        this.classes = new ArrayList<String>();
   6.261 +        for (String classname: classes) {
   6.262 +            classname.getClass(); // null-check
   6.263 +            this.classes.add(classname);
   6.264 +        }
   6.265 +    }
   6.266 +
   6.267 +    public void setLocale(Locale locale) {
   6.268 +        if (locale == null)
   6.269 +            locale = Locale.getDefault();
   6.270 +        task_locale = locale;
   6.271 +    }
   6.272 +
   6.273 +    public void setLog(PrintWriter log) {
   6.274 +        this.log = log;
   6.275 +    }
   6.276 +
   6.277 +    public void setLog(OutputStream s) {
   6.278 +        setLog(getPrintWriterForStream(s));
   6.279 +    }
   6.280 +
   6.281 +    static PrintWriter getPrintWriterForStream(OutputStream s) {
   6.282 +        return new PrintWriter(s, true);
   6.283 +    }
   6.284 +
   6.285 +    static PrintWriter getPrintWriterForWriter(Writer w) {
   6.286 +        if (w == null)
   6.287 +            return getPrintWriterForStream(null);
   6.288 +        else if (w instanceof PrintWriter)
   6.289 +            return (PrintWriter) w;
   6.290 +        else
   6.291 +            return new PrintWriter(w, true);
   6.292 +    }
   6.293 +
   6.294 +    public void setDiagnosticListener(DiagnosticListener<? super JavaFileObject> dl) {
   6.295 +        diagnosticListener = dl;
   6.296 +    }
   6.297 +
   6.298 +    public void setDiagnosticListener(OutputStream s) {
   6.299 +        setDiagnosticListener(getDiagnosticListenerForStream(s));
   6.300 +    }
   6.301 +
   6.302 +    private DiagnosticListener<JavaFileObject> getDiagnosticListenerForStream(OutputStream s) {
   6.303 +        return getDiagnosticListenerForWriter(getPrintWriterForStream(s));
   6.304 +    }
   6.305 +
   6.306 +    private DiagnosticListener<JavaFileObject> getDiagnosticListenerForWriter(Writer w) {
   6.307 +        final PrintWriter pw = getPrintWriterForWriter(w);
   6.308 +        return new DiagnosticListener<JavaFileObject> () {
   6.309 +            public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
   6.310 +                if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
   6.311 +                    pw.print(getMessage("err.prefix"));
   6.312 +                    pw.print(" ");
   6.313 +                }
   6.314 +                pw.println(diagnostic.getMessage(null));
   6.315 +            }
   6.316 +        };
   6.317 +    }
   6.318 +
   6.319 +    int run(String[] args) {
   6.320 +        try {
   6.321 +            handleOptions(args);
   6.322 +            boolean ok = run();
   6.323 +            return ok ? 0 : 1;
   6.324 +        } catch (BadArgs e) {
   6.325 +            diagnosticListener.report(createDiagnostic(e.key, e.args));
   6.326 +            return 1;
   6.327 +        } catch (InternalError e) {
   6.328 +            diagnosticListener.report(createDiagnostic("err.internal.error", e.getMessage()));
   6.329 +            return 1;
   6.330 +        } finally {
   6.331 +            log.flush();
   6.332 +        }
   6.333 +    }
   6.334 +
   6.335 +    public void handleOptions(String[] args) throws BadArgs {
   6.336 +        handleOptions(Arrays.asList(args), true);
   6.337 +    }
   6.338 +
   6.339 +    private void handleOptions(Iterable<String> args, boolean allowClasses) throws BadArgs {
   6.340 +        if (log == null) {
   6.341 +            log = getPrintWriterForStream(System.out);
   6.342 +            if (diagnosticListener == null)
   6.343 +              diagnosticListener = getDiagnosticListenerForStream(System.err);
   6.344 +        } else {
   6.345 +            if (diagnosticListener == null)
   6.346 +              diagnosticListener = getDiagnosticListenerForWriter(log);
   6.347 +        }
   6.348 +
   6.349 +        if (fileManager == null)
   6.350 +            fileManager = getDefaultFileManager(diagnosticListener, log);
   6.351 +
   6.352 +        Iterator<String> iter = args.iterator();
   6.353 +        if (!iter.hasNext())
   6.354 +            help = true;
   6.355 +
   6.356 +        while (iter.hasNext()) {
   6.357 +            String arg = iter.next();
   6.358 +            if (arg.startsWith("-"))
   6.359 +                handleOption(arg, iter);
   6.360 +            else if (allowClasses) {
   6.361 +                if (classes == null)
   6.362 +                    classes = new ArrayList<String>();
   6.363 +                classes.add(arg);
   6.364 +                while (iter.hasNext())
   6.365 +                    classes.add(iter.next());
   6.366 +            } else
   6.367 +                throw new BadArgs("err.unknown.option", arg).showUsage(true);
   6.368 +        }
   6.369 +
   6.370 +        if ((classes == null || classes.size() == 0) &&
   6.371 +                !(help || version || fullVersion)) {
   6.372 +            throw new BadArgs("err.no.classes.specified");
   6.373 +        }
   6.374 +
   6.375 +        if (jni && llni)
   6.376 +            throw new BadArgs("jni.llni.mixed");
   6.377 +
   6.378 +        if (odir != null && ofile != null)
   6.379 +            throw new BadArgs("dir.file.mixed");
   6.380 +    }
   6.381 +
   6.382 +    private void handleOption(String name, Iterator<String> rest) throws BadArgs {
   6.383 +        for (Option o: recognizedOptions) {
   6.384 +            if (o.matches(name)) {
   6.385 +                if (o.hasArg) {
   6.386 +                    if (rest.hasNext())
   6.387 +                        o.process(this, name, rest.next());
   6.388 +                    else
   6.389 +                        throw new BadArgs("err.missing.arg", name).showUsage(true);
   6.390 +                } else
   6.391 +                    o.process(this, name, null);
   6.392 +
   6.393 +                if (o.ignoreRest()) {
   6.394 +                    while (rest.hasNext())
   6.395 +                        rest.next();
   6.396 +                }
   6.397 +                return;
   6.398 +            }
   6.399 +        }
   6.400 +
   6.401 +        if (fileManager.handleOption(name, rest))
   6.402 +            return;
   6.403 +
   6.404 +        throw new BadArgs("err.unknown.option", name).showUsage(true);
   6.405 +    }
   6.406 +
   6.407 +    public Boolean call() {
   6.408 +        return run();
   6.409 +    }
   6.410 +
   6.411 +    public boolean run() throws Util.Exit {
   6.412 +
   6.413 +        Util util = new Util(log, diagnosticListener);
   6.414 +
   6.415 +        if (help) {
   6.416 +            showHelp();
   6.417 +            return true;
   6.418 +        }
   6.419 +
   6.420 +        if (version || fullVersion) {
   6.421 +            showVersion(fullVersion);
   6.422 +            return true;
   6.423 +        }
   6.424 +
   6.425 +        util.verbose = verbose;
   6.426 +
   6.427 +        Gen g;
   6.428 +
   6.429 +        if (llni)
   6.430 +            g = new LLNI(doubleAlign, util);
   6.431 +        else {
   6.432 +//            if (stubs)
   6.433 +//                throw new BadArgs("jni.no.stubs");
   6.434 +            g = new JNI(util);
   6.435 +        }
   6.436 +
   6.437 +        if (ofile != null) {
   6.438 +            if (!(fileManager instanceof StandardJavaFileManager)) {
   6.439 +                diagnosticListener.report(createDiagnostic("err.cant.use.option.for.fm", "-o"));
   6.440 +                return false;
   6.441 +            }
   6.442 +            Iterable<? extends JavaFileObject> iter =
   6.443 +                    ((StandardJavaFileManager) fileManager).getJavaFileObjectsFromFiles(Collections.singleton(ofile));
   6.444 +            JavaFileObject fo = iter.iterator().next();
   6.445 +            g.setOutFile(fo);
   6.446 +        } else {
   6.447 +            if (odir != null) {
   6.448 +                if (!(fileManager instanceof StandardJavaFileManager)) {
   6.449 +                    diagnosticListener.report(createDiagnostic("err.cant.use.option.for.fm", "-d"));
   6.450 +                    return false;
   6.451 +                }
   6.452 +
   6.453 +                if (!odir.exists())
   6.454 +                    if (!odir.mkdirs())
   6.455 +                        util.error("cant.create.dir", odir.toString());
   6.456 +                try {
   6.457 +                    ((StandardJavaFileManager) fileManager).setLocation(StandardLocation.CLASS_OUTPUT, Collections.singleton(odir));
   6.458 +                } catch (IOException e) {
   6.459 +                    Object msg = e.getLocalizedMessage();
   6.460 +                    if (msg == null) {
   6.461 +                        msg = e;
   6.462 +                    }
   6.463 +                    diagnosticListener.report(createDiagnostic("err.ioerror", odir, msg));
   6.464 +                    return false;
   6.465 +                }
   6.466 +            }
   6.467 +            g.setFileManager(fileManager);
   6.468 +        }
   6.469 +
   6.470 +        /*
   6.471 +         * Force set to false will turn off smarts about checking file
   6.472 +         * content before writing.
   6.473 +         */
   6.474 +        g.setForce(force);
   6.475 +
   6.476 +        if (fileManager instanceof JavahFileManager)
   6.477 +            ((JavahFileManager) fileManager).setIgnoreSymbolFile(true);
   6.478 +
   6.479 +        JavaCompiler c = ToolProvider.getSystemJavaCompiler();
   6.480 +        List<String> opts = Arrays.asList("-proc:only");
   6.481 +        CompilationTask t = c.getTask(log, fileManager, diagnosticListener, opts, internalize(classes), null);
   6.482 +        JavahProcessor p = new JavahProcessor(g);
   6.483 +        t.setProcessors(Collections.singleton(p));
   6.484 +
   6.485 +        boolean ok = t.call();
   6.486 +        if (p.exit != null)
   6.487 +            throw new Util.Exit(p.exit);
   6.488 +        return ok;
   6.489 +    }
   6.490 +
   6.491 +    private List<String> internalize(List<String> classes) {
   6.492 +        List<String> l = new ArrayList<String>();
   6.493 +        for (String c: classes) {
   6.494 +            l.add(c.replace('$', '.'));
   6.495 +        }
   6.496 +        return l;
   6.497 +    }
   6.498 +
   6.499 +    private List<File> pathToFiles(String path) {
   6.500 +        List<File> files = new ArrayList<File>();
   6.501 +        for (String f: path.split(File.pathSeparator)) {
   6.502 +            if (f.length() > 0)
   6.503 +                files.add(new File(f));
   6.504 +        }
   6.505 +        return files;
   6.506 +    }
   6.507 +
   6.508 +    static StandardJavaFileManager getDefaultFileManager(final DiagnosticListener<? super JavaFileObject> dl, PrintWriter log) {
   6.509 +        return JavahFileManager.create(dl, log);
   6.510 +    }
   6.511 +
   6.512 +    private void showHelp() {
   6.513 +        log.println(getMessage("main.usage", progname));
   6.514 +        for (Option o: recognizedOptions) {
   6.515 +            if (o.isHidden())
   6.516 +                continue;
   6.517 +            String name = o.aliases[0].substring(1); // there must always be at least one name
   6.518 +            log.println(getMessage("main.opt." + name));
   6.519 +        }
   6.520 +        String[] fmOptions = { "-classpath", "-bootclasspath" };
   6.521 +        for (String o: fmOptions) {
   6.522 +            if (fileManager.isSupportedOption(o) == -1)
   6.523 +                continue;
   6.524 +            String name = o.substring(1);
   6.525 +            log.println(getMessage("main.opt." + name));
   6.526 +        }
   6.527 +        log.println(getMessage("main.usage.foot"));
   6.528 +    }
   6.529 +
   6.530 +    private void showVersion(boolean full) {
   6.531 +        log.println(version(full ? "full" : "release"));
   6.532 +    }
   6.533 +
   6.534 +    private static final String versionRBName = "com.sun.tools.javah.resources.version";
   6.535 +    private static ResourceBundle versionRB;
   6.536 +
   6.537 +    private String version(String key) {
   6.538 +        // key=version:  mm.nn.oo[-milestone]
   6.539 +        // key=full:     mm.mm.oo[-milestone]-build
   6.540 +        if (versionRB == null) {
   6.541 +            try {
   6.542 +                versionRB = ResourceBundle.getBundle(versionRBName);
   6.543 +            } catch (MissingResourceException e) {
   6.544 +                return getMessage("version.resource.missing", System.getProperty("java.version"));
   6.545 +            }
   6.546 +        }
   6.547 +        try {
   6.548 +            return versionRB.getString(key);
   6.549 +        }
   6.550 +        catch (MissingResourceException e) {
   6.551 +            return getMessage("version.unknown", System.getProperty("java.version"));
   6.552 +        }
   6.553 +    }
   6.554 +
   6.555 +    private Diagnostic<JavaFileObject> createDiagnostic(final String key, final Object... args) {
   6.556 +        return new Diagnostic<JavaFileObject>() {
   6.557 +            public Kind getKind() {
   6.558 +                return Diagnostic.Kind.ERROR;
   6.559 +            }
   6.560 +
   6.561 +            public JavaFileObject getSource() {
   6.562 +                return null;
   6.563 +            }
   6.564 +
   6.565 +            public long getPosition() {
   6.566 +                return Diagnostic.NOPOS;
   6.567 +            }
   6.568 +
   6.569 +            public long getStartPosition() {
   6.570 +                return Diagnostic.NOPOS;
   6.571 +            }
   6.572 +
   6.573 +            public long getEndPosition() {
   6.574 +                return Diagnostic.NOPOS;
   6.575 +            }
   6.576 +
   6.577 +            public long getLineNumber() {
   6.578 +                return Diagnostic.NOPOS;
   6.579 +            }
   6.580 +
   6.581 +            public long getColumnNumber() {
   6.582 +                return Diagnostic.NOPOS;
   6.583 +            }
   6.584 +
   6.585 +            public String getCode() {
   6.586 +                return key;
   6.587 +            }
   6.588 +
   6.589 +            public String getMessage(Locale locale) {
   6.590 +                return JavahTask.this.getMessage(locale, key, args);
   6.591 +            }
   6.592 +
   6.593 +        };
   6.594 +
   6.595 +    }
   6.596 +    private String getMessage(String key, Object... args) {
   6.597 +        return getMessage(task_locale, key, args);
   6.598 +    }
   6.599 +
   6.600 +    private String getMessage(Locale locale, String key, Object... args) {
   6.601 +        if (bundles == null) {
   6.602 +            // could make this a HashMap<Locale,SoftReference<ResourceBundle>>
   6.603 +            // and for efficiency, keep a hard reference to the bundle for the task
   6.604 +            // locale
   6.605 +            bundles = new HashMap<Locale, ResourceBundle>();
   6.606 +        }
   6.607 +
   6.608 +        if (locale == null)
   6.609 +            locale = Locale.getDefault();
   6.610 +
   6.611 +        ResourceBundle b = bundles.get(locale);
   6.612 +        if (b == null) {
   6.613 +            try {
   6.614 +                b = ResourceBundle.getBundle("com.sun.tools.javah.resources.l10n", locale);
   6.615 +                bundles.put(locale, b);
   6.616 +            } catch (MissingResourceException e) {
   6.617 +                throw new InternalError("Cannot find javah resource bundle for locale " + locale, e);
   6.618 +            }
   6.619 +        }
   6.620 +
   6.621 +        try {
   6.622 +            return MessageFormat.format(b.getString(key), args);
   6.623 +        } catch (MissingResourceException e) {
   6.624 +            return key;
   6.625 +            //throw new InternalError(e, key);
   6.626 +        }
   6.627 +    }
   6.628 +
   6.629 +    File ofile;
   6.630 +    File odir;
   6.631 +    String bootcp;
   6.632 +    String usercp;
   6.633 +    List<String> classes;
   6.634 +    boolean verbose;
   6.635 +    boolean help;
   6.636 +    boolean trace;
   6.637 +    boolean version;
   6.638 +    boolean fullVersion;
   6.639 +    boolean jni;
   6.640 +    boolean llni;
   6.641 +    boolean doubleAlign;
   6.642 +    boolean force;
   6.643 +    boolean old;
   6.644 +
   6.645 +    PrintWriter log;
   6.646 +    JavaFileManager fileManager;
   6.647 +    DiagnosticListener<? super JavaFileObject> diagnosticListener;
   6.648 +    Locale task_locale;
   6.649 +    Map<Locale, ResourceBundle> bundles;
   6.650 +
   6.651 +    private static final String progname = "javah";
   6.652 +
   6.653 +    @SupportedAnnotationTypes("*")
   6.654 +    @SupportedSourceVersion(SourceVersion.RELEASE_7)
   6.655 +    class JavahProcessor extends AbstractProcessor {
   6.656 +        JavahProcessor(Gen g) {
   6.657 +            this.g = g;
   6.658 +        }
   6.659 +
   6.660 +        public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
   6.661 +            Messager messager  = processingEnv.getMessager();
   6.662 +            Set<TypeElement> classes = getAllClasses(ElementFilter.typesIn(roundEnv.getRootElements()));
   6.663 +            if (classes.size() > 0) {
   6.664 +                checkMethodParameters(classes);
   6.665 +                g.setProcessingEnvironment(processingEnv);
   6.666 +                g.setClasses(classes);
   6.667 +
   6.668 +                try {
   6.669 +                    g.run();
   6.670 +                } catch (ClassNotFoundException cnfe) {
   6.671 +                    messager.printMessage(Diagnostic.Kind.ERROR, getMessage("class.not.found", cnfe.getMessage()));
   6.672 +                } catch (IOException ioe) {
   6.673 +                    messager.printMessage(Diagnostic.Kind.ERROR, getMessage("io.exception", ioe.getMessage()));
   6.674 +                } catch (Util.Exit e) {
   6.675 +                    exit = e;
   6.676 +                }
   6.677 +            }
   6.678 +            return true;
   6.679 +        }
   6.680 +
   6.681 +        private Set<TypeElement> getAllClasses(Set<? extends TypeElement> classes) {
   6.682 +            Set<TypeElement> allClasses = new LinkedHashSet<TypeElement>();
   6.683 +            getAllClasses0(classes, allClasses);
   6.684 +            return allClasses;
   6.685 +        }
   6.686 +
   6.687 +        private void getAllClasses0(Iterable<? extends TypeElement> classes, Set<TypeElement> allClasses) {
   6.688 +            for (TypeElement c: classes) {
   6.689 +                allClasses.add(c);
   6.690 +                getAllClasses0(ElementFilter.typesIn(c.getEnclosedElements()), allClasses);
   6.691 +            }
   6.692 +        }
   6.693 +
   6.694 +        // 4942232:
   6.695 +        // check that classes exist for all the parameters of native methods
   6.696 +        private void checkMethodParameters(Set<TypeElement> classes) {
   6.697 +            Types types = processingEnv.getTypeUtils();
   6.698 +            for (TypeElement te: classes) {
   6.699 +                for (ExecutableElement ee: ElementFilter.methodsIn(te.getEnclosedElements())) {
   6.700 +                    for (VariableElement ve: ee.getParameters()) {
   6.701 +                        TypeMirror tm = ve.asType();
   6.702 +                        checkMethodParametersVisitor.visit(tm, types);
   6.703 +                    }
   6.704 +                }
   6.705 +            }
   6.706 +        }
   6.707 +
   6.708 +        private TypeVisitor<Void,Types> checkMethodParametersVisitor =
   6.709 +                new SimpleTypeVisitor6<Void,Types>() {
   6.710 +            @Override
   6.711 +            public Void visitArray(ArrayType t, Types types) {
   6.712 +                visit(t.getComponentType(), types);
   6.713 +                return null;
   6.714 +            }
   6.715 +            @Override
   6.716 +            public Void visitDeclared(DeclaredType t, Types types) {
   6.717 +                t.asElement().getKind(); // ensure class exists
   6.718 +                for (TypeMirror st: types.directSupertypes(t))
   6.719 +                    visit(st, types);
   6.720 +                return null;
   6.721 +            }
   6.722 +        };
   6.723 +
   6.724 +        private Gen g;
   6.725 +        private Util.Exit exit;
   6.726 +    }
   6.727 +}
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/src/share/classes/com/sun/tools/javah/JavahTool.java	Wed Sep 23 19:15:04 2009 -0700
     7.3 @@ -0,0 +1,84 @@
     7.4 +/*
     7.5 + * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
     7.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.7 + *
     7.8 + * This code is free software; you can redistribute it and/or modify it
     7.9 + * under the terms of the GNU General Public License version 2 only, as
    7.10 + * published by the Free Software Foundation.  Sun designates this
    7.11 + * particular file as subject to the "Classpath" exception as provided
    7.12 + * by Sun in the LICENSE file that accompanied this code.
    7.13 + *
    7.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    7.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    7.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    7.17 + * version 2 for more details (a copy is included in the LICENSE file that
    7.18 + * accompanied this code).
    7.19 + *
    7.20 + * You should have received a copy of the GNU General Public License version
    7.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    7.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    7.23 + *
    7.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    7.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
    7.26 + * have any questions.
    7.27 + */
    7.28 +
    7.29 +package com.sun.tools.javah;
    7.30 +
    7.31 +import java.io.InputStream;
    7.32 +import java.io.OutputStream;
    7.33 +import java.io.Writer;
    7.34 +import java.nio.charset.Charset;
    7.35 +import java.util.Arrays;
    7.36 +import java.util.EnumSet;
    7.37 +import java.util.Locale;
    7.38 +import java.util.Set;
    7.39 +import javax.lang.model.SourceVersion;
    7.40 +import javax.tools.DiagnosticListener;
    7.41 +import javax.tools.JavaFileManager;
    7.42 +import javax.tools.JavaFileObject;
    7.43 +import javax.tools.StandardJavaFileManager;
    7.44 +
    7.45 +/*
    7.46 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
    7.47 + * If you write code that depends on this, you do so at your own
    7.48 + * risk.  This code and its internal interfaces are subject to change
    7.49 + * or deletion without notice.</b></p>
    7.50 + */
    7.51 +public class JavahTool implements NativeHeaderTool {
    7.52 +
    7.53 +    public NativeHeaderTask getTask(Writer out,
    7.54 +            JavaFileManager fileManager,
    7.55 +            DiagnosticListener<? super JavaFileObject> diagnosticListener,
    7.56 +            Iterable<String> options,
    7.57 +            Iterable<String> classes) {
    7.58 +        return new JavahTask(out, fileManager, diagnosticListener, options, classes);
    7.59 +    }
    7.60 +
    7.61 +    public StandardJavaFileManager getStandardFileManager(DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) {
    7.62 +        return JavahTask.getDefaultFileManager(diagnosticListener, null);
    7.63 +    }
    7.64 +
    7.65 +    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {
    7.66 +        JavahTask t = new JavahTask(
    7.67 +                JavahTask.getPrintWriterForStream(out),
    7.68 +                null,
    7.69 +                null,
    7.70 +                Arrays.asList(arguments),
    7.71 +                null);
    7.72 +        return (t.run() ? 0 : 1);
    7.73 +    }
    7.74 +
    7.75 +    public Set<SourceVersion> getSourceVersions() {
    7.76 +        return EnumSet.allOf(SourceVersion.class);
    7.77 +    }
    7.78 +
    7.79 +    public int isSupportedOption(String option) {
    7.80 +        JavahTask.Option[] options = JavahTask.recognizedOptions;
    7.81 +        for (int i = 0; i < options.length; i++) {
    7.82 +            if (options[i].matches(option))
    7.83 +                return (options[i].hasArg ? 1 : 0);
    7.84 +        }
    7.85 +        return -1;
    7.86 +    }
    7.87 +}
     8.1 --- a/src/share/classes/com/sun/tools/javah/LLNI.java	Wed Sep 23 18:48:13 2009 -0700
     8.2 +++ b/src/share/classes/com/sun/tools/javah/LLNI.java	Wed Sep 23 19:15:04 2009 -0700
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright 2002-2005 Sun Microsystems, Inc.  All Rights Reserved.
     8.6 + * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
     8.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.8   *
     8.9   * This code is free software; you can redistribute it and/or modify it
    8.10 @@ -26,49 +26,65 @@
    8.11  
    8.12  package com.sun.tools.javah;
    8.13  
    8.14 -import java.io.File;
    8.15  import java.io.OutputStream;
    8.16  import java.io.PrintWriter;
    8.17 -import java.util.Hashtable;
    8.18 -import com.sun.javadoc.*;
    8.19 +import java.util.ArrayList;
    8.20 +import java.util.HashSet;
    8.21 +import java.util.List;
    8.22  
    8.23 - /*
    8.24 -  * @author  Sucheta Dambalkar(Revised)
    8.25 -  */
    8.26 +import java.util.Set;
    8.27 +import javax.lang.model.element.Element;
    8.28 +import javax.lang.model.element.ExecutableElement;
    8.29 +import javax.lang.model.element.Modifier;
    8.30 +import javax.lang.model.element.Name;
    8.31 +import javax.lang.model.element.TypeElement;
    8.32 +import javax.lang.model.element.VariableElement;
    8.33 +import javax.lang.model.type.ArrayType;
    8.34 +import javax.lang.model.type.PrimitiveType;
    8.35 +import javax.lang.model.type.TypeKind;
    8.36 +import javax.lang.model.type.TypeMirror;
    8.37 +import javax.lang.model.type.TypeVisitor;
    8.38 +import javax.lang.model.util.ElementFilter;
    8.39 +import javax.lang.model.util.SimpleTypeVisitor6;
    8.40 +
    8.41 +/*
    8.42 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
    8.43 + * If you write code that depends on this, you do so at your own
    8.44 + * risk.  This code and its internal interfaces are subject to change
    8.45 + * or deletion without notice.</b></p>
    8.46 + *
    8.47 + * @author  Sucheta Dambalkar(Revised)
    8.48 + */
    8.49  public class LLNI extends Gen {
    8.50  
    8.51 -    protected final char  pathChar = File.separatorChar;
    8.52      protected final char  innerDelim = '$';     /* For inner classes */
    8.53 -    protected Hashtable<Object, Object>   doneHandleTypes;
    8.54 -    MemberDoc []fields;
    8.55 -    MemberDoc [] methods;
    8.56 +    protected Set<String>  doneHandleTypes;
    8.57 +    List<VariableElement> fields;
    8.58 +    List<ExecutableElement> methods;
    8.59      private boolean       doubleAlign;
    8.60      private int           padFieldNum = 0;
    8.61  
    8.62 -
    8.63 -    LLNI(boolean doubleAlign, RootDoc root) {
    8.64 -        super(root);
    8.65 +    LLNI(boolean doubleAlign, Util util) {
    8.66 +        super(util);
    8.67          this.doubleAlign = doubleAlign;
    8.68      }
    8.69  
    8.70 -
    8.71      protected String getIncludes() {
    8.72          return "";
    8.73      }
    8.74  
    8.75 -    protected void write(OutputStream o, ClassDoc clazz)
    8.76 -        throws ClassNotFoundException {
    8.77 -        String cname     = mangleClassName(clazz.qualifiedName());
    8.78 +    protected void write(OutputStream o, TypeElement clazz) throws Util.Exit {
    8.79 +        String cname     = mangleClassName(clazz.getQualifiedName().toString());
    8.80          PrintWriter pw   = wrapWriter(o);
    8.81 -        fields = clazz.fields();
    8.82 -        methods = clazz.methods();
    8.83 +        fields = ElementFilter.fieldsIn(clazz.getEnclosedElements());
    8.84 +        methods = ElementFilter.methodsIn(clazz.getEnclosedElements());
    8.85          generateDeclsForClass(pw, clazz, cname);
    8.86 +        // FIXME check if errors occurred on the PrintWriter and throw exception if so
    8.87      }
    8.88  
    8.89      protected void generateDeclsForClass(PrintWriter pw,
    8.90 -                                         ClassDoc clazz, String cname)
    8.91 -        throws ClassNotFoundException {
    8.92 -        doneHandleTypes  = new Hashtable<Object, Object>();
    8.93 +            TypeElement clazz, String cname) throws Util.Exit {
    8.94 +        doneHandleTypes  = new HashSet<String>();
    8.95          /* The following handle types are predefined in "typedefs.h". Suppress
    8.96             inclusion in the output by generating them "into the blue" here. */
    8.97          genHandleType(null, "java.lang.Class");
    8.98 @@ -79,7 +95,7 @@
    8.99          genHandleType(null, "java.lang.ThreadGroup");
   8.100          genHandleType(null, "java.lang.Throwable");
   8.101  
   8.102 -        pw.println("/* LLNI Header for class " + clazz.qualifiedName() + " */" + lineSep);
   8.103 +        pw.println("/* LLNI Header for class " + clazz.getQualifiedName() + " */" + lineSep);
   8.104          pw.println("#ifndef _Included_" + cname);
   8.105          pw.println("#define _Included_" + cname);
   8.106          pw.println("#include \"typedefs.h\"");
   8.107 @@ -94,8 +110,8 @@
   8.108  
   8.109      protected void genHandleType(PrintWriter pw, String clazzname) {
   8.110          String cname = mangleClassName(clazzname);
   8.111 -        if (!doneHandleTypes.containsKey(cname)) {
   8.112 -            doneHandleTypes.put(cname, cname);
   8.113 +        if (!doneHandleTypes.contains(cname)) {
   8.114 +            doneHandleTypes.add(cname);
   8.115              if (pw != null) {
   8.116                  pw.println("#ifndef DEFINED_" + cname);
   8.117                  pw.println("    #define DEFINED_" + cname);
   8.118 @@ -107,31 +123,29 @@
   8.119  
   8.120      protected String mangleClassName(String s) {
   8.121          return s.replace('.', '_')
   8.122 -            .replace(pathChar, '_')
   8.123 +            .replace('/', '_')
   8.124              .replace(innerDelim, '_');
   8.125      }
   8.126  
   8.127 -    protected void forwardDecls(PrintWriter pw, ClassDoc clazz)
   8.128 -        throws ClassNotFoundException {
   8.129 -        ClassDoc clazzfield = null;
   8.130 +    protected void forwardDecls(PrintWriter pw, TypeElement clazz) {
   8.131 +        TypeElement object = elems.getTypeElement("java.lang.Object");
   8.132 +        if (clazz.equals(object))
   8.133 +            return;
   8.134  
   8.135 -        if (clazz.qualifiedName().equals("java.lang.Object"))
   8.136 -            return;
   8.137 -        genHandleType(pw, clazz.qualifiedName());
   8.138 -        ClassDoc superClass = clazz.superclass();
   8.139 +        genHandleType(pw, clazz.getQualifiedName().toString());
   8.140 +        TypeElement superClass = (TypeElement) (types.asElement(clazz.getSuperclass()));
   8.141  
   8.142 -        if(superClass != null){
   8.143 -            String superClassName = superClass.qualifiedName();
   8.144 +        if (superClass != null) {
   8.145 +            String superClassName = superClass.getQualifiedName().toString();
   8.146              forwardDecls(pw, superClass);
   8.147          }
   8.148  
   8.149 -        for (int i = 0; i < fields.length; i++) {
   8.150 -            FieldDoc field = (FieldDoc)fields[i];
   8.151 +        for (VariableElement field: fields) {
   8.152  
   8.153 -            if (!field.isStatic()) {
   8.154 -                Type t = field.type();
   8.155 -                String tname = t.qualifiedTypeName();
   8.156 -                TypeSignature newTypeSig = new TypeSignature(root);
   8.157 +            if (!field.getModifiers().contains(Modifier.STATIC)) {
   8.158 +                TypeMirror t = types.erasure(field.asType());
   8.159 +                TypeSignature newTypeSig = new TypeSignature(elems);
   8.160 +                String tname = newTypeSig.qualifiedTypeName(t);
   8.161                  String sig = newTypeSig.getTypeSignature(tname);
   8.162  
   8.163                  if (sig.charAt(0) != '[')
   8.164 @@ -139,13 +153,12 @@
   8.165              }
   8.166          }
   8.167  
   8.168 -        for (int i = 0; i < methods.length; i++) {
   8.169 -            MethodDoc method = (MethodDoc)methods[i];
   8.170 +        for (ExecutableElement method: methods) {
   8.171  
   8.172 -            if (method.isNative()) {
   8.173 -                Type retType = method.returnType();
   8.174 -                String typesig = method.signature();
   8.175 -                TypeSignature newTypeSig = new TypeSignature(root);
   8.176 +            if (method.getModifiers().contains(Modifier.NATIVE)) {
   8.177 +                TypeMirror retType = types.erasure(method.getReturnType());
   8.178 +                String typesig = signature(method);
   8.179 +                TypeSignature newTypeSig = new TypeSignature(elems);
   8.180                  String sig = newTypeSig.getTypeSignature(typesig, retType);
   8.181  
   8.182                  if (sig.charAt(0) != '[')
   8.183 @@ -173,10 +186,9 @@
   8.184      }
   8.185  
   8.186      protected void structSectionForClass(PrintWriter pw,
   8.187 -                                         ClassDoc jclazz, String cname)
   8.188 -        throws ClassNotFoundException {
   8.189 +                                         TypeElement jclazz, String cname) {
   8.190  
   8.191 -        String jname = jclazz.qualifiedName();
   8.192 +        String jname = jclazz.getQualifiedName().toString();
   8.193  
   8.194          if (cname.equals("java_lang_Object")) {
   8.195              pw.println("/* struct java_lang_Object is defined in typedefs.h. */");
   8.196 @@ -207,8 +219,8 @@
   8.197          public boolean bottomMost;
   8.198          public boolean printedOne = false;
   8.199  
   8.200 -        FieldDefsRes(ClassDoc clazz, FieldDefsRes parent, boolean bottomMost) {
   8.201 -            this.className = clazz.qualifiedName();
   8.202 +        FieldDefsRes(TypeElement clazz, FieldDefsRes parent, boolean bottomMost) {
   8.203 +            this.className = clazz.getQualifiedName().toString();
   8.204              this.parent = parent;
   8.205              this.bottomMost = bottomMost;
   8.206              int byteSize = 0;
   8.207 @@ -218,9 +230,8 @@
   8.208      }
   8.209  
   8.210      /* Returns "true" iff added a field. */
   8.211 -    private boolean doField(FieldDefsRes res, FieldDoc field,
   8.212 -                            String cname, boolean padWord)
   8.213 -        throws ClassNotFoundException {
   8.214 +    private boolean doField(FieldDefsRes res, VariableElement field,
   8.215 +                            String cname, boolean padWord) {
   8.216  
   8.217          String fieldDef = addStructMember(field, cname, padWord);
   8.218          if (fieldDef != null) {
   8.219 @@ -242,16 +253,14 @@
   8.220          return false;
   8.221      }
   8.222  
   8.223 -    private int doTwoWordFields(FieldDefsRes res, ClassDoc clazz,
   8.224 -                                int offset, String cname, boolean padWord)
   8.225 -        throws ClassNotFoundException {
   8.226 +    private int doTwoWordFields(FieldDefsRes res, TypeElement clazz,
   8.227 +                                int offset, String cname, boolean padWord) {
   8.228          boolean first = true;
   8.229 -        FieldDoc[] fields = clazz.fields();
   8.230 +        List<VariableElement> fields = ElementFilter.fieldsIn(clazz.getEnclosedElements());
   8.231  
   8.232 -        for (int i = 0; i <fields.length; i++) {
   8.233 -            FieldDoc field = fields[i];
   8.234 -            String tc =field.type().typeName();
   8.235 -            boolean twoWords = (tc.equals("long") || tc.equals("double"));
   8.236 +        for (VariableElement field: fields) {
   8.237 +            TypeKind tk = field.asType().getKind();
   8.238 +            boolean twoWords = (tk == TypeKind.LONG || tk == TypeKind.DOUBLE);
   8.239              if (twoWords && doField(res, field, cname, first && padWord)) {
   8.240                  offset += 8; first = false;
   8.241              }
   8.242 @@ -259,22 +268,21 @@
   8.243          return offset;
   8.244      }
   8.245  
   8.246 -    protected String fieldDefs(ClassDoc clazz, String cname)
   8.247 -        throws ClassNotFoundException {
   8.248 +    String fieldDefs(TypeElement clazz, String cname) {
   8.249          FieldDefsRes res = fieldDefs(clazz, cname, true);
   8.250          return res.s;
   8.251      }
   8.252  
   8.253 -    protected FieldDefsRes fieldDefs(ClassDoc clazz, String cname,
   8.254 -                                     boolean bottomMost)
   8.255 -        throws ClassNotFoundException {
   8.256 +    FieldDefsRes fieldDefs(TypeElement clazz, String cname,
   8.257 +                                     boolean bottomMost){
   8.258          FieldDefsRes res;
   8.259          int offset;
   8.260          boolean didTwoWordFields = false;
   8.261 -        ClassDoc superclazz = clazz.superclass();
   8.262 +
   8.263 +        TypeElement superclazz = (TypeElement) types.asElement(clazz.getSuperclass());
   8.264  
   8.265          if (superclazz != null) {
   8.266 -            String supername = superclazz.qualifiedName();
   8.267 +            String supername = superclazz.getQualifiedName().toString();
   8.268              res = new FieldDefsRes(clazz,
   8.269                                     fieldDefs(superclazz, cname, false),
   8.270                                     bottomMost);
   8.271 @@ -284,18 +292,17 @@
   8.272              offset = 0;
   8.273          }
   8.274  
   8.275 -        FieldDoc[] fields = clazz.fields();
   8.276 +        List<VariableElement> fields = ElementFilter.fieldsIn(clazz.getEnclosedElements());
   8.277  
   8.278 -        for (int i = 0; i < fields.length; i++) {
   8.279 -            FieldDoc field = fields[i];
   8.280 +        for (VariableElement field: fields) {
   8.281  
   8.282              if (doubleAlign && !didTwoWordFields && (offset % 8) == 0) {
   8.283                  offset = doTwoWordFields(res, clazz, offset, cname, false);
   8.284                  didTwoWordFields = true;
   8.285              }
   8.286  
   8.287 -            String tc = field.type().typeName();
   8.288 -            boolean twoWords = (tc.equals("long") ||tc.equals("double"));
   8.289 +            TypeKind tk = field.asType().getKind();
   8.290 +            boolean twoWords = (tk == TypeKind.LONG || tk == TypeKind.DOUBLE);
   8.291  
   8.292              if (!doubleAlign || !twoWords) {
   8.293                  if (doField(res, field, cname, false)) offset += 4;
   8.294 @@ -313,19 +320,19 @@
   8.295      }
   8.296  
   8.297      /* OVERRIDE: This method handles instance fields */
   8.298 -    protected String addStructMember(FieldDoc member, String cname,
   8.299 -                                     boolean padWord)
   8.300 -        throws ClassNotFoundException {
   8.301 +    protected String addStructMember(VariableElement member, String cname,
   8.302 +                                     boolean padWord) {
   8.303          String res = null;
   8.304  
   8.305 -        if (member.isStatic()) {
   8.306 +        if (member.getModifiers().contains(Modifier.STATIC)) {
   8.307              res = addStaticStructMember(member, cname);
   8.308              //   if (res == null) /* JNI didn't handle it, print comment. */
   8.309              //  res = "    /* Inaccessible static: " + member + " */" + lineSep;
   8.310          } else {
   8.311 +            TypeMirror mt = types.erasure(member.asType());
   8.312              if (padWord) res = "    java_int padWord" + padFieldNum++ + ";" + lineSep;
   8.313 -            res = "    " + llniType(member.type(), false, false) + " " + llniFieldName(member);
   8.314 -            if (isLongOrDouble(member.type())) res = res + "[2]";
   8.315 +            res = "    " + llniType(mt, false, false) + " " + llniFieldName(member);
   8.316 +            if (isLongOrDouble(mt)) res = res + "[2]";
   8.317              res = res + ";" + lineSep;
   8.318          }
   8.319          return res;
   8.320 @@ -337,36 +344,42 @@
   8.321      /*
   8.322       * This method only handles static final fields.
   8.323       */
   8.324 -    protected String addStaticStructMember(FieldDoc field, String cname)
   8.325 -        throws ClassNotFoundException {
   8.326 +    protected String addStaticStructMember(VariableElement field, String cname) {
   8.327          String res = null;
   8.328          Object exp = null;
   8.329  
   8.330 -        if (!field.isStatic())
   8.331 +        if (!field.getModifiers().contains(Modifier.STATIC))
   8.332              return res;
   8.333 -        if (!field.isFinal())
   8.334 +        if (!field.getModifiers().contains(Modifier.FINAL))
   8.335              return res;
   8.336  
   8.337 -        exp = field.constantValue();
   8.338 +        exp = field.getConstantValue();
   8.339  
   8.340          if (exp != null) {
   8.341              /* Constant. */
   8.342  
   8.343 -            String     cn     = cname + "_" + field.name();
   8.344 +            String     cn     = cname + "_" + field.getSimpleName();
   8.345              String     suffix = null;
   8.346              long           val = 0;
   8.347              /* Can only handle int, long, float, and double fields. */
   8.348 -            if (exp instanceof Integer) {
   8.349 +            if (exp instanceof Byte
   8.350 +                || exp instanceof Short
   8.351 +                || exp instanceof Integer) {
   8.352                  suffix = "L";
   8.353 -                val = ((Integer)exp).intValue();
   8.354 +                val = ((Number)exp).intValue();
   8.355              }
   8.356 -            if (exp instanceof Long) {
   8.357 +            else if (exp instanceof Long) {
   8.358                  // Visual C++ supports the i64 suffix, not LL
   8.359                  suffix = isWindows ? "i64" : "LL";
   8.360                  val = ((Long)exp).longValue();
   8.361              }
   8.362 -            if (exp instanceof Float)  suffix = "f";
   8.363 -            if (exp instanceof Double) suffix = "";
   8.364 +            else if (exp instanceof Float)  suffix = "f";
   8.365 +            else if (exp instanceof Double) suffix = "";
   8.366 +            else if (exp instanceof Character) {
   8.367 +                suffix = "L";
   8.368 +                Character ch = (Character) exp;
   8.369 +                val = ((int) ch) & 0xffff;
   8.370 +            }
   8.371              if (suffix != null) {
   8.372                  // Some compilers will generate a spurious warning
   8.373                  // for the integer constants for Integer.MIN_VALUE
   8.374 @@ -376,9 +389,12 @@
   8.375                      res = "    #undef  " + cn + lineSep
   8.376                          + "    #define " + cn
   8.377                          + " (" + (val + 1) + suffix + "-1)" + lineSep;
   8.378 +                } else if (suffix.equals("L") || suffix.endsWith("LL")) {
   8.379 +                    res = "    #undef  " + cn + lineSep
   8.380 +                        + "    #define " + cn + " " + val + suffix + lineSep;
   8.381                  } else {
   8.382                      res = "    #undef  " + cn + lineSep
   8.383 -                        + "    #define " + cn + " "+ exp.toString() + suffix + lineSep;
   8.384 +                        + "    #define " + cn + " " + exp + suffix + lineSep;
   8.385                  }
   8.386              }
   8.387          }
   8.388 @@ -386,8 +402,8 @@
   8.389      }
   8.390  
   8.391      protected void methodSectionForClass(PrintWriter pw,
   8.392 -                                         ClassDoc clazz, String cname)
   8.393 -        throws ClassNotFoundException {
   8.394 +            TypeElement clazz, String cname)
   8.395 +            throws Util.Exit {
   8.396          String methods = methodDecls(clazz, cname);
   8.397  
   8.398          if (methods.length() != 0) {
   8.399 @@ -402,81 +418,77 @@
   8.400          }
   8.401      }
   8.402  
   8.403 -    protected String methodDecls(ClassDoc clazz, String cname)
   8.404 -        throws ClassNotFoundException {
   8.405 +    protected String methodDecls(TypeElement clazz, String cname) throws Util.Exit {
   8.406  
   8.407          String res = "";
   8.408 -        for (int i = 0; i < methods.length; i++) {
   8.409 -            MethodDoc method = (MethodDoc)methods[i];
   8.410 -            if (method.isNative())
   8.411 +        for (ExecutableElement method: methods) {
   8.412 +            if (method.getModifiers().contains(Modifier.NATIVE))
   8.413                  res = res + methodDecl(method, clazz, cname);
   8.414          }
   8.415          return res;
   8.416      }
   8.417  
   8.418 -    protected String methodDecl(MethodDoc method,
   8.419 -                                ClassDoc clazz, String cname)
   8.420 -        throws ClassNotFoundException {
   8.421 +    protected String methodDecl(ExecutableElement method,
   8.422 +                                TypeElement clazz, String cname)
   8.423 +    throws Util.Exit {
   8.424          String res = null;
   8.425  
   8.426 -        Type retType = method.returnType();
   8.427 -        String typesig = method.signature();
   8.428 -        TypeSignature newTypeSig = new TypeSignature(root);
   8.429 +        TypeMirror retType = types.erasure(method.getReturnType());
   8.430 +        String typesig = signature(method);
   8.431 +        TypeSignature newTypeSig = new TypeSignature(elems);
   8.432          String sig = newTypeSig.getTypeSignature(typesig, retType);
   8.433          boolean longName = needLongName(method, clazz);
   8.434  
   8.435          if (sig.charAt(0) != '(')
   8.436 -            Util.error("invalid.method.signature", sig);
   8.437 +            util.error("invalid.method.signature", sig);
   8.438  
   8.439  
   8.440          res = "JNIEXPORT " + jniType(retType) + " JNICALL" + lineSep + jniMethodName(method, cname, longName)
   8.441              + "(JNIEnv *, " + cRcvrDecl(method, cname);
   8.442 -        Parameter[] params = method.parameters();
   8.443 -        Type argTypes[] = new Type[params.length];
   8.444 -        for(int p = 0; p <  params.length; p++){
   8.445 -            argTypes[p] =  params[p].type();
   8.446 +        List<? extends VariableElement> params = method.getParameters();
   8.447 +        List<TypeMirror> argTypes = new ArrayList<TypeMirror>();
   8.448 +        for (VariableElement p: params){
   8.449 +            argTypes.add(types.erasure(p.asType()));
   8.450          }
   8.451  
   8.452          /* It would have been nice to include the argument names in the
   8.453             declaration, but there seems to be a bug in the "BinaryField"
   8.454             class, causing the getArguments() method to return "null" for
   8.455             most (non-constructor) methods. */
   8.456 -        for (int i = 0; i < argTypes.length; i++)
   8.457 -            res = res + ", " + jniType(argTypes[i]);
   8.458 +        for (TypeMirror argType: argTypes)
   8.459 +            res = res + ", " + jniType(argType);
   8.460          res = res + ");" + lineSep;
   8.461          return res;
   8.462      }
   8.463  
   8.464 -    protected final boolean needLongName(MethodDoc method,
   8.465 -                                         ClassDoc clazz)
   8.466 -        throws ClassNotFoundException {
   8.467 -        String methodName = method.name();
   8.468 -        for (int i = 0; i < methods.length; i++) {
   8.469 -            MethodDoc memberMethod = (MethodDoc) methods[i];
   8.470 +    protected final boolean needLongName(ExecutableElement method,
   8.471 +                                         TypeElement clazz) {
   8.472 +        Name methodName = method.getSimpleName();
   8.473 +        for (ExecutableElement memberMethod: methods) {
   8.474              if ((memberMethod != method) &&
   8.475 -                memberMethod.isNative() && (methodName == memberMethod.name()))
   8.476 +                memberMethod.getModifiers().contains(Modifier.NATIVE) &&
   8.477 +                    (methodName.equals(memberMethod.getSimpleName())))
   8.478                  return true;
   8.479          }
   8.480          return false;
   8.481      }
   8.482  
   8.483 -    protected final String jniMethodName(MethodDoc method, String cname,
   8.484 +    protected final String jniMethodName(ExecutableElement method, String cname,
   8.485                                           boolean longName) {
   8.486 -        String res = "Java_" + cname + "_" + method.name();
   8.487 +        String res = "Java_" + cname + "_" + method.getSimpleName();
   8.488  
   8.489          if (longName) {
   8.490 -            Type mType =  method.returnType();
   8.491 -            Parameter[] params = method.parameters();
   8.492 -            Type argTypes[] = new Type[params.length];
   8.493 -            for(int p = 0; p <  params.length; p++){
   8.494 -                argTypes[p] =  params[p].type();
   8.495 +            TypeMirror mType =  types.erasure(method.getReturnType());
   8.496 +            List<? extends VariableElement> params = method.getParameters();
   8.497 +            List<TypeMirror> argTypes = new ArrayList<TypeMirror>();
   8.498 +            for (VariableElement param: params) {
   8.499 +                argTypes.add(types.erasure(param.asType()));
   8.500              }
   8.501  
   8.502              res = res + "__";
   8.503 -            for (int i = 0; i < argTypes.length; i++){
   8.504 -                Type t = argTypes[i];
   8.505 -                String tname = t.typeName();
   8.506 -                TypeSignature newTypeSig = new TypeSignature(root);
   8.507 +            for (TypeMirror t: argTypes) {
   8.508 +                String tname = t.toString();
   8.509 +                TypeSignature newTypeSig = new TypeSignature(elems);
   8.510                  String sig = newTypeSig.getTypeSignature(tname);
   8.511                  res = res + nameToIdentifier(sig);
   8.512              }
   8.513 @@ -484,88 +496,143 @@
   8.514          return res;
   8.515      }
   8.516  
   8.517 -    protected final String jniType(Type t) {
   8.518 -        String elmT =t.typeName();
   8.519 -        if (t.dimension().indexOf("[]") != -1) {
   8.520 -            if(elmT.equals("boolean"))return "jbooleanArray";
   8.521 -            else if(elmT.equals("byte"))return "jbyteArray";
   8.522 -            else if(elmT.equals("char"))return "jcharArray";
   8.523 -            else if(elmT.equals("short"))return "jshortArray";
   8.524 -            else if(elmT.equals("int"))return "jintArray";
   8.525 -            else if(elmT.equals("long"))return "jlongArray";
   8.526 -            else if(elmT.equals("float"))return "jfloatArray";
   8.527 -            else if(elmT.equals("double"))return "jdoubleArray";
   8.528 -            else if((t.dimension().indexOf("[][]") != -1) || (t.asClassDoc() != null))  return "jobjectArray";
   8.529 -        } else {
   8.530 -            if(elmT.equals("void"))return "void";
   8.531 -            else if(elmT.equals("boolean"))return "jboolean";
   8.532 -            else if(elmT.equals("byte"))return "jbyte";
   8.533 -            else if(elmT.equals("char"))return "jchar";
   8.534 -            else if(elmT.equals("short"))return "jshort";
   8.535 -            else if(elmT.equals("int"))return "jint";
   8.536 -            else if(elmT.equals("long"))return "jlong";
   8.537 -            else if(elmT.equals("float"))return "jfloat";
   8.538 -            else if(elmT.equals("double"))return "jdouble";
   8.539 -            else if (t.asClassDoc() != null) {
   8.540 -                if (elmT.equals("String"))
   8.541 +    // copied from JNI.java
   8.542 +    protected final String jniType(TypeMirror t) throws Util.Exit {
   8.543 +        TypeElement throwable = elems.getTypeElement("java.lang.Throwable");
   8.544 +        TypeElement jClass = elems.getTypeElement("java.lang.Class");
   8.545 +        TypeElement jString = elems.getTypeElement("java.lang.String");
   8.546 +        Element tclassDoc = types.asElement(t);
   8.547 +
   8.548 +        switch (t.getKind()) {
   8.549 +            case ARRAY: {
   8.550 +                TypeMirror ct = ((ArrayType) t).getComponentType();
   8.551 +                switch (ct.getKind()) {
   8.552 +                    case BOOLEAN:  return "jbooleanArray";
   8.553 +                    case BYTE:     return "jbyteArray";
   8.554 +                    case CHAR:     return "jcharArray";
   8.555 +                    case SHORT:    return "jshortArray";
   8.556 +                    case INT:      return "jintArray";
   8.557 +                    case LONG:     return "jlongArray";
   8.558 +                    case FLOAT:    return "jfloatArray";
   8.559 +                    case DOUBLE:   return "jdoubleArray";
   8.560 +                    case ARRAY:
   8.561 +                    case DECLARED: return "jobjectArray";
   8.562 +                    default: throw new Error(ct.toString());
   8.563 +                }
   8.564 +            }
   8.565 +
   8.566 +            case VOID:     return "void";
   8.567 +            case BOOLEAN:  return "jboolean";
   8.568 +            case BYTE:     return "jbyte";
   8.569 +            case CHAR:     return "jchar";
   8.570 +            case SHORT:    return "jshort";
   8.571 +            case INT:      return "jint";
   8.572 +            case LONG:     return "jlong";
   8.573 +            case FLOAT:    return "jfloat";
   8.574 +            case DOUBLE:   return "jdouble";
   8.575 +
   8.576 +            case DECLARED: {
   8.577 +                if (tclassDoc.equals(jString))
   8.578                      return "jstring";
   8.579 -                else if (t.asClassDoc().subclassOf(root.classNamed("java.lang.Class")))
   8.580 +                else if (types.isAssignable(t, throwable.asType()))
   8.581 +                    return "jthrowable";
   8.582 +                else if (types.isAssignable(t, jClass.asType()))
   8.583                      return "jclass";
   8.584                  else
   8.585                      return "jobject";
   8.586              }
   8.587          }
   8.588 -        Util.bug("jni.unknown.type");
   8.589 +
   8.590 +        util.bug("jni.unknown.type");
   8.591          return null; /* dead code. */
   8.592      }
   8.593  
   8.594 -    protected String llniType(Type t, boolean handleize, boolean longDoubleOK) {
   8.595 +    protected String llniType(TypeMirror t, boolean handleize, boolean longDoubleOK) {
   8.596          String res = null;
   8.597 -        String elmt = t.typeName();
   8.598 -        if (t.dimension().indexOf("[]") != -1) {
   8.599 -            if((t.dimension().indexOf("[][]") != -1)
   8.600 -               || (t.asClassDoc() != null)) res = "IArrayOfRef";
   8.601 -            else if(elmt.equals("boolean")) res =  "IArrayOfBoolean";
   8.602 -            else if(elmt.equals("byte")) res =  "IArrayOfByte";
   8.603 -            else if(elmt.equals("char")) res =  "IArrayOfChar";
   8.604 -            else if(elmt.equals("int")) res =  "IArrayOfInt";
   8.605 -            else if(elmt.equals("long")) res =  "IArrayOfLong";
   8.606 -            else if(elmt.equals("float")) res =  "IArrayOfFloat";
   8.607 -            else if(elmt.equals("double")) res =  "IArrayOfDouble";
   8.608 -            if (!handleize) res = "DEREFERENCED_" + res;
   8.609 -        } else {
   8.610 -            if(elmt.equals("void")) res =  "void";
   8.611 -            else if( (elmt.equals("boolean")) || (elmt.equals("byte"))
   8.612 -                     ||(elmt.equals("char")) || (elmt.equals("short"))
   8.613 -                     || (elmt.equals("int")))   res = "java_int";
   8.614 -            else   if(elmt.equals("long")) res = longDoubleOK
   8.615 -                                               ? "java_long" : "val32 /* java_long */";
   8.616 -            else   if(elmt.equals("float")) res =  "java_float";
   8.617 -            else   if(elmt.equals("double")) res =  res = longDoubleOK
   8.618 -                                                 ? "java_double" : "val32 /* java_double */";
   8.619 -            else if(t.asClassDoc() != null) {
   8.620 -                res = "I" +  mangleClassName(t.asClassDoc().qualifiedName());
   8.621 +
   8.622 +        switch (t.getKind()) {
   8.623 +            case ARRAY: {
   8.624 +                TypeMirror ct = ((ArrayType) t).getComponentType();
   8.625 +                switch (ct.getKind()) {
   8.626 +                    case BOOLEAN:  res = "IArrayOfBoolean"; break;
   8.627 +                    case BYTE:     res = "IArrayOfByte";    break;
   8.628 +                    case CHAR:     res = "IArrayOfChar";    break;
   8.629 +                    case SHORT:    res = "IArrayOfShort";   break;
   8.630 +                    case INT:      res = "IArrayOfInt";     break;
   8.631 +                    case LONG:     res = "IArrayOfLong";    break;
   8.632 +                    case FLOAT:    res = "IArrayOfFloat";   break;
   8.633 +                    case DOUBLE:   res = "IArrayOfDouble";  break;
   8.634 +                    case ARRAY:
   8.635 +                    case DECLARED: res = "IArrayOfRef";     break;
   8.636 +                    default: throw new Error(ct.getKind() + " " + ct);
   8.637 +                }
   8.638                  if (!handleize) res = "DEREFERENCED_" + res;
   8.639 +                break;
   8.640              }
   8.641 +
   8.642 +            case VOID:
   8.643 +                res = "void";
   8.644 +                break;
   8.645 +
   8.646 +            case BOOLEAN:
   8.647 +            case BYTE:
   8.648 +            case CHAR:
   8.649 +            case SHORT:
   8.650 +            case INT:
   8.651 +                res = "java_int" ;
   8.652 +                break;
   8.653 +
   8.654 +            case LONG:
   8.655 +                res = longDoubleOK ? "java_long" : "val32 /* java_long */";
   8.656 +                break;
   8.657 +
   8.658 +            case FLOAT:
   8.659 +                res =  "java_float";
   8.660 +                break;
   8.661 +
   8.662 +            case DOUBLE:
   8.663 +                res = longDoubleOK ? "java_double" : "val32 /* java_double */";
   8.664 +                break;
   8.665 +
   8.666 +            case DECLARED:
   8.667 +                TypeElement e  = (TypeElement) types.asElement(t);
   8.668 +                res = "I" +  mangleClassName(e.getQualifiedName().toString());
   8.669 +                if (!handleize) res = "DEREFERENCED_" + res;
   8.670 +                break;
   8.671 +
   8.672 +            default:
   8.673 +                throw new Error(t.getKind() + " " + t); // FIXME
   8.674          }
   8.675 +
   8.676          return res;
   8.677      }
   8.678  
   8.679 -    protected final String cRcvrDecl(MemberDoc field, String cname) {
   8.680 -        return (field.isStatic() ? "jclass" : "jobject");
   8.681 +    protected final String cRcvrDecl(Element field, String cname) {
   8.682 +        return (field.getModifiers().contains(Modifier.STATIC) ? "jclass" : "jobject");
   8.683      }
   8.684  
   8.685      protected String maskName(String s) {
   8.686          return "LLNI_mask(" + s + ")";
   8.687      }
   8.688  
   8.689 -    protected String llniFieldName(MemberDoc field) {
   8.690 -        return maskName(field.name());
   8.691 +    protected String llniFieldName(VariableElement field) {
   8.692 +        return maskName(field.getSimpleName().toString());
   8.693      }
   8.694  
   8.695 -    protected final boolean isLongOrDouble(Type t) {
   8.696 -        String tc = t.typeName();
   8.697 -        return (tc.equals("long") || tc.equals("double"));
   8.698 +    protected final boolean isLongOrDouble(TypeMirror t) {
   8.699 +        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor6<Boolean,Void>() {
   8.700 +            public Boolean defaultAction(TypeMirror t, Void p){
   8.701 +                return false;
   8.702 +            }
   8.703 +            public Boolean visitArray(ArrayType t, Void p) {
   8.704 +                return visit(t.getComponentType(), p);
   8.705 +            }
   8.706 +            public Boolean visitPrimitive(PrimitiveType t, Void p) {
   8.707 +                TypeKind tk = t.getKind();
   8.708 +                return (tk == TypeKind.LONG || tk == TypeKind.DOUBLE);
   8.709 +            }
   8.710 +        };
   8.711 +        return v.visit(t, null);
   8.712      }
   8.713  
   8.714      /* Do unicode to ansi C identifier conversion.
   8.715 @@ -602,3 +669,4 @@
   8.716              return false;
   8.717      }
   8.718  }
   8.719 +
     9.1 --- a/src/share/classes/com/sun/tools/javah/Main.java	Wed Sep 23 18:48:13 2009 -0700
     9.2 +++ b/src/share/classes/com/sun/tools/javah/Main.java	Wed Sep 23 19:15:04 2009 -0700
     9.3 @@ -1,5 +1,5 @@
     9.4  /*
     9.5 - * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
     9.6 + * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
     9.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.8   *
     9.9   * This code is free software; you can redistribute it and/or modify it
    9.10 @@ -23,134 +23,39 @@
    9.11   * have any questions.
    9.12   */
    9.13  
    9.14 -
    9.15  package com.sun.tools.javah;
    9.16  
    9.17 -
    9.18 -import java.io.*;
    9.19 +import java.io.PrintWriter;
    9.20  
    9.21  /**
    9.22 - * Javah generates support files for native methods.
    9.23 - * Parse commandline options & Invokes javadoc to execute those commands.
    9.24 + *  Main entry point.
    9.25   *
    9.26 - * @author Sucheta Dambalkar
    9.27 + *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
    9.28 + *  you write code that depends on this, you do so at your own risk.
    9.29 + *  This code and its internal interfaces are subject to change or
    9.30 + *  deletion without notice.</b>
    9.31   */
    9.32 -public class Main{
    9.33 -    /*
    9.34 -     * Parse arguments given for javah to give proper error messages.
    9.35 +public class Main {
    9.36 +    /**
    9.37 +     * Main entry point for the launcher.
    9.38 +     * Note: This method calls System.exit.
    9.39 +     * @param args command line arguments
    9.40       */
    9.41 -    public static void main(String[] args){
    9.42 -
    9.43 -        if (args.length == 0) {
    9.44 -            Util.usage(1);
    9.45 -        }
    9.46 -        for ( int i = 0; i < args.length; i++) {
    9.47 -            if (args[i].equals("-o")) {
    9.48 -                i++;
    9.49 -                if(i >= args.length){
    9.50 -                    Util.usage(1);
    9.51 -                }else if(args[i].charAt(0) == '-'){
    9.52 -                    Util.error("no.outputfile.specified");
    9.53 -                }else if((i+1) >= args.length){
    9.54 -                    Util.error("no.classes.specified");
    9.55 -                }
    9.56 -            } else if (args[i].equals("-d")) {
    9.57 -                i++;
    9.58 -                if(i >= args.length){
    9.59 -                    Util.usage(1);
    9.60 -                }else if(args[i].charAt(0) == '-')  {
    9.61 -                    Util.error("no.outputdir.specified");
    9.62 -                }else if((i+1) >= args.length){
    9.63 -                    Util.error("no.classes.specified");
    9.64 -                }
    9.65 -            } else if (args[i].equals("-td")) {
    9.66 -                /* Ignored.  Generate tmp files to memory. */
    9.67 -                i++;
    9.68 -                if (i == args.length)
    9.69 -                    Util.usage(1);
    9.70 -            } else if (args[i].equals("-stubs")) {
    9.71 -                if((i+1) >= args.length){
    9.72 -                    Util.error("no.classes.specified");
    9.73 -                }
    9.74 -            } else if (args[i].equals("-v") || args[i].equals("-verbose")) {
    9.75 -                if((i+1) >= args.length){
    9.76 -                    Util.error("no.classes.specified");
    9.77 -                }
    9.78 -                args[i] = "-verbose";
    9.79 -            } else if ((args[i].equals("-help")) || (args[i].equals("--help"))
    9.80 -                       || (args[i].equals("-?")) || (args[i].equals("-h"))) {
    9.81 -                Util.usage(0);
    9.82 -            } else if (args[i].equals("-trace")) {
    9.83 -                System.err.println(Util.getText("tracing.not.supported"));
    9.84 -            } else if (args[i].equals("-version")) {
    9.85 -                if((i+1) >= args.length){
    9.86 -                    Util.version();
    9.87 -                }
    9.88 -            } else if (args[i].equals("-jni")) {
    9.89 -                if((i+1) >= args.length){
    9.90 -                    Util.error("no.classes.specified");
    9.91 -                }
    9.92 -            } else if (args[i].equals("-force")) {
    9.93 -                if((i+1) >= args.length){
    9.94 -                    Util.error("no.classes.specified");
    9.95 -                }
    9.96 -            } else if (args[i].equals("-Xnew")) {
    9.97 -                // we're already using the new javah
    9.98 -            } else if (args[i].equals("-old")) {
    9.99 -                System.err.println(Util.getText("old.not.supported"));
   9.100 -                Util.usage(1);
   9.101 -            } else if (args[i].equals("-Xllni")) {
   9.102 -                if((i+1) >= args.length){
   9.103 -                    Util.error("no.classes.specified");
   9.104 -                }
   9.105 -            } else if (args[i].equals("-llni")) {
   9.106 -                if((i+1) >= args.length){
   9.107 -                    Util.error("no.classes.specified");
   9.108 -                }
   9.109 -            } else if (args[i].equals("-llniDouble")) {
   9.110 -                if((i+1) >= args.length){
   9.111 -                    Util.error("no.classes.specified");
   9.112 -                }
   9.113 -            } else if (args[i].equals("-classpath")) {
   9.114 -                i++;
   9.115 -                if(i >= args.length){
   9.116 -                    Util.usage(1);
   9.117 -                }else if(args[i].charAt(0) == '-') {
   9.118 -                    Util.error("no.classpath.specified");
   9.119 -                }else if((i+1) >= args.length){
   9.120 -                    Util.error("no.classes.specified");
   9.121 -                }
   9.122 -            } else if (args[i].equals("-bootclasspath")) {
   9.123 -                i++;
   9.124 -                if(i >= args.length){
   9.125 -                    Util.usage(1);
   9.126 -                }else if(args[i].charAt(0) == '-'){
   9.127 -                    Util.error("no.bootclasspath.specified");
   9.128 -                }else if((i+1) >= args.length){
   9.129 -                    Util.error("no.classes.specified");
   9.130 -                }
   9.131 -            } else if (args[i].charAt(0) == '-') {
   9.132 -                Util.error("unknown.option", args[i], null, true);
   9.133 -
   9.134 -            } else {
   9.135 -                //break; /* The rest must be classes. */
   9.136 -            }
   9.137 -        }
   9.138 -
   9.139 -        /* Invoke javadoc */
   9.140 -
   9.141 -        String[] javadocargs = new String[args.length + 2];
   9.142 -        int i = 0;
   9.143 -
   9.144 -        for(; i < args.length; i++) {
   9.145 -            javadocargs[i] = args[i];
   9.146 -        }
   9.147 -
   9.148 -        javadocargs[i] = "-private";
   9.149 -        i++;
   9.150 -        javadocargs[i] = "-Xclasses";
   9.151 -
   9.152 -        int rc = com.sun.tools.javadoc.Main.execute("javadoc", "com.sun.tools.javah.MainDoclet", javadocargs);
   9.153 +    public static void main(String[] args) {
   9.154 +        JavahTask t = new JavahTask();
   9.155 +        int rc = t.run(args);
   9.156          System.exit(rc);
   9.157      }
   9.158 +
   9.159 +    /**
   9.160 +     * Entry point that does <i>not</i> call System.exit.
   9.161 +     * @param args command line arguments
   9.162 +     * @param out output stream
   9.163 +     * @return an exit code. 0 means success, non-zero means an error occurred.
   9.164 +     */
   9.165 +    public static int run(String[] args, PrintWriter out) {
   9.166 +        JavahTask t = new JavahTask();
   9.167 +        t.setLog(out);
   9.168 +        return t.run(args);
   9.169 +    }
   9.170  }
    10.1 --- a/src/share/classes/com/sun/tools/javah/MainDoclet.java	Wed Sep 23 18:48:13 2009 -0700
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,218 +0,0 @@
    10.4 -/*
    10.5 - * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
    10.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.7 - *
    10.8 - * This code is free software; you can redistribute it and/or modify it
    10.9 - * under the terms of the GNU General Public License version 2 only, as
   10.10 - * published by the Free Software Foundation.  Sun designates this
   10.11 - * particular file as subject to the "Classpath" exception as provided
   10.12 - * by Sun in the LICENSE file that accompanied this code.
   10.13 - *
   10.14 - * This code is distributed in the hope that it will be useful, but WITHOUT
   10.15 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   10.16 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   10.17 - * version 2 for more details (a copy is included in the LICENSE file that
   10.18 - * accompanied this code).
   10.19 - *
   10.20 - * You should have received a copy of the GNU General Public License version
   10.21 - * 2 along with this work; if not, write to the Free Software Foundation,
   10.22 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   10.23 - *
   10.24 - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   10.25 - * CA 95054 USA or visit www.sun.com if you need additional information or
   10.26 - * have any questions.
   10.27 - */
   10.28 -
   10.29 -
   10.30 -package com.sun.tools.javah;
   10.31 -
   10.32 -import com.sun.javadoc.*;
   10.33 -import java.io.*;
   10.34 -
   10.35 -/**
   10.36 - * A doclet to parse and execute commandline options.
   10.37 - *
   10.38 - * @author Sucheta Dambalkar(using code from old javap)
   10.39 - */
   10.40 -public class MainDoclet{
   10.41 -
   10.42 -    public static  String  odir        = null;
   10.43 -    public static  String  ofile       = null;
   10.44 -    public static  boolean stubs       = false;
   10.45 -    public static  boolean jni         = false;
   10.46 -    public static  boolean llni        = false;
   10.47 -    public static  boolean doubleAlign = false;
   10.48 -    public static  boolean force       = false;
   10.49 -    public static  String  genclass    = null;
   10.50 -
   10.51 -
   10.52 -    /**
   10.53 -     * Entry point.
   10.54 -     */
   10.55 -    public static boolean start(RootDoc root) {
   10.56 -
   10.57 -        int j = 0;
   10.58 -        int k = 0;
   10.59 -        /**
   10.60 -         * Command line options.
   10.61 -         */
   10.62 -        String [][] cmdoptions = root.options();
   10.63 -        /**
   10.64 -         * Classes specified on command line.
   10.65 -         */
   10.66 -        ClassDoc[] classes = root.classes();
   10.67 -        /**
   10.68 -         * Generator used by javah.  Default is JNI.
   10.69 -         */
   10.70 -        Gen g = new JNI(root);
   10.71 -
   10.72 -        validateOptions(cmdoptions);
   10.73 -
   10.74 -        /*
   10.75 -         * Select native interface.
   10.76 -         */
   10.77 -        if (jni && llni)  Util.error("jni.llni.mixed");
   10.78 -
   10.79 -        if (llni)
   10.80 -            g = new LLNI(doubleAlign, root);
   10.81 -
   10.82 -        if (g instanceof JNI && stubs)  Util.error("jni.no.stubs");
   10.83 -
   10.84 -        /*
   10.85 -         * Arrange for output destination.
   10.86 -         */
   10.87 -        if (odir != null && ofile != null)
   10.88 -            Util.error("dir.file.mixed");
   10.89 -
   10.90 -        if (odir != null)
   10.91 -            g.setOutDir(odir);
   10.92 -
   10.93 -        if (ofile != null)
   10.94 -            g.setOutFile(ofile);
   10.95 -
   10.96 -        /*
   10.97 -         * Force set to false will turn off smarts about checking file
   10.98 -         * content before writing.
   10.99 -         */
  10.100 -        g.setForce(force);
  10.101 -
  10.102 -        /*
  10.103 -         * Grab the rest of argv[] ... this must be the classes.
  10.104 -         */
  10.105 -        if (classes.length == 0){
  10.106 -            Util.error("no.classes.specified");
  10.107 -        }
  10.108 -        /*
  10.109 -         * Set classes.
  10.110 -         */
  10.111 -        g.setClasses(classes);
  10.112 -
  10.113 -        try {
  10.114 -            g.run();
  10.115 -        } catch (ClassNotFoundException cnfe) {
  10.116 -            Util.error("class.not.found", cnfe.getMessage());
  10.117 -        } catch (IOException ioe) {
  10.118 -            Util.error("io.exception", ioe.getMessage());
  10.119 -        }
  10.120 -
  10.121 -        return true;
  10.122 -    }
  10.123 -
  10.124 -    /**
  10.125 -     * Required doclet method.
  10.126 -     */
  10.127 -    public static int optionLength(String option) {
  10.128 -        if (option.equals("-o")) {
  10.129 -            return 2;
  10.130 -        } else if(option.equals("-d")){
  10.131 -            return 2;
  10.132 -        } else if (option.equals("-td")) {
  10.133 -            return 1;
  10.134 -        } else if (option.equals("-stubs")) {
  10.135 -            return 1;
  10.136 -        } else if(option.equals("-help")){
  10.137 -            return 1;
  10.138 -        } else if(option.equals("--help")){
  10.139 -            return 1;
  10.140 -        } else if(option.equals("-?")){
  10.141 -            return 1;
  10.142 -        } else if(option.equals("-h")){
  10.143 -            return 1;
  10.144 -        } else if(option.equals("-trace")){
  10.145 -            return 1;
  10.146 -        } else if(option.equals("-version")) {
  10.147 -            return 1;
  10.148 -        } else if(option.equals("-jni")){
  10.149 -            return 1;
  10.150 -        } else if(option.equals("-force")){
  10.151 -            return 1;
  10.152 -        } else if(option.equals("-Xllni")){
  10.153 -            return 1;
  10.154 -        } else if(option.equals("-llni")){
  10.155 -            return 1;
  10.156 -        } else if(option.equals("-llniDouble")){
  10.157 -            return 1;
  10.158 -        } else return 0;
  10.159 -    }
  10.160 -
  10.161 -    /**
  10.162 -     * Parse the command line options.
  10.163 -     */
  10.164 -    public static void validateOptions(String cmdoptions[][]) {
  10.165 -        /* Default values for options, overridden by user options. */
  10.166 -        String bootcp = System.getProperty("sun.boot.class.path");
  10.167 -        String  usercp = System.getProperty("env.class.path");
  10.168 -
  10.169 -        for(int p = 0; p < cmdoptions.length; p++){
  10.170 -
  10.171 -            if (cmdoptions[p][0].equals("-o")) {
  10.172 -                ofile = cmdoptions[p][1];
  10.173 -            } else if(cmdoptions[p][0].equals("-d")){
  10.174 -                odir = cmdoptions[p][1];
  10.175 -            } else if (cmdoptions[p][0].equals("-td")) {
  10.176 -                if (p ==cmdoptions.length)
  10.177 -                    Util.usage(1);
  10.178 -            } else if (cmdoptions[p][0].equals("-stubs")) {
  10.179 -                stubs = true;
  10.180 -            } else if (cmdoptions[p][0].equals("-verbose")) {
  10.181 -                Util.verbose = true;
  10.182 -            } else if((cmdoptions[p][0].equals("-help"))
  10.183 -                      || (cmdoptions[p][0].equals("--help"))
  10.184 -                      || (cmdoptions[p][0].equals("-?"))
  10.185 -                      || (cmdoptions[p][0].equals("-h"))) {
  10.186 -                Util.usage(0);
  10.187 -            } else if (cmdoptions[p][0].equals("-trace")) {
  10.188 -                System.err.println(Util.getText("tracing.not.supported"));
  10.189 -            } else if (cmdoptions[p][0].equals("-version")) {
  10.190 -                Util.version();
  10.191 -            } else if (cmdoptions[p][0].equals("-jni")) {
  10.192 -                jni = true;
  10.193 -            } else if (cmdoptions[p][0].equals("-force")) {
  10.194 -                force = true;
  10.195 -            } else if (cmdoptions[p][0].equals("-Xllni")) {
  10.196 -                llni = true;
  10.197 -            } else if (cmdoptions[p][0].equals("-llni")) {
  10.198 -                llni = true;
  10.199 -            } else if (cmdoptions[p][0].equals("-llniDouble")) {
  10.200 -                llni = true; doubleAlign = true;
  10.201 -            } else if (cmdoptions[p][0].equals("-classpath")) {
  10.202 -                usercp = cmdoptions[p][1];
  10.203 -            } else if (cmdoptions[p][0].equals("-bootclasspath")) {
  10.204 -                bootcp = cmdoptions[p][1];
  10.205 -            } else if((cmdoptions[p][0].charAt(0) == '-')
  10.206 -                      && (!cmdoptions[p][0].equals("-private"))){
  10.207 -                Util.error("unknown.option", cmdoptions[p][0], null, true);
  10.208 -            } else {
  10.209 -                break; /* The rest must be classes. */
  10.210 -            }
  10.211 -        }
  10.212 -
  10.213 -
  10.214 -        if (Util.verbose) {
  10.215 -                System.err.println("[ Search Path: "
  10.216 -                                    + bootcp
  10.217 -                                    + System.getProperty("file.separator")
  10.218 -                                    + usercp + " ]");
  10.219 -        }
  10.220 -    }
  10.221 -}
    11.1 --- a/src/share/classes/com/sun/tools/javah/Mangle.java	Wed Sep 23 18:48:13 2009 -0700
    11.2 +++ b/src/share/classes/com/sun/tools/javah/Mangle.java	Wed Sep 23 19:15:04 2009 -0700
    11.3 @@ -1,5 +1,5 @@
    11.4  /*
    11.5 - * Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
    11.6 + * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
    11.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.8   *
    11.9   * This code is free software; you can redistribute it and/or modify it
   11.10 @@ -26,22 +26,30 @@
   11.11  
   11.12  package com.sun.tools.javah;
   11.13  
   11.14 -import com.sun.javadoc.*;
   11.15 +import javax.lang.model.element.ExecutableElement;
   11.16 +import javax.lang.model.element.TypeElement;
   11.17 +import javax.lang.model.element.VariableElement;
   11.18 +import javax.lang.model.util.Elements;
   11.19 +import javax.lang.model.util.Types;
   11.20  
   11.21  /**
   11.22   * A utility for mangling java identifiers into C names.  Should make
   11.23   * this more fine grained and distribute the functionality to the
   11.24   * generators.
   11.25   *
   11.26 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
   11.27 + * If you write code that depends on this, you do so at your own
   11.28 + * risk.  This code and its internal interfaces are subject to change
   11.29 + * or deletion without notice.</b></p>
   11.30 + *
   11.31   * @author  Sucheta Dambalkar(Revised)
   11.32   */
   11.33 -class Mangle {
   11.34 +public class Mangle {
   11.35  
   11.36      public static class Type {
   11.37 -
   11.38          public static final int CLASS            = 1;
   11.39          public static final int FIELDSTUB        = 2;
   11.40 -        public static final int FIELD        = 3;
   11.41 +        public static final int FIELD            = 3;
   11.42          public static final int JNI              = 4;
   11.43          public static final int SIGNATURE        = 5;
   11.44          public static final int METHOD_JDK_1     = 6;
   11.45 @@ -49,8 +57,15 @@
   11.46          public static final int METHOD_JNI_LONG  = 8;
   11.47      };
   11.48  
   11.49 +    private Elements elems;
   11.50 +    private Types types;
   11.51  
   11.52 -    public static final String mangle(String name, int mtype) {
   11.53 +    Mangle(Elements elems, Types types) {
   11.54 +        this.elems = elems;
   11.55 +        this.types = types;
   11.56 +    }
   11.57 +
   11.58 +    public final String mangle(CharSequence name, int mtype) {
   11.59          StringBuffer result = new StringBuffer(100);
   11.60          int length = name.length();
   11.61  
   11.62 @@ -98,15 +113,15 @@
   11.63          return result.toString();
   11.64      }
   11.65  
   11.66 -    public static String mangleMethod(MethodDoc method, RootDoc root, ClassDoc clazz,
   11.67 +    public String mangleMethod(ExecutableElement method, TypeElement clazz,
   11.68                                        int mtype) {
   11.69          StringBuffer result = new StringBuffer(100);
   11.70          result.append("Java_");
   11.71  
   11.72          if (mtype == Mangle.Type.METHOD_JDK_1) {
   11.73 -            result.append(mangle(clazz.qualifiedName(), Mangle.Type.CLASS));
   11.74 +            result.append(mangle(clazz.getQualifiedName(), Mangle.Type.CLASS));
   11.75              result.append('_');
   11.76 -            result.append(mangle(method.name(),
   11.77 +            result.append(mangle(method.getSimpleName(),
   11.78                                   Mangle.Type.FIELD));
   11.79              result.append("_stub");
   11.80              return result.toString();
   11.81 @@ -115,13 +130,13 @@
   11.82          /* JNI */
   11.83          result.append(mangle(getInnerQualifiedName(clazz), Mangle.Type.JNI));
   11.84          result.append('_');
   11.85 -        result.append(mangle(method.name(),
   11.86 +        result.append(mangle(method.getSimpleName(),
   11.87                               Mangle.Type.JNI));
   11.88          if (mtype == Mangle.Type.METHOD_JNI_LONG) {
   11.89              result.append("__");
   11.90 -            String typesig = method.signature();
   11.91 -            TypeSignature newTypeSig = new TypeSignature(root);
   11.92 -            String sig = newTypeSig.getTypeSignature(typesig,  method.returnType());
   11.93 +            String typesig = signature(method);
   11.94 +            TypeSignature newTypeSig = new TypeSignature(elems);
   11.95 +            String sig = newTypeSig.getTypeSignature(typesig,  method.getReturnType());
   11.96              sig = sig.substring(1);
   11.97              sig = sig.substring(0, sig.lastIndexOf(')'));
   11.98              sig = sig.replace('/', '.');
   11.99 @@ -131,15 +146,11 @@
  11.100          return result.toString();
  11.101      }
  11.102      //where
  11.103 -        private static String getInnerQualifiedName(ClassDoc clazz) {
  11.104 -            ClassDoc encl = clazz.containingClass();
  11.105 -            if (encl == null)
  11.106 -                return clazz.qualifiedName();
  11.107 -            else
  11.108 -                return getInnerQualifiedName(encl) + '$' + clazz.simpleTypeName();
  11.109 +        private String getInnerQualifiedName(TypeElement clazz) {
  11.110 +            return elems.getBinaryName(clazz).toString();
  11.111          }
  11.112  
  11.113 -    public static final String mangleChar(char ch) {
  11.114 +    public final String mangleChar(char ch) {
  11.115          String s = Integer.toHexString(ch);
  11.116          int nzeros = 5 - s.length();
  11.117          char[] result = new char[6];
  11.118 @@ -151,6 +162,19 @@
  11.119          return new String(result);
  11.120      }
  11.121  
  11.122 +    // Warning: duplicated in Gen
  11.123 +    private String signature(ExecutableElement e) {
  11.124 +        StringBuffer sb = new StringBuffer();
  11.125 +        String sep = "(";
  11.126 +        for (VariableElement p: e.getParameters()) {
  11.127 +            sb.append(sep);
  11.128 +            sb.append(types.erasure(p.asType()).toString());
  11.129 +            sep = ",";
  11.130 +        }
  11.131 +        sb.append(")");
  11.132 +        return sb.toString();
  11.133 +    }
  11.134 +
  11.135      /* Warning: Intentional ASCII operation. */
  11.136      private static final boolean isalnum(char ch) {
  11.137          return ch <= 0x7f && /* quick test */
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java	Wed Sep 23 19:15:04 2009 -0700
    12.3 @@ -0,0 +1,147 @@
    12.4 +/*
    12.5 + * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
    12.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.7 + *
    12.8 + * This code is free software; you can redistribute it and/or modify it
    12.9 + * under the terms of the GNU General Public License version 2 only, as
   12.10 + * published by the Free Software Foundation.  Sun designates this
   12.11 + * particular file as subject to the "Classpath" exception as provided
   12.12 + * by Sun in the LICENSE file that accompanied this code.
   12.13 + *
   12.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   12.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   12.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   12.17 + * version 2 for more details (a copy is included in the LICENSE file that
   12.18 + * accompanied this code).
   12.19 + *
   12.20 + * You should have received a copy of the GNU General Public License version
   12.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   12.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   12.23 + *
   12.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   12.25 + * CA 95054 USA or visit www.sun.com if you need additional information or
   12.26 + * have any questions.
   12.27 + */
   12.28 +
   12.29 +package com.sun.tools.javah; //javax.tools;
   12.30 +
   12.31 +import java.io.Writer;
   12.32 +import java.nio.charset.Charset;
   12.33 +import java.util.Locale;
   12.34 +import java.util.concurrent.Callable;
   12.35 +import javax.tools.DiagnosticListener;
   12.36 +import javax.tools.JavaFileManager;
   12.37 +import javax.tools.JavaFileObject;
   12.38 +import javax.tools.OptionChecker;
   12.39 +import javax.tools.StandardJavaFileManager;
   12.40 +import javax.tools.Tool;
   12.41 +
   12.42 +/**
   12.43 + * This class is intended to be put in javax.tools.
   12.44 + *
   12.45 + * @see DiagnosticListener
   12.46 + * @see Diagnostic
   12.47 + * @see JavaFileManager
   12.48 + * @since 1.7
   12.49 + *
   12.50 + *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
   12.51 + *  you write code that depends on this, you do so at your own risk.
   12.52 + *  This code and its internal interfaces are subject to change or
   12.53 + *  deletion without notice.</b>
   12.54 + */
   12.55 +public interface NativeHeaderTool extends Tool, OptionChecker {
   12.56 +
   12.57 +    /**
   12.58 +     * Creates a future for a native header task with the given
   12.59 +     * components and arguments.  The task might not have
   12.60 +     * completed as described in the NativeHeaderTask interface.
   12.61 +     *
   12.62 +     * <p>If a file manager is provided, it must be able to handle all
   12.63 +     * locations defined in {@link StandardLocation}.
   12.64 +     *
   12.65 +     * @param out a Writer for additional output from the task;
   12.66 +     * use {@code System.err} if {@code null}
   12.67 +     * @param fileManager a file manager; if {@code null} use the
   12.68 +     * task's standard filemanager
   12.69 +     * @param diagnosticListener a diagnostic listener; if {@code
   12.70 +     * null} use the compiler's default method for reporting
   12.71 +     * diagnostics
   12.72 +     * @param options task options, {@code null} means no options
   12.73 +     * @param classes class names for which native headers should be generated
   12.74 +     * @return an object representing the task to be done
   12.75 +     * @throws RuntimeException if an unrecoverable error
   12.76 +     * occurred in a user supplied component.  The
   12.77 +     * {@linkplain Throwable#getCause() cause} will be the error in
   12.78 +     * user code.
   12.79 +     * @throws IllegalArgumentException if any of the given
   12.80 +     * compilation units are of other kind than
   12.81 +     * {@linkplain JavaFileObject.Kind#SOURCE source}
   12.82 +     */
   12.83 +    NativeHeaderTask getTask(Writer out,
   12.84 +                            JavaFileManager fileManager,
   12.85 +                            DiagnosticListener<? super JavaFileObject> diagnosticListener,
   12.86 +                            Iterable<String> options,
   12.87 +                            Iterable<String> classes);
   12.88 +
   12.89 +    /**
   12.90 +     * Gets a new instance of the standard file manager implementation
   12.91 +     * for this tool.  The file manager will use the given diagnostic
   12.92 +     * listener for producing any non-fatal diagnostics.  Fatal errors
   12.93 +     * will be signalled with the appropriate exceptions.
   12.94 +     *
   12.95 +     * <p>The standard file manager will be automatically reopened if
   12.96 +     * it is accessed after calls to {@code flush} or {@code close}.
   12.97 +     * The standard file manager must be usable with other tools.
   12.98 +     *
   12.99 +     * @param diagnosticListener a diagnostic listener for non-fatal
  12.100 +     * diagnostics; if {@code null} use the tool's default method
  12.101 +     * for reporting diagnostics
  12.102 +     * @param locale the locale to apply when formatting diagnostics;
  12.103 +     * {@code null} means the {@linkplain Locale#getDefault() default locale}.
  12.104 +     * @param charset the character set used for decoding bytes; if
  12.105 +     * {@code null} use the platform default
  12.106 +     * @return the standard file manager
  12.107 +     */
  12.108 +    StandardJavaFileManager getStandardFileManager(
  12.109 +        DiagnosticListener<? super JavaFileObject> diagnosticListener,
  12.110 +        Locale locale,
  12.111 +        Charset charset);
  12.112 +
  12.113 +    /**
  12.114 +     * Interface representing a future for a native header task.  The
  12.115 +     * task has not yet started.  To start the task, call
  12.116 +     * the {@linkplain #call call} method.
  12.117 +     *
  12.118 +     * <p>Before calling the call method, additional aspects of the
  12.119 +     * task can be configured, for example, by calling the
  12.120 +     * {@linkplain #setLocale setLocale} method.
  12.121 +     */
  12.122 +    interface NativeHeaderTask extends Callable<Boolean> {
  12.123 +
  12.124 +        /**
  12.125 +         * Set the locale to be applied when formatting diagnostics and
  12.126 +         * other localized data.
  12.127 +         *
  12.128 +         * @param locale the locale to apply; {@code null} means apply no
  12.129 +         * locale
  12.130 +         * @throws IllegalStateException if the task has started
  12.131 +         */
  12.132 +        void setLocale(Locale locale);
  12.133 +
  12.134 +        /**
  12.135 +         * Performs this native header task.  The task may only
  12.136 +         * be performed once.  Subsequent calls to this method throw
  12.137 +         * IllegalStateException.
  12.138 +         *
  12.139 +         * @return true if and only all the files were processed without errors;
  12.140 +         * false otherwise
  12.141 +         *
  12.142 +         * @throws RuntimeException if an unrecoverable error occurred
  12.143 +         * in a user-supplied component.  The
  12.144 +         * {@linkplain Throwable#getCause() cause} will be the error
  12.145 +         * in user code.
  12.146 +         * @throws IllegalStateException if called more than once
  12.147 +         */
  12.148 +        Boolean call();
  12.149 +    }
  12.150 +}
    13.1 --- a/src/share/classes/com/sun/tools/javah/TypeSignature.java	Wed Sep 23 18:48:13 2009 -0700
    13.2 +++ b/src/share/classes/com/sun/tools/javah/TypeSignature.java	Wed Sep 23 19:15:04 2009 -0700
    13.3 @@ -1,5 +1,5 @@
    13.4  /*
    13.5 - * Copyright 2002-2003 Sun Microsystems, Inc.  All Rights Reserved.
    13.6 + * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
    13.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.8   *
    13.9   * This code is free software; you can redistribute it and/or modify it
   13.10 @@ -26,19 +26,34 @@
   13.11  
   13.12  package com.sun.tools.javah;
   13.13  
   13.14 -import com.sun.javadoc.*;
   13.15 -import java.io.*;
   13.16  import java.util.*;
   13.17 +import javax.lang.model.element.Name;
   13.18 +import javax.lang.model.element.TypeElement;
   13.19 +import javax.lang.model.type.ArrayType;
   13.20 +import javax.lang.model.type.DeclaredType;
   13.21 +import javax.lang.model.type.NoType;
   13.22 +import javax.lang.model.type.PrimitiveType;
   13.23 +import javax.lang.model.type.TypeKind;
   13.24 +import javax.lang.model.type.TypeMirror;
   13.25 +import javax.lang.model.type.TypeVariable;
   13.26 +import javax.lang.model.type.TypeVisitor;
   13.27 +import javax.lang.model.util.Elements;
   13.28 +import javax.lang.model.util.SimpleTypeVisitor6;
   13.29  
   13.30  /**
   13.31   * Returns internal type signature.
   13.32   *
   13.33 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
   13.34 + * If you write code that depends on this, you do so at your own
   13.35 + * risk.  This code and its internal interfaces are subject to change
   13.36 + * or deletion without notice.</b></p>
   13.37 + *
   13.38   * @author Sucheta Dambalkar
   13.39   */
   13.40  
   13.41  public class TypeSignature{
   13.42  
   13.43 -    RootDoc root  = null;
   13.44 +    Elements elems;
   13.45  
   13.46      /* Signature Characters */
   13.47  
   13.48 @@ -56,8 +71,8 @@
   13.49  
   13.50  
   13.51  
   13.52 -    public TypeSignature(RootDoc root){
   13.53 -        this.root = root;
   13.54 +    public TypeSignature(Elements elems){
   13.55 +        this.elems = elems;
   13.56      }
   13.57  
   13.58      /*
   13.59 @@ -70,16 +85,15 @@
   13.60      /*
   13.61       * Returns the type signature of a method according to JVM specs
   13.62       */
   13.63 -    public String getTypeSignature(String javasignature, Type returnType){
   13.64 -
   13.65 +    public String getTypeSignature(String javasignature, TypeMirror returnType){
   13.66          String signature = null; //Java type signature.
   13.67          String typeSignature = null; //Internal type signature.
   13.68 -        Vector<Object> params = new Vector<Object>(); //List of parameters.
   13.69 +        List<String> params = new ArrayList<String>(); //List of parameters.
   13.70          String paramsig = null; //Java parameter signature.
   13.71          String paramJVMSig = null; //Internal parameter signature.
   13.72          String returnSig = null; //Java return type signature.
   13.73          String returnJVMType = null; //Internal return type signature.
   13.74 -        String dimension = null; //Array dimension.
   13.75 +        int dimensions = 0; //Array dimension.
   13.76  
   13.77          int startIndex = -1;
   13.78          int endIndex = -1;
   13.79 @@ -87,28 +101,27 @@
   13.80          int i = 0;
   13.81  
   13.82          // Gets the actual java signature without parentheses.
   13.83 -        if(javasignature != null){
   13.84 +        if (javasignature != null) {
   13.85              startIndex = javasignature.indexOf("(");
   13.86              endIndex = javasignature.indexOf(")");
   13.87          }
   13.88  
   13.89 -        if(((startIndex != -1) && (endIndex != -1))
   13.90 -           &&(startIndex+1 < javasignature.length())
   13.91 -           &&(endIndex < javasignature.length())) {
   13.92 -
   13.93 +        if (((startIndex != -1) && (endIndex != -1))
   13.94 +            &&(startIndex+1 < javasignature.length())
   13.95 +            &&(endIndex < javasignature.length())) {
   13.96              signature = javasignature.substring(startIndex+1, endIndex);
   13.97          }
   13.98  
   13.99          // Separates parameters.
  13.100 -        if(signature != null){
  13.101 -            if(signature.indexOf(",") != -1){
  13.102 +        if (signature != null) {
  13.103 +            if (signature.indexOf(",") != -1) {
  13.104                  st = new StringTokenizer(signature, ",");
  13.105 -                if(st != null){
  13.106 +                if (st != null) {
  13.107                      while (st.hasMoreTokens()) {
  13.108                          params.add(st.nextToken());
  13.109                      }
  13.110                  }
  13.111 -            }else {
  13.112 +            } else {
  13.113                  params.add(signature);
  13.114              }
  13.115          }
  13.116 @@ -117,10 +130,10 @@
  13.117          typeSignature = "(";
  13.118  
  13.119          // Gets indivisual internal parameter signature.
  13.120 -        while(params.isEmpty() != true){
  13.121 -            paramsig =((String)params.remove(i)).trim();
  13.122 +        while (params.isEmpty() != true) {
  13.123 +            paramsig = params.remove(i).trim();
  13.124              paramJVMSig  = getParamJVMSignature(paramsig);
  13.125 -            if(paramJVMSig != null){
  13.126 +            if (paramJVMSig != null) {
  13.127                  typeSignature += paramJVMSig;
  13.128              }
  13.129          }
  13.130 @@ -130,36 +143,30 @@
  13.131          // Get internal return type signature.
  13.132  
  13.133          returnJVMType = "";
  13.134 -        if(returnType != null){
  13.135 -            dimension = returnType.dimension();
  13.136 +        if (returnType != null) {
  13.137 +            dimensions = dimensions(returnType);
  13.138          }
  13.139  
  13.140 -        if(dimension != null){
  13.141 -
  13.142 -            //Gets array dimension of return type.
  13.143 -            while(dimension.indexOf("[]") != -1){
  13.144 -                returnJVMType += "[";
  13.145 -                int stindex = dimension.indexOf("]") + 1;
  13.146 -                if(stindex <= dimension.length()){
  13.147 -                    dimension = dimension.substring(stindex);
  13.148 -                }else dimension = "";
  13.149 -            }
  13.150 +        //Gets array dimension of return type.
  13.151 +        while (dimensions-- > 0) {
  13.152 +            returnJVMType += "[";
  13.153          }
  13.154 -        if(returnType != null){
  13.155 -            returnSig = returnType.qualifiedTypeName();
  13.156 +        if (returnType != null) {
  13.157 +            returnSig = qualifiedTypeName(returnType);
  13.158              returnJVMType += getComponentType(returnSig);
  13.159 -        }else {
  13.160 +        } else {
  13.161              System.out.println("Invalid return type.");
  13.162          }
  13.163  
  13.164          typeSignature += returnJVMType;
  13.165 +
  13.166          return typeSignature;
  13.167      }
  13.168  
  13.169      /*
  13.170       * Returns internal signature of a parameter.
  13.171       */
  13.172 -    private String getParamJVMSignature(String paramsig){
  13.173 +    private String getParamJVMSignature(String paramsig) {
  13.174          String paramJVMSig = "";
  13.175          String componentType ="";
  13.176  
  13.177 @@ -206,12 +213,13 @@
  13.178              else if(componentType.equals("double"))  JVMSig += SIG_DOUBLE ;
  13.179              else {
  13.180                  if(!componentType.equals("")){
  13.181 -                    ClassDoc classNameDoc = root.classNamed(componentType);
  13.182 +                    TypeElement classNameDoc = elems.getTypeElement(componentType);
  13.183  
  13.184                      if(classNameDoc == null){
  13.185 -                        System.out.println("Invalid class type");
  13.186 +                        System.out.println("Invalid class type for " + componentType);
  13.187 +                        new Exception().printStackTrace();
  13.188                      }else {
  13.189 -                        String classname = classNameDoc.qualifiedName();
  13.190 +                        String classname = classNameDoc.getQualifiedName().toString();
  13.191                          String newclassname = classname.replace('.', '/');
  13.192                          JVMSig += "L";
  13.193                          JVMSig += newclassname;
  13.194 @@ -222,4 +230,43 @@
  13.195          }
  13.196          return JVMSig;
  13.197      }
  13.198 +
  13.199 +    int dimensions(TypeMirror t) {
  13.200 +        if (t.getKind() != TypeKind.ARRAY)
  13.201 +            return 0;
  13.202 +        return 1 + dimensions(((ArrayType) t).getComponentType());
  13.203 +    }
  13.204 +
  13.205 +
  13.206 +    String qualifiedTypeName(TypeMirror type) {
  13.207 +        TypeVisitor<Name, Void> v = new SimpleTypeVisitor6<Name, Void>() {
  13.208 +            @Override
  13.209 +            public Name visitArray(ArrayType t, Void p) {
  13.210 +                return t.getComponentType().accept(this, p);
  13.211 +            }
  13.212 +
  13.213 +            @Override
  13.214 +            public Name visitDeclared(DeclaredType t, Void p) {
  13.215 +                return ((TypeElement) t.asElement()).getQualifiedName();
  13.216 +            }
  13.217 +
  13.218 +            @Override
  13.219 +            public Name visitPrimitive(PrimitiveType t, Void p) {
  13.220 +                return elems.getName(t.toString());
  13.221 +            }
  13.222 +
  13.223 +            @Override
  13.224 +            public Name visitNoType(NoType t, Void p) {
  13.225 +                if (t.getKind() == TypeKind.VOID)
  13.226 +                    return elems.getName("void");
  13.227 +                return defaultAction(t, p);
  13.228 +            }
  13.229 +
  13.230 +            @Override
  13.231 +            public Name visitTypeVariable(TypeVariable t, Void p) {
  13.232 +                return t.getUpperBound().accept(this, p);
  13.233 +            }
  13.234 +        };
  13.235 +        return v.visit(type).toString();
  13.236 +    }
  13.237  }
    14.1 --- a/src/share/classes/com/sun/tools/javah/Util.java	Wed Sep 23 18:48:13 2009 -0700
    14.2 +++ b/src/share/classes/com/sun/tools/javah/Util.java	Wed Sep 23 19:15:04 2009 -0700
    14.3 @@ -1,5 +1,5 @@
    14.4  /*
    14.5 - * Copyright 2002-2004 Sun Microsystems, Inc.  All Rights Reserved.
    14.6 + * Copyright 2002-2008 Sun Microsystems, Inc.  All Rights Reserved.
    14.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    14.8   *
    14.9   * This code is free software; you can redistribute it and/or modify it
   14.10 @@ -26,12 +26,15 @@
   14.11  
   14.12  package com.sun.tools.javah;
   14.13  
   14.14 -import java.io.File;
   14.15 -import java.io.FileInputStream;
   14.16 -import java.io.IOException;
   14.17 +import java.io.PrintWriter;
   14.18 +import java.text.MessageFormat;
   14.19 +import java.util.Locale;
   14.20  import java.util.ResourceBundle;
   14.21 -import java.text.MessageFormat;
   14.22  import java.util.MissingResourceException;
   14.23 +import javax.tools.Diagnostic;
   14.24 +import javax.tools.Diagnostic.Kind;
   14.25 +import javax.tools.DiagnosticListener;
   14.26 +import javax.tools.JavaFileObject;
   14.27  
   14.28  /**
   14.29   * Messages, verbose and error handling support.
   14.30 @@ -41,42 +44,70 @@
   14.31   *      bug   -- Bug has occurred in javah
   14.32   *      fatal -- We can't even find resources, so bail fast, don't localize
   14.33   *
   14.34 + * <p><b>This is NOT part of any API supported by Sun Microsystems.
   14.35 + * If you write code that depends on this, you do so at your own
   14.36 + * risk.  This code and its internal interfaces are subject to change
   14.37 + * or deletion without notice.</b></p>
   14.38   */
   14.39  public class Util {
   14.40 +    /** Exit is used to replace the use of System.exit in the original javah.
   14.41 +     */
   14.42 +    public static class Exit extends Error {
   14.43 +        private static final long serialVersionUID = 430820978114067221L;
   14.44 +        Exit(int exitValue) {
   14.45 +            this(exitValue, null);
   14.46 +        }
   14.47 +
   14.48 +        Exit(int exitValue, Throwable cause) {
   14.49 +            super(cause);
   14.50 +            this.exitValue = exitValue;
   14.51 +            this.cause = cause;
   14.52 +        }
   14.53 +
   14.54 +        Exit(Exit e) {
   14.55 +            this(e.exitValue, e.cause);
   14.56 +        }
   14.57 +
   14.58 +        public final int exitValue;
   14.59 +        public final Throwable cause;
   14.60 +    }
   14.61  
   14.62      /*
   14.63       * Help for verbosity.
   14.64       */
   14.65 -    public static boolean verbose = false;
   14.66 +    public boolean verbose = false;
   14.67  
   14.68 -    public static void log(String s) {
   14.69 -        System.out.println(s);
   14.70 +    public PrintWriter log;
   14.71 +    public DiagnosticListener<? super JavaFileObject> dl;
   14.72 +
   14.73 +    Util(PrintWriter log, DiagnosticListener<? super JavaFileObject> dl) {
   14.74 +        this.log = log;
   14.75 +        this.dl = dl;
   14.76 +    }
   14.77 +
   14.78 +    public void log(String s) {
   14.79 +        log.println(s);
   14.80      }
   14.81  
   14.82  
   14.83      /*
   14.84       * Help for loading localized messages.
   14.85       */
   14.86 -    private static ResourceBundle m;
   14.87 +    private ResourceBundle m;
   14.88  
   14.89 -    private static void initMessages() {
   14.90 +    private void initMessages() throws Exit {
   14.91          try {
   14.92 -            m=ResourceBundle.getBundle("com.sun.tools.javah.resources.l10n");
   14.93 +            m = ResourceBundle.getBundle("com.sun.tools.javah.resources.l10n");
   14.94          } catch (MissingResourceException mre) {
   14.95              fatal("Error loading resources.  Please file a bug report.", mre);
   14.96          }
   14.97      }
   14.98  
   14.99 -    public static String getText(String key) {
  14.100 -        return getText(key, null, null);
  14.101 -    }
  14.102 -
  14.103 -    private static String getText(String key, String a1, String a2){
  14.104 +    private String getText(String key, Object... args) throws Exit {
  14.105          if (m == null)
  14.106              initMessages();
  14.107          try {
  14.108 -            return MessageFormat.format(m.getString(key),
  14.109 -                                        new Object[] { a1, a2 });
  14.110 +            return MessageFormat.format(m.getString(key), args);
  14.111          } catch (MissingResourceException e) {
  14.112              fatal("Key " + key + " not found in resources.", e);
  14.113          }
  14.114 @@ -86,107 +117,74 @@
  14.115      /*
  14.116       * Usage message.
  14.117       */
  14.118 -    public static void usage(int exitValue) {
  14.119 -        if (exitValue == 0) {
  14.120 -            System.out.println(getText("usage"));
  14.121 -        } else {
  14.122 -            System.err.println(getText("usage"));
  14.123 -        }
  14.124 -        System.exit(exitValue);
  14.125 +    public void usage() throws Exit {
  14.126 +        log.println(getText("usage"));
  14.127      }
  14.128  
  14.129 -    public static void version() {
  14.130 -        System.out.println(getText("javah.version",
  14.131 +    public void version() throws Exit {
  14.132 +        log.println(getText("javah.version",
  14.133                                     System.getProperty("java.version"), null));
  14.134 -        System.exit(0);
  14.135      }
  14.136  
  14.137      /*
  14.138       * Failure modes.
  14.139       */
  14.140 -    public static void bug(String key) {
  14.141 +    public void bug(String key) throws Exit {
  14.142          bug(key, null);
  14.143      }
  14.144  
  14.145 -    public static void bug(String key, Exception e) {
  14.146 -        if (e != null)
  14.147 -            e.printStackTrace();
  14.148 -        System.err.println(getText(key));
  14.149 -        System.err.println(getText("bug.report"));
  14.150 -        System.exit(11);
  14.151 +    public void bug(String key, Exception e) throws Exit {
  14.152 +        dl.report(createDiagnostic(Diagnostic.Kind.ERROR, key));
  14.153 +        dl.report(createDiagnostic(Diagnostic.Kind.NOTE, "bug.report"));
  14.154 +        throw new Exit(11, e);
  14.155      }
  14.156  
  14.157 -    public static void error(String key) {
  14.158 -        error(key, null);
  14.159 +    public void error(String key, Object... args) throws Exit {
  14.160 +        dl.report(createDiagnostic(Diagnostic.Kind.ERROR, key, args));
  14.161 +        throw new Exit(15);
  14.162      }
  14.163  
  14.164 -    public static void error(String key, String a1) {
  14.165 -        error(key, a1, null);
  14.166 -    }
  14.167 -
  14.168 -    public static void error(String key, String a1, String a2) {
  14.169 -        error(key, a1, a2, false);
  14.170 -    }
  14.171 -
  14.172 -    public static void error(String key, String a1, String a2,
  14.173 -                             boolean showUsage) {
  14.174 -        System.err.println("Error: " + getText(key, a1, a2));
  14.175 -        if (showUsage)
  14.176 -            usage(15);
  14.177 -        System.exit(15);
  14.178 -    }
  14.179 -
  14.180 -
  14.181 -    private static void fatal(String msg) {
  14.182 +    private void fatal(String msg) throws Exit {
  14.183          fatal(msg, null);
  14.184      }
  14.185  
  14.186 -    private static void fatal(String msg, Exception e) {
  14.187 -        if (e != null) {
  14.188 -            e.printStackTrace();
  14.189 -        }
  14.190 -        System.err.println(msg);
  14.191 -        System.exit(10);
  14.192 +    private void fatal(String msg, Exception e) throws Exit {
  14.193 +        dl.report(createDiagnostic(Diagnostic.Kind.ERROR, "", msg));
  14.194 +        throw new Exit(10, e);
  14.195      }
  14.196  
  14.197 -    /*
  14.198 -     * Support for platform specific things in javah, such as pragma
  14.199 -     * directives, exported symbols etc.
  14.200 -     */
  14.201 -    static private ResourceBundle platform = null;
  14.202 -
  14.203 -    /*
  14.204 -     * Set when platform has been initialized.
  14.205 -     */
  14.206 -    static private boolean platformInit = false;
  14.207 -
  14.208 -    static String getPlatformString(String key) {
  14.209 -        if (!platformInit) {
  14.210 -            initPlatform();
  14.211 -            platformInit = true;
  14.212 -        }
  14.213 -        if (platform == null)
  14.214 -            return null;
  14.215 -        try {
  14.216 -            return platform.getString(key);
  14.217 -        } catch (MissingResourceException mre) {
  14.218 -            return null;
  14.219 -        }
  14.220 -    }
  14.221 -
  14.222 -    private static void initPlatform() {
  14.223 -        String os = System.getProperty("os.name");
  14.224 -        if (os.startsWith("Windows")) {
  14.225 -            os = "win32";
  14.226 -        } else if (os.indexOf("Linux") >= 0) {
  14.227 -            os = "Linux";
  14.228 -        }
  14.229 -        String arch = System.getProperty("os.arch");
  14.230 -        String resname = "com.sun.tools.javah.resources." + os + "_" + arch;
  14.231 -        try {
  14.232 -            platform=ResourceBundle.getBundle(resname);
  14.233 -        } catch (MissingResourceException mre) {
  14.234 -            // fatal("Error loading resources.  Please file a bug report.", mre);
  14.235 -        }
  14.236 +    private Diagnostic<JavaFileObject> createDiagnostic(
  14.237 +            final Diagnostic.Kind kind, final String code, final Object... args) {
  14.238 +        return new Diagnostic<JavaFileObject>() {
  14.239 +            public String getCode() {
  14.240 +                return code;
  14.241 +            }
  14.242 +            public long getColumnNumber() {
  14.243 +                return Diagnostic.NOPOS;
  14.244 +            }
  14.245 +            public long getEndPosition() {
  14.246 +                return Diagnostic.NOPOS;
  14.247 +            }
  14.248 +            public Kind getKind() {
  14.249 +                return kind;
  14.250 +            }
  14.251 +            public long getLineNumber() {
  14.252 +                return Diagnostic.NOPOS;
  14.253 +            }
  14.254 +            public String getMessage(Locale locale) {
  14.255 +                if (code.length() == 0)
  14.256 +                    return (String) args[0];
  14.257 +                return getText(code, args); // FIXME locale
  14.258 +            }
  14.259 +            public long getPosition() {
  14.260 +                return Diagnostic.NOPOS;
  14.261 +            }
  14.262 +            public JavaFileObject getSource() {
  14.263 +                return null;
  14.264 +            }
  14.265 +            public long getStartPosition() {
  14.266 +                return Diagnostic.NOPOS;
  14.267 +            }
  14.268 +        };
  14.269      }
  14.270  }
    15.1 --- a/src/share/classes/com/sun/tools/javah/resources/Linux_ppc.properties	Wed Sep 23 18:48:13 2009 -0700
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,27 +0,0 @@
    15.4 -#
    15.5 -# Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
    15.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    15.7 -#
    15.8 -# This code is free software; you can redistribute it and/or modify it
    15.9 -# under the terms of the GNU General Public License version 2 only, as
   15.10 -# published by the Free Software Foundation.  Sun designates this
   15.11 -# particular file as subject to the "Classpath" exception as provided
   15.12 -# by Sun in the LICENSE file that accompanied this code.
   15.13 -#
   15.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
   15.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   15.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   15.17 -# version 2 for more details (a copy is included in the LICENSE file that
   15.18 -# accompanied this code).
   15.19 -#
   15.20 -# You should have received a copy of the GNU General Public License version
   15.21 -# 2 along with this work; if not, write to the Free Software Foundation,
   15.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   15.23 -#
   15.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   15.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
   15.26 -# have any questions.
   15.27 -# 
   15.28 -
   15.29 -pack.pragma.start=\#pragma pack(4)\n
   15.30 -pack.pragma.end=\#pragma pack()\n
    16.1 --- a/src/share/classes/com/sun/tools/javah/resources/Linux_sparc.properties	Wed Sep 23 18:48:13 2009 -0700
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,27 +0,0 @@
    16.4 -#
    16.5 -# Copyright 2000 Sun Microsystems, Inc.  All Rights Reserved.
    16.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.7 -#
    16.8 -# This code is free software; you can redistribute it and/or modify it
    16.9 -# under the terms of the GNU General Public License version 2 only, as
   16.10 -# published by the Free Software Foundation.  Sun designates this
   16.11 -# particular file as subject to the "Classpath" exception as provided
   16.12 -# by Sun in the LICENSE file that accompanied this code.
   16.13 -#
   16.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
   16.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   16.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   16.17 -# version 2 for more details (a copy is included in the LICENSE file that
   16.18 -# accompanied this code).
   16.19 -#
   16.20 -# You should have received a copy of the GNU General Public License version
   16.21 -# 2 along with this work; if not, write to the Free Software Foundation,
   16.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   16.23 -#
   16.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   16.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
   16.26 -# have any questions.
   16.27 -# 
   16.28 -
   16.29 -pack.pragma.start=\#pragma pack(4)\n
   16.30 -pack.pragma.end=\#pragma pack()\n
    17.1 --- a/src/share/classes/com/sun/tools/javah/resources/SunOS_sparc.properties	Wed Sep 23 18:48:13 2009 -0700
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,27 +0,0 @@
    17.4 -#
    17.5 -# Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
    17.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.7 -#
    17.8 -# This code is free software; you can redistribute it and/or modify it
    17.9 -# under the terms of the GNU General Public License version 2 only, as
   17.10 -# published by the Free Software Foundation.  Sun designates this
   17.11 -# particular file as subject to the "Classpath" exception as provided
   17.12 -# by Sun in the LICENSE file that accompanied this code.
   17.13 -#
   17.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
   17.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   17.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   17.17 -# version 2 for more details (a copy is included in the LICENSE file that
   17.18 -# accompanied this code).
   17.19 -#
   17.20 -# You should have received a copy of the GNU General Public License version
   17.21 -# 2 along with this work; if not, write to the Free Software Foundation,
   17.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   17.23 -#
   17.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   17.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
   17.26 -# have any questions.
   17.27 -# 
   17.28 -
   17.29 -pack.pragma.start=\#pragma pack(4)\n
   17.30 -pack.pragma.end=\#pragma pack()\n
    18.1 --- a/src/share/classes/com/sun/tools/javah/resources/SunOS_sparcv9.properties	Wed Sep 23 18:48:13 2009 -0700
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,27 +0,0 @@
    18.4 -#
    18.5 -# Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved.
    18.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.7 -#
    18.8 -# This code is free software; you can redistribute it and/or modify it
    18.9 -# under the terms of the GNU General Public License version 2 only, as
   18.10 -# published by the Free Software Foundation.  Sun designates this
   18.11 -# particular file as subject to the "Classpath" exception as provided
   18.12 -# by Sun in the LICENSE file that accompanied this code.
   18.13 -#
   18.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
   18.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   18.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   18.17 -# version 2 for more details (a copy is included in the LICENSE file that
   18.18 -# accompanied this code).
   18.19 -#
   18.20 -# You should have received a copy of the GNU General Public License version
   18.21 -# 2 along with this work; if not, write to the Free Software Foundation,
   18.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   18.23 -#
   18.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   18.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
   18.26 -# have any questions.
   18.27 -# 
   18.28 -
   18.29 -pack.pragma.start=\#pragma pack(4)\n
   18.30 -pack.pragma.end=\#pragma pack()\n
    19.1 --- a/src/share/classes/com/sun/tools/javah/resources/l10n.properties	Wed Sep 23 18:48:13 2009 -0700
    19.2 +++ b/src/share/classes/com/sun/tools/javah/resources/l10n.properties	Wed Sep 23 19:15:04 2009 -0700
    19.3 @@ -21,47 +21,47 @@
    19.4  # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    19.5  # CA 95054 USA or visit www.sun.com if you need additional information or
    19.6  # have any questions.
    19.7 -# 
    19.8 +#
    19.9  
   19.10  #
   19.11  # User errors, command line errors.
   19.12  #
   19.13  cant.create.dir=\
   19.14 -	The directory {0} could not be create for output.
   19.15 +        The directory {0} could not be create for output.
   19.16  at.args.cant.read=\
   19.17 -	Can''t read command line arguments from file {1}.
   19.18 +        Can''t read command line arguments from file {1}.
   19.19  at.args.io.exception=\
   19.20 -	The following I/O problem was encountered when processing an @ \
   19.21 +        The following I/O problem was encountered when processing an @ \
   19.22          argument on the command line: {0}.
   19.23  old.jni.mixed=\
   19.24 -	Can''t mix options -jni and -old.  Try -help.
   19.25 +        Can''t mix options -jni and -old.  Try -help.
   19.26  old.llni.mixed=\
   19.27 -	Can''t mix options -old and -llni.  Try -help.
   19.28 +        Can''t mix options -old and -llni.  Try -help.
   19.29  old.not.supported=\
   19.30 -	Option -old not supported by this version of javah.
   19.31 +        Option -old not supported by this version of javah.
   19.32  invalid.method.signature=\
   19.33 -	Invalid method signature: {0}
   19.34 +        Invalid method signature: {0}
   19.35  jni.llni.mixed=\
   19.36 -	Can''t mix options -jni and -llni.  Try -help.
   19.37 +        Can''t mix options -jni and -llni.  Try -help.
   19.38  jni.no.stubs=\
   19.39 -	JNI does not require stubs, please refer to the JNI documentation.
   19.40 +        JNI does not require stubs, please refer to the JNI documentation.
   19.41  dir.file.mixed=\
   19.42 -	Can''t mix options -d and -o.  Try -help.
   19.43 +        Can''t mix options -d and -o.  Try -help.
   19.44  no.classes.specified=\
   19.45 -	No classes were specified on the command line.  Try -help.
   19.46 +        No classes were specified on the command line.  Try -help.
   19.47  no.outputfile.specified=\
   19.48 -	No outputfile was specified on the command line.  Try -help.
   19.49 +        No outputfile was specified on the command line.  Try -help.
   19.50  no.outputdir.specified=\
   19.51 -	No output directory was specified on the command line.  Try -help.
   19.52 +        No output directory was specified on the command line.  Try -help.
   19.53  no.classpath.specified=\
   19.54 -	No classpath was specified on the command line.  Try -help.
   19.55 +        No classpath was specified on the command line.  Try -help.
   19.56  no.bootclasspath.specified=\
   19.57 -	No bootclasspath was specified on the command line.  Try -help.
   19.58 +        No bootclasspath was specified on the command line.  Try -help.
   19.59  unknown.option=\
   19.60 -	{0} is an illegal argument\n
   19.61 +        {0} is an illegal argument\n
   19.62  tracing.not.supported=\
   19.63 -	Warning: Tracing is no longer supported.  Instead, use\
   19.64 -	-verbose:jni option of the virtual machine.
   19.65 +        Warning: Tracing is no longer supported.  Instead, use\
   19.66 +        -verbose:jni option of the virtual machine.
   19.67  
   19.68  #
   19.69  # Usage message.
   19.70 @@ -79,11 +79,37 @@
   19.71  -jni                  Generate JNI-style header file (default)\n\t\
   19.72  -version              Print version information\n\t\
   19.73  -verbose              Enable verbose output\n\t\
   19.74 --force		      Always write output files\n\
   19.75 +-force                Always write output files\n\
   19.76  \n\
   19.77  <classes> are specified with their fully qualified names (for\n\
   19.78  instance, java.lang.Object).\n
   19.79  
   19.80 +main.usage=\
   19.81 +Usage: \n\
   19.82 +\  javah [options] <classes>\n\
   19.83 +where [options] include:
   19.84 +main.opt.o=\
   19.85 +\  -o <file>                Output file (only one of -d or -o may be used)
   19.86 +main.opt.d=\
   19.87 +\  -d <dir>                 Output directory
   19.88 +main.opt.v=\
   19.89 +\  -v  -verbose             Enable verbose output
   19.90 +main.opt.help=\
   19.91 +\  -h  --help  -?           Print this message
   19.92 +main.opt.version=\
   19.93 +\  -version                 Print version information
   19.94 +main.opt.jni=\
   19.95 +\  -jni                     Generate JNI-style header file (default)
   19.96 +main.opt.force=\
   19.97 +\  -force                   Always write output files
   19.98 +main.opt.classpath=\
   19.99 +\  -classpath <path>        Path from which to load classes
  19.100 +main.opt.bootclasspath=\
  19.101 +\  -bootclasspath <path>    Path from which to load bootstrap classes
  19.102 +main.usage.foot=\
  19.103 +<classes> are specified with their fully qualified names\n\
  19.104 +(for example, java.lang.Object).
  19.105 +
  19.106  #
  19.107  # Version string.
  19.108  #
  19.109 @@ -93,26 +119,35 @@
  19.110  # These should have better diagnostics.
  19.111  #
  19.112  super.class.not.found=\
  19.113 -	A required super class {0} could not be found.
  19.114 +        A required super class {0} could not be found.
  19.115  class.not.found=\
  19.116 -	Class {0} could not be found.
  19.117 +        Class {0} could not be found.
  19.118  io.exception=\
  19.119 -	Can''t recover from an I/O error with the following message: \
  19.120 -	{0}.
  19.121 +        Can''t recover from an I/O error with the following message: \
  19.122 +        {0}.
  19.123  
  19.124  #
  19.125  # Problems in the guts of javah.
  19.126  #
  19.127  encoding.iso8859_1.not.found=\
  19.128 -	ISO8859_1 converter was not found for output.  This is \
  19.129 +        ISO8859_1 converter was not found for output.  This is \
  19.130          probably due to an error in the installation installation.
  19.131  tried.to.define.non.static=\
  19.132 -	Tried to generate #define for non-static field.
  19.133 +        Tried to generate #define for non-static field.
  19.134  jni.unknown.type=\
  19.135 -	An unknown type encountered (JNI).
  19.136 +        An unknown type encountered (JNI).
  19.137  unknown.array.type=\
  19.138 -	An unknown array type encountered when generating old style headers.
  19.139 +        An unknown array type encountered when generating old style headers.
  19.140  unknown.type.for.field=\
  19.141 -	An unknown type encountered when generating old style headers.
  19.142 +        An unknown type encountered when generating old style headers.
  19.143  unknown.type.in.method.signature=\
  19.144 -	An unknown type eccountered when generating old style stubs.
  19.145 +        An unknown type eccountered when generating old style stubs.
  19.146 +
  19.147 +
  19.148 +err.prefix=Error:
  19.149 +err.cant.use.option.for.fm=Can't use {0} option with given file manager
  19.150 +err.internal.error=Internal error: {0}
  19.151 +err.ioerror=IO error: {0}
  19.152 +err.missing.arg=value missing for {0}
  19.153 +err.no.classes.specified=no classes specified
  19.154 +err.unknown.option=unknown option: {0}
    20.1 --- a/src/share/classes/com/sun/tools/javah/resources/win32_x86.properties	Wed Sep 23 18:48:13 2009 -0700
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,28 +0,0 @@
    20.4 -#
    20.5 -# Copyright 1998 Sun Microsystems, Inc.  All Rights Reserved.
    20.6 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.7 -#
    20.8 -# This code is free software; you can redistribute it and/or modify it
    20.9 -# under the terms of the GNU General Public License version 2 only, as
   20.10 -# published by the Free Software Foundation.  Sun designates this
   20.11 -# particular file as subject to the "Classpath" exception as provided
   20.12 -# by Sun in the LICENSE file that accompanied this code.
   20.13 -#
   20.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
   20.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   20.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   20.17 -# version 2 for more details (a copy is included in the LICENSE file that
   20.18 -# accompanied this code).
   20.19 -#
   20.20 -# You should have received a copy of the GNU General Public License version
   20.21 -# 2 along with this work; if not, write to the Free Software Foundation,
   20.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20.23 -#
   20.24 -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   20.25 -# CA 95054 USA or visit www.sun.com if you need additional information or
   20.26 -# have any questions.
   20.27 -# 
   20.28 -
   20.29 -dll.export=__declspec(dllexport)
   20.30 -pack.pragma.start=\#pragma pack(4)\n
   20.31 -pack.pragma.end=\#pragma pack()\n
    21.1 --- a/src/share/classes/com/sun/tools/javap/DisassemblerTool.java	Wed Sep 23 18:48:13 2009 -0700
    21.2 +++ b/src/share/classes/com/sun/tools/javap/DisassemblerTool.java	Wed Sep 23 19:15:04 2009 -0700
    21.3 @@ -42,7 +42,7 @@
    21.4   * @see DiagnosticListener
    21.5   * @see Diagnostic
    21.6   * @see JavaFileManager
    21.7 - * @since 1.6
    21.8 + * @since 1.7
    21.9   *
   21.10   *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
   21.11   *  you write code that depends on this, you do so at your own risk.
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/test/tools/javah/6572945/T6572945.java	Wed Sep 23 19:15:04 2009 -0700
    22.3 @@ -0,0 +1,239 @@
    22.4 +/*
    22.5 + * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
    22.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.7 + *
    22.8 + * This code is free software; you can redistribute it and/or modify it
    22.9 + * under the terms of the GNU General Public License version 2 only, as
   22.10 + * published by the Free Software Foundation.
   22.11 + *
   22.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   22.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   22.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   22.15 + * version 2 for more details (a copy is included in the LICENSE file that
   22.16 + * accompanied this code).
   22.17 + *
   22.18 + * You should have received a copy of the GNU General Public License version
   22.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   22.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   22.21 + *
   22.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   22.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
   22.24 + * have any questions.
   22.25 + */
   22.26 +
   22.27 +/*
   22.28 + * @test
   22.29 + * @bug 6572945
   22.30 + * @summary rewrite javah as an annotation processor, instead of as a doclet
   22.31 + * @build TestClass1 TestClass2 TestClass3
   22.32 + * @run main T6572945
   22.33 + */
   22.34 +
   22.35 +import java.io.*;
   22.36 +import java.util.*;
   22.37 +import com.sun.tools.javah.Main;
   22.38 +
   22.39 +public class T6572945
   22.40 +{
   22.41 +    static File testSrc = new File(System.getProperty("test.src", "."));
   22.42 +    static File testClasses = new File(System.getProperty("test.classes", "."));
   22.43 +    static boolean isWindows = System.getProperty("os.name").startsWith("Windows");
   22.44 +
   22.45 +    public static void main(String... args)
   22.46 +        throws IOException, InterruptedException
   22.47 +    {
   22.48 +        boolean ok = new T6572945().run(args);
   22.49 +        if (!ok)
   22.50 +            throw new Error("Test Failed");
   22.51 +    }
   22.52 +
   22.53 +    public boolean run(String[] args)
   22.54 +        throws IOException, InterruptedException
   22.55 +    {
   22.56 +        if (args.length == 1)
   22.57 +            jdk = new File(args[0]);
   22.58 +
   22.59 +        test("-o", "jni.file.1",  "-jni", "TestClass1");
   22.60 +        test("-o", "jni.file.2",  "-jni", "TestClass1", "TestClass2");
   22.61 +        test("-d", "jni.dir.1",   "-jni", "TestClass1", "TestClass2");
   22.62 +        test("-o", "jni.file.3",  "-jni", "TestClass3");
   22.63 +
   22.64 +        // The following tests are disabled because llni support has been
   22.65 +        // discontinued, and because bugs in old javah means that character
   22.66 +        // for character testing against output from old javah does not work.
   22.67 +        // In fact, the LLNI impl in new javah is actually better than the
   22.68 +        // impl in old javah because of a couple of significant bug fixes.
   22.69 +
   22.70 +//        test("-o", "llni.file.1", "-llni", "TestClass1");
   22.71 +//        test("-o", "llni.file.2", "-llni", "TestClass1", "TestClass2");
   22.72 +//        test("-d", "llni.dir.1",  "-llni", "TestClass1", "TestClass2");
   22.73 +//        test("-o", "llni.file.3", "-llni", "TestClass3");
   22.74 +
   22.75 +        return (errors == 0);
   22.76 +    }
   22.77 +
   22.78 +    void test(String... args)
   22.79 +        throws IOException, InterruptedException
   22.80 +    {
   22.81 +        String[] cp_args = new String[args.length + 2];
   22.82 +        cp_args[0] = "-classpath";
   22.83 +        cp_args[1] = testClasses.getPath();
   22.84 +        System.arraycopy(args, 0, cp_args, 2, args.length);
   22.85 +
   22.86 +        if (jdk != null)
   22.87 +            init(cp_args);
   22.88 +
   22.89 +        File out = null;
   22.90 +        for (int i = 0; i < args.length; i++) {
   22.91 +            if (args[i].equals("-o")) {
   22.92 +                out = new File(args[++i]);
   22.93 +                break;
   22.94 +            } else if (args[i].equals("-d")) {
   22.95 +                out = new File(args[++i]);
   22.96 +                out.mkdirs();
   22.97 +                break;
   22.98 +            }
   22.99 +        }
  22.100 +
  22.101 +        try {
  22.102 +            System.out.println("test: " + Arrays.asList(cp_args));
  22.103 +
  22.104 +//            // Uncomment and use the following lines to execute javah via the
  22.105 +//            // command line -- for example, to run old javah and set up the golden files
  22.106 +//            List<String> cmd = new ArrayList<String>();
  22.107 +//            File javaHome = new File(System.getProperty("java.home"));
  22.108 +//            if (javaHome.getName().equals("jre"))
  22.109 +//                javaHome = javaHome.getParentFile();
  22.110 +//            File javah = new File(new File(javaHome, "bin"), "javah");
  22.111 +//            cmd.add(javah.getPath());
  22.112 +//            cmd.addAll(Arrays.asList(cp_args));
  22.113 +//            ProcessBuilder pb = new ProcessBuilder(cmd);
  22.114 +//            pb.redirectErrorStream(true);
  22.115 +//            pb.start();
  22.116 +//            Process p = pb.start();
  22.117 +//            String line;
  22.118 +//            BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
  22.119 +//            while ((line = in.readLine()) != null)
  22.120 +//                System.err.println(line);
  22.121 +//            in.close();
  22.122 +//            int rc = p.waitFor();
  22.123 +
  22.124 +            // Use new javah
  22.125 +            PrintWriter err = new PrintWriter(System.err, true);
  22.126 +            int rc = Main.run(cp_args, err);
  22.127 +
  22.128 +            if (rc != 0) {
  22.129 +                error("javah failed: rc=" + rc);
  22.130 +                return;
  22.131 +            }
  22.132 +
  22.133 +            // The golden files use the LL suffix for long constants, which
  22.134 +            // is used on Linux and Solaris.   On Windows, the suffix is i64,
  22.135 +            // so compare will update the golden files on the fly before the
  22.136 +            // final comparison.
  22.137 +            compare(new File(new File(testSrc, "gold"), out.getName()), out);
  22.138 +        } catch (Throwable t) {
  22.139 +            t.printStackTrace();
  22.140 +            error("javah threw exception");
  22.141 +        }
  22.142 +    }
  22.143 +
  22.144 +    void init(String[] args) throws IOException, InterruptedException {
  22.145 +        String[] cmdArgs = new String[args.length + 1];
  22.146 +        cmdArgs[0] = new File(new File(jdk, "bin"), "javah").getPath();
  22.147 +        System.arraycopy(args, 0, cmdArgs, 1, args.length);
  22.148 +
  22.149 +        System.out.println("init: " + Arrays.asList(cmdArgs));
  22.150 +
  22.151 +        ProcessBuilder pb = new ProcessBuilder(cmdArgs);
  22.152 +        pb.directory(new File(testSrc, "gold"));
  22.153 +        pb.redirectErrorStream(true);
  22.154 +        Process p = pb.start();
  22.155 +        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
  22.156 +        String line;
  22.157 +        while ((line = in.readLine()) != null)
  22.158 +            System.out.println("javah: " + line);
  22.159 +        int rc = p.waitFor();
  22.160 +        if (rc != 0)
  22.161 +            error("javah: exit code " + rc);
  22.162 +    }
  22.163 +
  22.164 +    /** Compare two directories.
  22.165 +     *  @param f1 The golden directory
  22.166 +     *  @param f2 The directory to be compared
  22.167 +     */
  22.168 +    void compare(File f1, File f2) {
  22.169 +        compare(f1, f2, null);
  22.170 +    }
  22.171 +
  22.172 +    /** Compare two files or directories
  22.173 +     *  @param f1 The golden directory
  22.174 +     *  @param f2 The directory to be compared
  22.175 +     *  @param p An optional path identifying a file within the two directories
  22.176 +     */
  22.177 +    void compare(File f1, File f2, String p) {
  22.178 +        File f1p = (p == null ? f1 : new File(f1, p));
  22.179 +        File f2p = (p == null ? f2 : new File(f2, p));
  22.180 +        System.out.println("compare " + f1p + " " + f2p);
  22.181 +        if (f1p.isDirectory() && f2p.isDirectory()) {
  22.182 +            Set<String> children = new HashSet<String>();
  22.183 +            children.addAll(Arrays.asList(f1p.list()));
  22.184 +            children.addAll(Arrays.asList(f2p.list()));
  22.185 +            for (String c: children) {
  22.186 +                compare(f1, f2, new File(p, c).getPath()); // null-safe for p
  22.187 +            }
  22.188 +        }
  22.189 +        else if (f1p.isFile() && f2p.isFile()) {
  22.190 +            String s1 = read(f1p);
  22.191 +            if (isWindows) {
  22.192 +                // f1/s1 is the golden file
  22.193 +                // on Windows, long constants use the i64 suffix, not LL
  22.194 +                s1 = s1.replaceAll("( [0-9]+)LL\n", "$1i64\n");
  22.195 +            }
  22.196 +            String s2 = read(f2p);
  22.197 +            if (!s1.equals(s2)) {
  22.198 +                System.out.println("File: " + f1p + "\n" + s1);
  22.199 +                System.out.println("File: " + f2p + "\n" + s2);
  22.200 +                error("Files differ: " + f1p + " " + f2p);
  22.201 +            }
  22.202 +        }
  22.203 +        else if (f1p.exists() && !f2p.exists())
  22.204 +            error("Only in " + f1 + ": " + p);
  22.205 +        else if (f2p.exists() && !f1p.exists())
  22.206 +            error("Only in " + f2 + ": " + p);
  22.207 +        else
  22.208 +            error("Files differ: " + f1p + " " + f2p);
  22.209 +    }
  22.210 +
  22.211 +    private String read(File f) {
  22.212 +        try {
  22.213 +            BufferedReader in = new BufferedReader(new FileReader(f));
  22.214 +            try {
  22.215 +                StringBuilder sb = new StringBuilder((int) f.length());
  22.216 +                String line;
  22.217 +                while ((line = in.readLine()) != null) {
  22.218 +                    sb.append(line);
  22.219 +                    sb.append("\n");
  22.220 +                }
  22.221 +                return sb.toString();
  22.222 +            } finally {
  22.223 +                try {
  22.224 +                    in.close();
  22.225 +                } catch (IOException e) {
  22.226 +                }
  22.227 +            }
  22.228 +        } catch (IOException e) {
  22.229 +            error("error reading " + f + ": " + e);
  22.230 +            return "";
  22.231 +        }
  22.232 +    }
  22.233 +
  22.234 +
  22.235 +    private void error(String msg) {
  22.236 +        System.out.println(msg);
  22.237 +        errors++;
  22.238 +    }
  22.239 +
  22.240 +    private int errors;
  22.241 +    private File jdk;
  22.242 +}
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/test/tools/javah/6572945/TestClass1.java	Wed Sep 23 19:15:04 2009 -0700
    23.3 @@ -0,0 +1,475 @@
    23.4 +/*
    23.5 + * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
    23.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.7 + *
    23.8 + * This code is free software; you can redistribute it and/or modify it
    23.9 + * under the terms of the GNU General Public License version 2 only, as
   23.10 + * published by the Free Software Foundation.
   23.11 + *
   23.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   23.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   23.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   23.15 + * version 2 for more details (a copy is included in the LICENSE file that
   23.16 + * accompanied this code).
   23.17 + *
   23.18 + * You should have received a copy of the GNU General Public License version
   23.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   23.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   23.21 + *
   23.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   23.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
   23.24 + * have any questions.
   23.25 + */
   23.26 +
   23.27 +import java.util.List;
   23.28 +
   23.29 +public class TestClass1 {
   23.30 +    // simple types
   23.31 +    byte b;
   23.32 +    short s;
   23.33 +    int i;
   23.34 +    long l;
   23.35 +    float f;
   23.36 +    double d;
   23.37 +    Object o;
   23.38 +    String t;
   23.39 +    List<String> g;
   23.40 +
   23.41 +    // constants
   23.42 +    static final byte bc = 0;
   23.43 +    static final short sc = 0;
   23.44 +    static final int ic = 0;
   23.45 +    static final long lc = 0;
   23.46 +    static final float fc = 0;
   23.47 +    static final double dc = 0;
   23.48 +    static final Object oc = null;
   23.49 +    static final String tc = "";
   23.50 +    static final List<String> gc = null;
   23.51 +
   23.52 +    // simple arrays
   23.53 +    byte[] ba;
   23.54 +    short[] sa; // not handled corrected by javah v6
   23.55 +    int[] ia;
   23.56 +    long[] la;
   23.57 +    float[] fa;
   23.58 +    double[] da;
   23.59 +    Object[] oa;
   23.60 +    String[] ta;
   23.61 +    List<String>[] ga;
   23.62 +
   23.63 +    // multidimensional arrays
   23.64 +    byte[][] baa;
   23.65 +    short[][] saa;
   23.66 +    int[][] iaa;
   23.67 +    long[][] laa;
   23.68 +    float[][] faa;
   23.69 +    double[][] daa;
   23.70 +    Object[][] oaa;
   23.71 +    String[][] taa;
   23.72 +    List<String>[] gaa;
   23.73 +
   23.74 +    // simple Java methods
   23.75 +    byte bm() { return 0; }
   23.76 +    short sm() { return 0; }
   23.77 +    int im() { return 0; }
   23.78 +    long lm() { return 0; }
   23.79 +    float fm() { return 0; }
   23.80 +    double dm() { return 0; }
   23.81 +    Object om() { return null; }
   23.82 +    String tm() { return ""; }
   23.83 +    List<String> gm() { return null; }
   23.84 +    void vm() { }
   23.85 +    byte[] bam() { return null; }
   23.86 +    short[] sam() { return null; }
   23.87 +    int[] iam() { return null; }
   23.88 +    long[] lam() { return null; }
   23.89 +    float[] fam() { return null; }
   23.90 +    double[] dam() { return null; }
   23.91 +    Object[] oam() { return null; }
   23.92 +    String[] tam() { return null; }
   23.93 +    List<String>[] gam() { return null; }
   23.94 +    byte[][] baam() { return null; }
   23.95 +    short[][] saam() { return null; }
   23.96 +    int[][] iaam() { return null; }
   23.97 +    long[][] laam() { return null; }
   23.98 +    float[][] faam() { return null; }
   23.99 +    double[][] daam() { return null; }
  23.100 +    Object[][] oaam() { return null; }
  23.101 +    String[][] taam() { return null; }
  23.102 +    List<String>[] gaam() { return null; }
  23.103 +
  23.104 +    // simple native methods
  23.105 +    native byte bmn();
  23.106 +    native short smn();
  23.107 +    native int imn();
  23.108 +    native long lmn();
  23.109 +    native float fmn();
  23.110 +    native double dmn();
  23.111 +    native Object omn();
  23.112 +    native String tmn();
  23.113 +    native List<String> gmn();
  23.114 +    native void vmn();
  23.115 +    native byte[] bamn();
  23.116 +    native short[] samn();
  23.117 +    native int[] iamn();
  23.118 +    native long[] lamn();
  23.119 +    native float[] famn();
  23.120 +    native double[] damn();
  23.121 +    native Object[] oamn();
  23.122 +    native String[] tamn();
  23.123 +    native List<String>[] gamn();
  23.124 +    native byte[][] baamn();
  23.125 +    native short[][] saamn();
  23.126 +    native int[][] iaamn();
  23.127 +    native long[][] laamn();
  23.128 +    native float[][] faamn();
  23.129 +    native double[][] daamn();
  23.130 +    native Object[][] oaamn();
  23.131 +    native String[][] taamn();
  23.132 +    native List<String>[] gaamn();
  23.133 +
  23.134 +    // overloaded Java methods
  23.135 +    byte bm1() { return 0; }
  23.136 +    short sm1() { return 0; }
  23.137 +    int im1() { return 0; }
  23.138 +    long lm1() { return 0; }
  23.139 +    float fm1() { return 0; }
  23.140 +    double dm1() { return 0; }
  23.141 +    Object om1() { return null; }
  23.142 +    String tm1() { return ""; }
  23.143 +    List<String> gm1() { return null; }
  23.144 +    void vm1() { }
  23.145 +
  23.146 +    byte bm2(int i) { return 0; }
  23.147 +    short sm2(int i) { return 0; }
  23.148 +    int im2(int i) { return 0; }
  23.149 +    long lm2(int i) { return 0; }
  23.150 +    float fm2(int i) { return 0; }
  23.151 +    double dm2(int i) { return 0; }
  23.152 +    Object om2(int i) { return null; }
  23.153 +    String tm2(int i) { return ""; }
  23.154 +    List<String> gm2(int i) { return null; }
  23.155 +    void vm2(int i) { }
  23.156 +
  23.157 +    // overloaded native methods
  23.158 +    native byte bmn1();
  23.159 +    native short smn1();
  23.160 +    native int imn1();
  23.161 +    native long lmn1();
  23.162 +    native float fmn1();
  23.163 +    native double dmn1();
  23.164 +    native Object omn1();
  23.165 +    native String tmn1();
  23.166 +    native List<String> gmn1();
  23.167 +    native void vmn1();
  23.168 +
  23.169 +    native byte bmn2(int i);
  23.170 +    native short smn2(int i);
  23.171 +    native int imn2(int i);
  23.172 +    native long lmn2(int i);
  23.173 +    native float fmn2(int i);
  23.174 +    native double dmn2(int i);
  23.175 +    native Object omn2(int i);
  23.176 +    native String tmn2(int i);
  23.177 +    native List<String> gmn2(int i);
  23.178 +    native void vmn2(int i);
  23.179 +
  23.180 +    // arg types for Java methods
  23.181 +    void mb(byte b) { }
  23.182 +    void ms(short s) { }
  23.183 +    void mi(int i) { }
  23.184 +    void ml(long l) { }
  23.185 +    void mf(float f) { }
  23.186 +    void md(double d) { }
  23.187 +    void mo(Object o) { }
  23.188 +    void mt(String t) { }
  23.189 +    void mg(List<String> g) { }
  23.190 +
  23.191 +    // arg types for native methods
  23.192 +    native void mbn(byte b);
  23.193 +    native void msn(short s);
  23.194 +    native void min(int i);
  23.195 +    native void mln(long l);
  23.196 +    native void mfn(float f);
  23.197 +    native void mdn(double d);
  23.198 +    native void mon(Object o);
  23.199 +    native void mtn(String t);
  23.200 +    native void mgn(List<String> g);
  23.201 +
  23.202 +    static class Inner1 {
  23.203 +        // simple types
  23.204 +        byte b;
  23.205 +        short s;
  23.206 +        int i;
  23.207 +        long l;
  23.208 +        float f;
  23.209 +        double d;
  23.210 +        Object o;
  23.211 +        String t;
  23.212 +        List<String> g;
  23.213 +
  23.214 +        // constants
  23.215 +        static final byte bc = 0;
  23.216 +        static final short sc = 0;
  23.217 +        static final int ic = 0;
  23.218 +        static final long lc = 0;
  23.219 +        static final float fc = 0;
  23.220 +        static final double dc = 0;
  23.221 +        static final Object oc = null;
  23.222 +        static final String tc = "";
  23.223 +        static final List<String> gc = null;
  23.224 +
  23.225 +        // simple arrays
  23.226 +        byte[] ba;
  23.227 +        // short[] sa; // not handled corrected by javah v6
  23.228 +        int[] ia;
  23.229 +        long[] la;
  23.230 +        float[] fa;
  23.231 +        double[] da;
  23.232 +        Object[] oa;
  23.233 +        String[] ta;
  23.234 +        List<String>[] ga;
  23.235 +
  23.236 +        // multidimensional arrays
  23.237 +        byte[][] baa;
  23.238 +        short[][] saa;
  23.239 +        int[][] iaa;
  23.240 +        long[][] laa;
  23.241 +        float[][] faa;
  23.242 +        double[][] daa;
  23.243 +        Object[][] oaa;
  23.244 +        String[][] taa;
  23.245 +        List<String>[] gaa;
  23.246 +
  23.247 +        // simple Java methods
  23.248 +        byte bm() { return 0; }
  23.249 +        short sm() { return 0; }
  23.250 +        int im() { return 0; }
  23.251 +        long lm() { return 0; }
  23.252 +        float fm() { return 0; }
  23.253 +        double dm() { return 0; }
  23.254 +        Object om() { return null; }
  23.255 +        String tm() { return ""; }
  23.256 +        List<String> gm() { return null; }
  23.257 +        void vm() { }
  23.258 +
  23.259 +        // simple native methods
  23.260 +        native byte bmn();
  23.261 +        native short smn();
  23.262 +        native int imn();
  23.263 +        native long lmn();
  23.264 +        native float fmn();
  23.265 +        native double dmn();
  23.266 +        native Object omn();
  23.267 +        native String tmn();
  23.268 +        native List<String> gmn();
  23.269 +        native void vmn();
  23.270 +
  23.271 +        // overloaded Java methods
  23.272 +        byte bm1() { return 0; }
  23.273 +        short sm1() { return 0; }
  23.274 +        int im1() { return 0; }
  23.275 +        long lm1() { return 0; }
  23.276 +        float fm1() { return 0; }
  23.277 +        double dm1() { return 0; }
  23.278 +        Object om1() { return null; }
  23.279 +        String tm1() { return ""; }
  23.280 +        List<String> gm1() { return null; }
  23.281 +        void vm1() { }
  23.282 +
  23.283 +        byte bm2(int i) { return 0; }
  23.284 +        short sm2(int i) { return 0; }
  23.285 +        int im2(int i) { return 0; }
  23.286 +        long lm2(int i) { return 0; }
  23.287 +        float fm2(int i) { return 0; }
  23.288 +        double dm2(int i) { return 0; }
  23.289 +        Object om2(int i) { return null; }
  23.290 +        String tm2(int i) { return ""; }
  23.291 +        List<String> gm2(int i) { return null; }
  23.292 +        void vm2(int i) { }
  23.293 +
  23.294 +        // overloaded native methods
  23.295 +        native byte bmn1();
  23.296 +        native short smn1();
  23.297 +        native int imn1();
  23.298 +        native long lmn1();
  23.299 +        native float fmn1();
  23.300 +        native double dmn1();
  23.301 +        native Object omn1();
  23.302 +        native String tmn1();
  23.303 +        native List<String> gmn1();
  23.304 +        native void vmn1();
  23.305 +
  23.306 +        native byte bmn2(int i);
  23.307 +        native short smn2(int i);
  23.308 +        native int imn2(int i);
  23.309 +        native long lmn2(int i);
  23.310 +        native float fmn2(int i);
  23.311 +        native double dmn2(int i);
  23.312 +        native Object omn2(int i);
  23.313 +        native String tmn2(int i);
  23.314 +        native List<String> gmn2(int i);
  23.315 +        native void vmn2(int i);
  23.316 +
  23.317 +        // arg types for Java methods
  23.318 +        void mb(byte b) { }
  23.319 +        void ms(short s) { }
  23.320 +        void mi(int i) { }
  23.321 +        void ml(long l) { }
  23.322 +        void mf(float f) { }
  23.323 +        void md(double d) { }
  23.324 +        void mo(Object o) { }
  23.325 +        void mt(String t) { }
  23.326 +        void mg(List<String> g) { }
  23.327 +
  23.328 +        // arg types for native methods
  23.329 +        native void mbn(byte b);
  23.330 +        native void msn(short s);
  23.331 +        native void min(int i);
  23.332 +        native void mln(long l);
  23.333 +        native void mfn(float f);
  23.334 +        native void mdn(double d);
  23.335 +        native void mon(Object o);
  23.336 +        native void mtn(String t);
  23.337 +        native void mgn(List<String> g);
  23.338 +    }
  23.339 +
  23.340 +    class Inner2 {
  23.341 +        // simple types
  23.342 +        byte b;
  23.343 +        short s;
  23.344 +        int i;
  23.345 +        long l;
  23.346 +        float f;
  23.347 +        double d;
  23.348 +        Object o;
  23.349 +        String t;
  23.350 +        List<String> g;
  23.351 +
  23.352 +        // constants
  23.353 +        static final byte bc = 0;
  23.354 +        static final short sc = 0;
  23.355 +        static final int ic = 0;
  23.356 +        static final long lc = 0;
  23.357 +        static final float fc = 0;
  23.358 +        static final double dc = 0;
  23.359 +        //static final Object oc = null;
  23.360 +        static final String tc = "";
  23.361 +        //static final List<String> gc = null;
  23.362 +
  23.363 +        // simple arrays
  23.364 +        byte[] ba;
  23.365 +        // short[] sa; // not handled corrected by javah v6
  23.366 +        int[] ia;
  23.367 +        long[] la;
  23.368 +        float[] fa;
  23.369 +        double[] da;
  23.370 +        Object[] oa;
  23.371 +        String[] ta;
  23.372 +        List<String>[] ga;
  23.373 +
  23.374 +        // multidimensional arrays
  23.375 +        byte[][] baa;
  23.376 +        short[][] saa;
  23.377 +        int[][] iaa;
  23.378 +        long[][] laa;
  23.379 +        float[][] faa;
  23.380 +        double[][] daa;
  23.381 +        Object[][] oaa;
  23.382 +        String[][] taa;
  23.383 +        List<String>[] gaa;
  23.384 +
  23.385 +        // simple Java methods
  23.386 +        byte bm() { return 0; }
  23.387 +        short sm() { return 0; }
  23.388 +        int im() { return 0; }
  23.389 +        long lm() { return 0; }
  23.390 +        float fm() { return 0; }
  23.391 +        double dm() { return 0; }
  23.392 +        Object om() { return null; }
  23.393 +        String tm() { return ""; }
  23.394 +        List<String> gm() { return null; }
  23.395 +        void vm() { }
  23.396 +
  23.397 +        // simple native methods
  23.398 +        native byte bmn();
  23.399 +        native short smn();
  23.400 +        native int imn();
  23.401 +        native long lmn();
  23.402 +        native float fmn();
  23.403 +        native double dmn();
  23.404 +        native Object omn();
  23.405 +        native String tmn();
  23.406 +        native List<String> gmn();
  23.407 +        native void vmn();
  23.408 +
  23.409 +        // overloaded Java methods
  23.410 +        byte bm1() { return 0; }
  23.411 +        short sm1() { return 0; }
  23.412 +        int im1() { return 0; }
  23.413 +        long lm1() { return 0; }
  23.414 +        float fm1() { return 0; }
  23.415 +        double dm1() { return 0; }
  23.416 +        Object om1() { return null; }
  23.417 +        String tm1() { return ""; }
  23.418 +        List<String> gm1() { return null; }
  23.419 +        void vm1() { }
  23.420 +
  23.421 +        byte bm2(int i) { return 0; }
  23.422 +        short sm2(int i) { return 0; }
  23.423 +        int im2(int i) { return 0; }
  23.424 +        long lm2(int i) { return 0; }
  23.425 +        float fm2(int i) { return 0; }
  23.426 +        double dm2(int i) { return 0; }
  23.427 +        Object om2(int i) { return null; }
  23.428 +        String tm2(int i) { return ""; }
  23.429 +        List<String> gm2(int i) { return null; }
  23.430 +        void vm2(int i) { }
  23.431 +
  23.432 +        // overloaded native methods
  23.433 +        native byte bmn1();
  23.434 +        native short smn1();
  23.435 +        native int imn1();
  23.436 +        native long lmn1();
  23.437 +        native float fmn1();
  23.438 +        native double dmn1();
  23.439 +        native Object omn1();
  23.440 +        native String tmn1();
  23.441 +        native List<String> gmn1();
  23.442 +        native void vmn1();
  23.443 +
  23.444 +        native byte bmn2(int i);
  23.445 +        native short smn2(int i);
  23.446 +        native int imn2(int i);
  23.447 +        native long lmn2(int i);
  23.448 +        native float fmn2(int i);
  23.449 +        native double dmn2(int i);
  23.450 +        native Object omn2(int i);
  23.451 +        native String tmn2(int i);
  23.452 +        native List<String> gmn2(int i);
  23.453 +        native void vmn2(int i);
  23.454 +
  23.455 +        // arg types for Java methods
  23.456 +        void mb(byte b) { }
  23.457 +        void ms(short s) { }
  23.458 +        void mi(int i) { }
  23.459 +        void ml(long l) { }
  23.460 +        void mf(float f) { }
  23.461 +        void md(double d) { }
  23.462 +        void mo(Object o) { }
  23.463 +        void mt(String t) { }
  23.464 +        void mg(List<String> g) { }
  23.465 +
  23.466 +        // arg types for native methods
  23.467 +        native void mbn(byte b);
  23.468 +        native void msn(short s);
  23.469 +        native void min(int i);
  23.470 +        native void mln(long l);
  23.471 +        native void mfn(float f);
  23.472 +        native void mdn(double d);
  23.473 +        native void mon(Object o);
  23.474 +        native void mtn(String t);
  23.475 +        native void mgn(List<String> g);
  23.476 +    }
  23.477 +
  23.478 +}
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/test/tools/javah/6572945/TestClass2.java	Wed Sep 23 19:15:04 2009 -0700
    24.3 @@ -0,0 +1,33 @@
    24.4 +/*
    24.5 + * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
    24.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    24.7 + *
    24.8 + * This code is free software; you can redistribute it and/or modify it
    24.9 + * under the terms of the GNU General Public License version 2 only, as
   24.10 + * published by the Free Software Foundation.
   24.11 + *
   24.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   24.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   24.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   24.15 + * version 2 for more details (a copy is included in the LICENSE file that
   24.16 + * accompanied this code).
   24.17 + *
   24.18 + * You should have received a copy of the GNU General Public License version
   24.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   24.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   24.21 + *
   24.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   24.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
   24.24 + * have any questions.
   24.25 + */
   24.26 +
   24.27 +public class TestClass2 {
   24.28 +    byte b;
   24.29 +    short s;
   24.30 +    int i;
   24.31 +    long l;
   24.32 +    float f;
   24.33 +    double d;
   24.34 +    Object o;
   24.35 +    String t;
   24.36 +}
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/test/tools/javah/6572945/TestClass3.java	Wed Sep 23 19:15:04 2009 -0700
    25.3 @@ -0,0 +1,51 @@
    25.4 +/*
    25.5 + * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
    25.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    25.7 + *
    25.8 + * This code is free software; you can redistribute it and/or modify it
    25.9 + * under the terms of the GNU General Public License version 2 only, as
   25.10 + * published by the Free Software Foundation.
   25.11 + *
   25.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   25.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   25.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   25.15 + * version 2 for more details (a copy is included in the LICENSE file that
   25.16 + * accompanied this code).
   25.17 + *
   25.18 + * You should have received a copy of the GNU General Public License version
   25.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   25.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   25.21 + *
   25.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   25.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
   25.24 + * have any questions.
   25.25 + */
   25.26 +
   25.27 +public class TestClass3 {
   25.28 +    public int tc3;
   25.29 +
   25.30 +    public class Inner1 {
   25.31 +        public int tc3i1;
   25.32 +
   25.33 +        public class Inner1A {
   25.34 +            public int tc3i1i1a;
   25.35 +        }
   25.36 +
   25.37 +        public class Inner1B {
   25.38 +            public int tc3i1i1b;
   25.39 +        }
   25.40 +    }
   25.41 +
   25.42 +    public class Inner2 {
   25.43 +        public int tc321;
   25.44 +
   25.45 +        public class Inner2A {
   25.46 +            public int tc3i2i2a;
   25.47 +        }
   25.48 +
   25.49 +        public class Inner2B {
   25.50 +            public int tc3i2i2b;
   25.51 +        }
   25.52 +    }
   25.53 +}
   25.54 +
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/test/tools/javah/6572945/gold/jni.dir.1/TestClass1.h	Wed Sep 23 19:15:04 2009 -0700
    26.3 @@ -0,0 +1,481 @@
    26.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    26.5 +#include <jni.h>
    26.6 +/* Header for class TestClass1 */
    26.7 +
    26.8 +#ifndef _Included_TestClass1
    26.9 +#define _Included_TestClass1
   26.10 +#ifdef __cplusplus
   26.11 +extern "C" {
   26.12 +#endif
   26.13 +#undef TestClass1_bc
   26.14 +#define TestClass1_bc 0L
   26.15 +#undef TestClass1_sc
   26.16 +#define TestClass1_sc 0L
   26.17 +#undef TestClass1_ic
   26.18 +#define TestClass1_ic 0L
   26.19 +#undef TestClass1_lc
   26.20 +#define TestClass1_lc 0LL
   26.21 +#undef TestClass1_fc
   26.22 +#define TestClass1_fc 0.0f
   26.23 +#undef TestClass1_dc
   26.24 +#define TestClass1_dc 0.0
   26.25 +/*
   26.26 + * Class:     TestClass1
   26.27 + * Method:    bmn
   26.28 + * Signature: ()B
   26.29 + */
   26.30 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn
   26.31 +  (JNIEnv *, jobject);
   26.32 +
   26.33 +/*
   26.34 + * Class:     TestClass1
   26.35 + * Method:    smn
   26.36 + * Signature: ()S
   26.37 + */
   26.38 +JNIEXPORT jshort JNICALL Java_TestClass1_smn
   26.39 +  (JNIEnv *, jobject);
   26.40 +
   26.41 +/*
   26.42 + * Class:     TestClass1
   26.43 + * Method:    imn
   26.44 + * Signature: ()I
   26.45 + */
   26.46 +JNIEXPORT jint JNICALL Java_TestClass1_imn
   26.47 +  (JNIEnv *, jobject);
   26.48 +
   26.49 +/*
   26.50 + * Class:     TestClass1
   26.51 + * Method:    lmn
   26.52 + * Signature: ()J
   26.53 + */
   26.54 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn
   26.55 +  (JNIEnv *, jobject);
   26.56 +
   26.57 +/*
   26.58 + * Class:     TestClass1
   26.59 + * Method:    fmn
   26.60 + * Signature: ()F
   26.61 + */
   26.62 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn
   26.63 +  (JNIEnv *, jobject);
   26.64 +
   26.65 +/*
   26.66 + * Class:     TestClass1
   26.67 + * Method:    dmn
   26.68 + * Signature: ()D
   26.69 + */
   26.70 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn
   26.71 +  (JNIEnv *, jobject);
   26.72 +
   26.73 +/*
   26.74 + * Class:     TestClass1
   26.75 + * Method:    omn
   26.76 + * Signature: ()Ljava/lang/Object;
   26.77 + */
   26.78 +JNIEXPORT jobject JNICALL Java_TestClass1_omn
   26.79 +  (JNIEnv *, jobject);
   26.80 +
   26.81 +/*
   26.82 + * Class:     TestClass1
   26.83 + * Method:    tmn
   26.84 + * Signature: ()Ljava/lang/String;
   26.85 + */
   26.86 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn
   26.87 +  (JNIEnv *, jobject);
   26.88 +
   26.89 +/*
   26.90 + * Class:     TestClass1
   26.91 + * Method:    gmn
   26.92 + * Signature: ()Ljava/util/List;
   26.93 + */
   26.94 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn
   26.95 +  (JNIEnv *, jobject);
   26.96 +
   26.97 +/*
   26.98 + * Class:     TestClass1
   26.99 + * Method:    vmn
  26.100 + * Signature: ()V
  26.101 + */
  26.102 +JNIEXPORT void JNICALL Java_TestClass1_vmn
  26.103 +  (JNIEnv *, jobject);
  26.104 +
  26.105 +/*
  26.106 + * Class:     TestClass1
  26.107 + * Method:    bamn
  26.108 + * Signature: ()[B
  26.109 + */
  26.110 +JNIEXPORT jbyteArray JNICALL Java_TestClass1_bamn
  26.111 +  (JNIEnv *, jobject);
  26.112 +
  26.113 +/*
  26.114 + * Class:     TestClass1
  26.115 + * Method:    samn
  26.116 + * Signature: ()[S
  26.117 + */
  26.118 +JNIEXPORT jshortArray JNICALL Java_TestClass1_samn
  26.119 +  (JNIEnv *, jobject);
  26.120 +
  26.121 +/*
  26.122 + * Class:     TestClass1
  26.123 + * Method:    iamn
  26.124 + * Signature: ()[I
  26.125 + */
  26.126 +JNIEXPORT jintArray JNICALL Java_TestClass1_iamn
  26.127 +  (JNIEnv *, jobject);
  26.128 +
  26.129 +/*
  26.130 + * Class:     TestClass1
  26.131 + * Method:    lamn
  26.132 + * Signature: ()[J
  26.133 + */
  26.134 +JNIEXPORT jlongArray JNICALL Java_TestClass1_lamn
  26.135 +  (JNIEnv *, jobject);
  26.136 +
  26.137 +/*
  26.138 + * Class:     TestClass1
  26.139 + * Method:    famn
  26.140 + * Signature: ()[F
  26.141 + */
  26.142 +JNIEXPORT jfloatArray JNICALL Java_TestClass1_famn
  26.143 +  (JNIEnv *, jobject);
  26.144 +
  26.145 +/*
  26.146 + * Class:     TestClass1
  26.147 + * Method:    damn
  26.148 + * Signature: ()[D
  26.149 + */
  26.150 +JNIEXPORT jdoubleArray JNICALL Java_TestClass1_damn
  26.151 +  (JNIEnv *, jobject);
  26.152 +
  26.153 +/*
  26.154 + * Class:     TestClass1
  26.155 + * Method:    oamn
  26.156 + * Signature: ()[Ljava/lang/Object;
  26.157 + */
  26.158 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_oamn
  26.159 +  (JNIEnv *, jobject);
  26.160 +
  26.161 +/*
  26.162 + * Class:     TestClass1
  26.163 + * Method:    tamn
  26.164 + * Signature: ()[Ljava/lang/String;
  26.165 + */
  26.166 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_tamn
  26.167 +  (JNIEnv *, jobject);
  26.168 +
  26.169 +/*
  26.170 + * Class:     TestClass1
  26.171 + * Method:    gamn
  26.172 + * Signature: ()[Ljava/util/List;
  26.173 + */
  26.174 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_gamn
  26.175 +  (JNIEnv *, jobject);
  26.176 +
  26.177 +/*
  26.178 + * Class:     TestClass1
  26.179 + * Method:    baamn
  26.180 + * Signature: ()[[B
  26.181 + */
  26.182 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_baamn
  26.183 +  (JNIEnv *, jobject);
  26.184 +
  26.185 +/*
  26.186 + * Class:     TestClass1
  26.187 + * Method:    saamn
  26.188 + * Signature: ()[[S
  26.189 + */
  26.190 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_saamn
  26.191 +  (JNIEnv *, jobject);
  26.192 +
  26.193 +/*
  26.194 + * Class:     TestClass1
  26.195 + * Method:    iaamn
  26.196 + * Signature: ()[[I
  26.197 + */
  26.198 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_iaamn
  26.199 +  (JNIEnv *, jobject);
  26.200 +
  26.201 +/*
  26.202 + * Class:     TestClass1
  26.203 + * Method:    laamn
  26.204 + * Signature: ()[[J
  26.205 + */
  26.206 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_laamn
  26.207 +  (JNIEnv *, jobject);
  26.208 +
  26.209 +/*
  26.210 + * Class:     TestClass1
  26.211 + * Method:    faamn
  26.212 + * Signature: ()[[F
  26.213 + */
  26.214 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_faamn
  26.215 +  (JNIEnv *, jobject);
  26.216 +
  26.217 +/*
  26.218 + * Class:     TestClass1
  26.219 + * Method:    daamn
  26.220 + * Signature: ()[[D
  26.221 + */
  26.222 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_daamn
  26.223 +  (JNIEnv *, jobject);
  26.224 +
  26.225 +/*
  26.226 + * Class:     TestClass1
  26.227 + * Method:    oaamn
  26.228 + * Signature: ()[[Ljava/lang/Object;
  26.229 + */
  26.230 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_oaamn
  26.231 +  (JNIEnv *, jobject);
  26.232 +
  26.233 +/*
  26.234 + * Class:     TestClass1
  26.235 + * Method:    taamn
  26.236 + * Signature: ()[[Ljava/lang/String;
  26.237 + */
  26.238 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_taamn
  26.239 +  (JNIEnv *, jobject);
  26.240 +
  26.241 +/*
  26.242 + * Class:     TestClass1
  26.243 + * Method:    gaamn
  26.244 + * Signature: ()[Ljava/util/List;
  26.245 + */
  26.246 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_gaamn
  26.247 +  (JNIEnv *, jobject);
  26.248 +
  26.249 +/*
  26.250 + * Class:     TestClass1
  26.251 + * Method:    bmn1
  26.252 + * Signature: ()B
  26.253 + */
  26.254 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn1
  26.255 +  (JNIEnv *, jobject);
  26.256 +
  26.257 +/*
  26.258 + * Class:     TestClass1
  26.259 + * Method:    smn1
  26.260 + * Signature: ()S
  26.261 + */
  26.262 +JNIEXPORT jshort JNICALL Java_TestClass1_smn1
  26.263 +  (JNIEnv *, jobject);
  26.264 +
  26.265 +/*
  26.266 + * Class:     TestClass1
  26.267 + * Method:    imn1
  26.268 + * Signature: ()I
  26.269 + */
  26.270 +JNIEXPORT jint JNICALL Java_TestClass1_imn1
  26.271 +  (JNIEnv *, jobject);
  26.272 +
  26.273 +/*
  26.274 + * Class:     TestClass1
  26.275 + * Method:    lmn1
  26.276 + * Signature: ()J
  26.277 + */
  26.278 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn1
  26.279 +  (JNIEnv *, jobject);
  26.280 +
  26.281 +/*
  26.282 + * Class:     TestClass1
  26.283 + * Method:    fmn1
  26.284 + * Signature: ()F
  26.285 + */
  26.286 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn1
  26.287 +  (JNIEnv *, jobject);
  26.288 +
  26.289 +/*
  26.290 + * Class:     TestClass1
  26.291 + * Method:    dmn1
  26.292 + * Signature: ()D
  26.293 + */
  26.294 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn1
  26.295 +  (JNIEnv *, jobject);
  26.296 +
  26.297 +/*
  26.298 + * Class:     TestClass1
  26.299 + * Method:    omn1
  26.300 + * Signature: ()Ljava/lang/Object;
  26.301 + */
  26.302 +JNIEXPORT jobject JNICALL Java_TestClass1_omn1
  26.303 +  (JNIEnv *, jobject);
  26.304 +
  26.305 +/*
  26.306 + * Class:     TestClass1
  26.307 + * Method:    tmn1
  26.308 + * Signature: ()Ljava/lang/String;
  26.309 + */
  26.310 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn1
  26.311 +  (JNIEnv *, jobject);
  26.312 +
  26.313 +/*
  26.314 + * Class:     TestClass1
  26.315 + * Method:    gmn1
  26.316 + * Signature: ()Ljava/util/List;
  26.317 + */
  26.318 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn1
  26.319 +  (JNIEnv *, jobject);
  26.320 +
  26.321 +/*
  26.322 + * Class:     TestClass1
  26.323 + * Method:    vmn1
  26.324 + * Signature: ()V
  26.325 + */
  26.326 +JNIEXPORT void JNICALL Java_TestClass1_vmn1
  26.327 +  (JNIEnv *, jobject);
  26.328 +
  26.329 +/*
  26.330 + * Class:     TestClass1
  26.331 + * Method:    bmn2
  26.332 + * Signature: (I)B
  26.333 + */
  26.334 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn2
  26.335 +  (JNIEnv *, jobject, jint);
  26.336 +
  26.337 +/*
  26.338 + * Class:     TestClass1
  26.339 + * Method:    smn2
  26.340 + * Signature: (I)S
  26.341 + */
  26.342 +JNIEXPORT jshort JNICALL Java_TestClass1_smn2
  26.343 +  (JNIEnv *, jobject, jint);
  26.344 +
  26.345 +/*
  26.346 + * Class:     TestClass1
  26.347 + * Method:    imn2
  26.348 + * Signature: (I)I
  26.349 + */
  26.350 +JNIEXPORT jint JNICALL Java_TestClass1_imn2
  26.351 +  (JNIEnv *, jobject, jint);
  26.352 +
  26.353 +/*
  26.354 + * Class:     TestClass1
  26.355 + * Method:    lmn2
  26.356 + * Signature: (I)J
  26.357 + */
  26.358 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn2
  26.359 +  (JNIEnv *, jobject, jint);
  26.360 +
  26.361 +/*
  26.362 + * Class:     TestClass1
  26.363 + * Method:    fmn2
  26.364 + * Signature: (I)F
  26.365 + */
  26.366 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn2
  26.367 +  (JNIEnv *, jobject, jint);
  26.368 +
  26.369 +/*
  26.370 + * Class:     TestClass1
  26.371 + * Method:    dmn2
  26.372 + * Signature: (I)D
  26.373 + */
  26.374 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn2
  26.375 +  (JNIEnv *, jobject, jint);
  26.376 +
  26.377 +/*
  26.378 + * Class:     TestClass1
  26.379 + * Method:    omn2
  26.380 + * Signature: (I)Ljava/lang/Object;
  26.381 + */
  26.382 +JNIEXPORT jobject JNICALL Java_TestClass1_omn2
  26.383 +  (JNIEnv *, jobject, jint);
  26.384 +
  26.385 +/*
  26.386 + * Class:     TestClass1
  26.387 + * Method:    tmn2
  26.388 + * Signature: (I)Ljava/lang/String;
  26.389 + */
  26.390 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn2
  26.391 +  (JNIEnv *, jobject, jint);
  26.392 +
  26.393 +/*
  26.394 + * Class:     TestClass1
  26.395 + * Method:    gmn2
  26.396 + * Signature: (I)Ljava/util/List;
  26.397 + */
  26.398 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn2
  26.399 +  (JNIEnv *, jobject, jint);
  26.400 +
  26.401 +/*
  26.402 + * Class:     TestClass1
  26.403 + * Method:    vmn2
  26.404 + * Signature: (I)V
  26.405 + */
  26.406 +JNIEXPORT void JNICALL Java_TestClass1_vmn2
  26.407 +  (JNIEnv *, jobject, jint);
  26.408 +
  26.409 +/*
  26.410 + * Class:     TestClass1
  26.411 + * Method:    mbn
  26.412 + * Signature: (B)V
  26.413 + */
  26.414 +JNIEXPORT void JNICALL Java_TestClass1_mbn
  26.415 +  (JNIEnv *, jobject, jbyte);
  26.416 +
  26.417 +/*
  26.418 + * Class:     TestClass1
  26.419 + * Method:    msn
  26.420 + * Signature: (S)V
  26.421 + */
  26.422 +JNIEXPORT void JNICALL Java_TestClass1_msn
  26.423 +  (JNIEnv *, jobject, jshort);
  26.424 +
  26.425 +/*
  26.426 + * Class:     TestClass1
  26.427 + * Method:    min
  26.428 + * Signature: (I)V
  26.429 + */
  26.430 +JNIEXPORT void JNICALL Java_TestClass1_min
  26.431 +  (JNIEnv *, jobject, jint);
  26.432 +
  26.433 +/*
  26.434 + * Class:     TestClass1
  26.435 + * Method:    mln
  26.436 + * Signature: (J)V
  26.437 + */
  26.438 +JNIEXPORT void JNICALL Java_TestClass1_mln
  26.439 +  (JNIEnv *, jobject, jlong);
  26.440 +
  26.441 +/*
  26.442 + * Class:     TestClass1
  26.443 + * Method:    mfn
  26.444 + * Signature: (F)V
  26.445 + */
  26.446 +JNIEXPORT void JNICALL Java_TestClass1_mfn
  26.447 +  (JNIEnv *, jobject, jfloat);
  26.448 +
  26.449 +/*
  26.450 + * Class:     TestClass1
  26.451 + * Method:    mdn
  26.452 + * Signature: (D)V
  26.453 + */
  26.454 +JNIEXPORT void JNICALL Java_TestClass1_mdn
  26.455 +  (JNIEnv *, jobject, jdouble);
  26.456 +
  26.457 +/*
  26.458 + * Class:     TestClass1
  26.459 + * Method:    mon
  26.460 + * Signature: (Ljava/lang/Object;)V
  26.461 + */
  26.462 +JNIEXPORT void JNICALL Java_TestClass1_mon
  26.463 +  (JNIEnv *, jobject, jobject);
  26.464 +
  26.465 +/*
  26.466 + * Class:     TestClass1
  26.467 + * Method:    mtn
  26.468 + * Signature: (Ljava/lang/String;)V
  26.469 + */
  26.470 +JNIEXPORT void JNICALL Java_TestClass1_mtn
  26.471 +  (JNIEnv *, jobject, jstring);
  26.472 +
  26.473 +/*
  26.474 + * Class:     TestClass1
  26.475 + * Method:    mgn
  26.476 + * Signature: (Ljava/util/List;)V
  26.477 + */
  26.478 +JNIEXPORT void JNICALL Java_TestClass1_mgn
  26.479 +  (JNIEnv *, jobject, jobject);
  26.480 +
  26.481 +#ifdef __cplusplus
  26.482 +}
  26.483 +#endif
  26.484 +#endif
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/test/tools/javah/6572945/gold/jni.dir.1/TestClass1_Inner1.h	Wed Sep 23 19:15:04 2009 -0700
    27.3 @@ -0,0 +1,337 @@
    27.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    27.5 +#include <jni.h>
    27.6 +/* Header for class TestClass1_Inner1 */
    27.7 +
    27.8 +#ifndef _Included_TestClass1_Inner1
    27.9 +#define _Included_TestClass1_Inner1
   27.10 +#ifdef __cplusplus
   27.11 +extern "C" {
   27.12 +#endif
   27.13 +#undef TestClass1_Inner1_bc
   27.14 +#define TestClass1_Inner1_bc 0L
   27.15 +#undef TestClass1_Inner1_sc
   27.16 +#define TestClass1_Inner1_sc 0L
   27.17 +#undef TestClass1_Inner1_ic
   27.18 +#define TestClass1_Inner1_ic 0L
   27.19 +#undef TestClass1_Inner1_lc
   27.20 +#define TestClass1_Inner1_lc 0LL
   27.21 +#undef TestClass1_Inner1_fc
   27.22 +#define TestClass1_Inner1_fc 0.0f
   27.23 +#undef TestClass1_Inner1_dc
   27.24 +#define TestClass1_Inner1_dc 0.0
   27.25 +/*
   27.26 + * Class:     TestClass1_Inner1
   27.27 + * Method:    bmn
   27.28 + * Signature: ()B
   27.29 + */
   27.30 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn
   27.31 +  (JNIEnv *, jobject);
   27.32 +
   27.33 +/*
   27.34 + * Class:     TestClass1_Inner1
   27.35 + * Method:    smn
   27.36 + * Signature: ()S
   27.37 + */
   27.38 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn
   27.39 +  (JNIEnv *, jobject);
   27.40 +
   27.41 +/*
   27.42 + * Class:     TestClass1_Inner1
   27.43 + * Method:    imn
   27.44 + * Signature: ()I
   27.45 + */
   27.46 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn
   27.47 +  (JNIEnv *, jobject);
   27.48 +
   27.49 +/*
   27.50 + * Class:     TestClass1_Inner1
   27.51 + * Method:    lmn
   27.52 + * Signature: ()J
   27.53 + */
   27.54 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn
   27.55 +  (JNIEnv *, jobject);
   27.56 +
   27.57 +/*
   27.58 + * Class:     TestClass1_Inner1
   27.59 + * Method:    fmn
   27.60 + * Signature: ()F
   27.61 + */
   27.62 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn
   27.63 +  (JNIEnv *, jobject);
   27.64 +
   27.65 +/*
   27.66 + * Class:     TestClass1_Inner1
   27.67 + * Method:    dmn
   27.68 + * Signature: ()D
   27.69 + */
   27.70 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn
   27.71 +  (JNIEnv *, jobject);
   27.72 +
   27.73 +/*
   27.74 + * Class:     TestClass1_Inner1
   27.75 + * Method:    omn
   27.76 + * Signature: ()Ljava/lang/Object;
   27.77 + */
   27.78 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn
   27.79 +  (JNIEnv *, jobject);
   27.80 +
   27.81 +/*
   27.82 + * Class:     TestClass1_Inner1
   27.83 + * Method:    tmn
   27.84 + * Signature: ()Ljava/lang/String;
   27.85 + */
   27.86 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn
   27.87 +  (JNIEnv *, jobject);
   27.88 +
   27.89 +/*
   27.90 + * Class:     TestClass1_Inner1
   27.91 + * Method:    gmn
   27.92 + * Signature: ()Ljava/util/List;
   27.93 + */
   27.94 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn
   27.95 +  (JNIEnv *, jobject);
   27.96 +
   27.97 +/*
   27.98 + * Class:     TestClass1_Inner1
   27.99 + * Method:    vmn
  27.100 + * Signature: ()V
  27.101 + */
  27.102 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn
  27.103 +  (JNIEnv *, jobject);
  27.104 +
  27.105 +/*
  27.106 + * Class:     TestClass1_Inner1
  27.107 + * Method:    bmn1
  27.108 + * Signature: ()B
  27.109 + */
  27.110 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn1
  27.111 +  (JNIEnv *, jobject);
  27.112 +
  27.113 +/*
  27.114 + * Class:     TestClass1_Inner1
  27.115 + * Method:    smn1
  27.116 + * Signature: ()S
  27.117 + */
  27.118 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn1
  27.119 +  (JNIEnv *, jobject);
  27.120 +
  27.121 +/*
  27.122 + * Class:     TestClass1_Inner1
  27.123 + * Method:    imn1
  27.124 + * Signature: ()I
  27.125 + */
  27.126 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn1
  27.127 +  (JNIEnv *, jobject);
  27.128 +
  27.129 +/*
  27.130 + * Class:     TestClass1_Inner1
  27.131 + * Method:    lmn1
  27.132 + * Signature: ()J
  27.133 + */
  27.134 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn1
  27.135 +  (JNIEnv *, jobject);
  27.136 +
  27.137 +/*
  27.138 + * Class:     TestClass1_Inner1
  27.139 + * Method:    fmn1
  27.140 + * Signature: ()F
  27.141 + */
  27.142 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn1
  27.143 +  (JNIEnv *, jobject);
  27.144 +
  27.145 +/*
  27.146 + * Class:     TestClass1_Inner1
  27.147 + * Method:    dmn1
  27.148 + * Signature: ()D
  27.149 + */
  27.150 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn1
  27.151 +  (JNIEnv *, jobject);
  27.152 +
  27.153 +/*
  27.154 + * Class:     TestClass1_Inner1
  27.155 + * Method:    omn1
  27.156 + * Signature: ()Ljava/lang/Object;
  27.157 + */
  27.158 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn1
  27.159 +  (JNIEnv *, jobject);
  27.160 +
  27.161 +/*
  27.162 + * Class:     TestClass1_Inner1
  27.163 + * Method:    tmn1
  27.164 + * Signature: ()Ljava/lang/String;
  27.165 + */
  27.166 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn1
  27.167 +  (JNIEnv *, jobject);
  27.168 +
  27.169 +/*
  27.170 + * Class:     TestClass1_Inner1
  27.171 + * Method:    gmn1
  27.172 + * Signature: ()Ljava/util/List;
  27.173 + */
  27.174 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn1
  27.175 +  (JNIEnv *, jobject);
  27.176 +
  27.177 +/*
  27.178 + * Class:     TestClass1_Inner1
  27.179 + * Method:    vmn1
  27.180 + * Signature: ()V
  27.181 + */
  27.182 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn1
  27.183 +  (JNIEnv *, jobject);
  27.184 +
  27.185 +/*
  27.186 + * Class:     TestClass1_Inner1
  27.187 + * Method:    bmn2
  27.188 + * Signature: (I)B
  27.189 + */
  27.190 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn2
  27.191 +  (JNIEnv *, jobject, jint);
  27.192 +
  27.193 +/*
  27.194 + * Class:     TestClass1_Inner1
  27.195 + * Method:    smn2
  27.196 + * Signature: (I)S
  27.197 + */
  27.198 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn2
  27.199 +  (JNIEnv *, jobject, jint);
  27.200 +
  27.201 +/*
  27.202 + * Class:     TestClass1_Inner1
  27.203 + * Method:    imn2
  27.204 + * Signature: (I)I
  27.205 + */
  27.206 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn2
  27.207 +  (JNIEnv *, jobject, jint);
  27.208 +
  27.209 +/*
  27.210 + * Class:     TestClass1_Inner1
  27.211 + * Method:    lmn2
  27.212 + * Signature: (I)J
  27.213 + */
  27.214 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn2
  27.215 +  (JNIEnv *, jobject, jint);
  27.216 +
  27.217 +/*
  27.218 + * Class:     TestClass1_Inner1
  27.219 + * Method:    fmn2
  27.220 + * Signature: (I)F
  27.221 + */
  27.222 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn2
  27.223 +  (JNIEnv *, jobject, jint);
  27.224 +
  27.225 +/*
  27.226 + * Class:     TestClass1_Inner1
  27.227 + * Method:    dmn2
  27.228 + * Signature: (I)D
  27.229 + */
  27.230 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn2
  27.231 +  (JNIEnv *, jobject, jint);
  27.232 +
  27.233 +/*
  27.234 + * Class:     TestClass1_Inner1
  27.235 + * Method:    omn2
  27.236 + * Signature: (I)Ljava/lang/Object;
  27.237 + */
  27.238 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn2
  27.239 +  (JNIEnv *, jobject, jint);
  27.240 +
  27.241 +/*
  27.242 + * Class:     TestClass1_Inner1
  27.243 + * Method:    tmn2
  27.244 + * Signature: (I)Ljava/lang/String;
  27.245 + */
  27.246 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn2
  27.247 +  (JNIEnv *, jobject, jint);
  27.248 +
  27.249 +/*
  27.250 + * Class:     TestClass1_Inner1
  27.251 + * Method:    gmn2
  27.252 + * Signature: (I)Ljava/util/List;
  27.253 + */
  27.254 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn2
  27.255 +  (JNIEnv *, jobject, jint);
  27.256 +
  27.257 +/*
  27.258 + * Class:     TestClass1_Inner1
  27.259 + * Method:    vmn2
  27.260 + * Signature: (I)V
  27.261 + */
  27.262 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn2
  27.263 +  (JNIEnv *, jobject, jint);
  27.264 +
  27.265 +/*
  27.266 + * Class:     TestClass1_Inner1
  27.267 + * Method:    mbn
  27.268 + * Signature: (B)V
  27.269 + */
  27.270 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mbn
  27.271 +  (JNIEnv *, jobject, jbyte);
  27.272 +
  27.273 +/*
  27.274 + * Class:     TestClass1_Inner1
  27.275 + * Method:    msn
  27.276 + * Signature: (S)V
  27.277 + */
  27.278 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_msn
  27.279 +  (JNIEnv *, jobject, jshort);
  27.280 +
  27.281 +/*
  27.282 + * Class:     TestClass1_Inner1
  27.283 + * Method:    min
  27.284 + * Signature: (I)V
  27.285 + */
  27.286 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_min
  27.287 +  (JNIEnv *, jobject, jint);
  27.288 +
  27.289 +/*
  27.290 + * Class:     TestClass1_Inner1
  27.291 + * Method:    mln
  27.292 + * Signature: (J)V
  27.293 + */
  27.294 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mln
  27.295 +  (JNIEnv *, jobject, jlong);
  27.296 +
  27.297 +/*
  27.298 + * Class:     TestClass1_Inner1
  27.299 + * Method:    mfn
  27.300 + * Signature: (F)V
  27.301 + */
  27.302 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mfn
  27.303 +  (JNIEnv *, jobject, jfloat);
  27.304 +
  27.305 +/*
  27.306 + * Class:     TestClass1_Inner1
  27.307 + * Method:    mdn
  27.308 + * Signature: (D)V
  27.309 + */
  27.310 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mdn
  27.311 +  (JNIEnv *, jobject, jdouble);
  27.312 +
  27.313 +/*
  27.314 + * Class:     TestClass1_Inner1
  27.315 + * Method:    mon
  27.316 + * Signature: (Ljava/lang/Object;)V
  27.317 + */
  27.318 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mon
  27.319 +  (JNIEnv *, jobject, jobject);
  27.320 +
  27.321 +/*
  27.322 + * Class:     TestClass1_Inner1
  27.323 + * Method:    mtn
  27.324 + * Signature: (Ljava/lang/String;)V
  27.325 + */
  27.326 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mtn
  27.327 +  (JNIEnv *, jobject, jstring);
  27.328 +
  27.329 +/*
  27.330 + * Class:     TestClass1_Inner1
  27.331 + * Method:    mgn
  27.332 + * Signature: (Ljava/util/List;)V
  27.333 + */
  27.334 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mgn
  27.335 +  (JNIEnv *, jobject, jobject);
  27.336 +
  27.337 +#ifdef __cplusplus
  27.338 +}
  27.339 +#endif
  27.340 +#endif
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/test/tools/javah/6572945/gold/jni.dir.1/TestClass1_Inner2.h	Wed Sep 23 19:15:04 2009 -0700
    28.3 @@ -0,0 +1,337 @@
    28.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    28.5 +#include <jni.h>
    28.6 +/* Header for class TestClass1_Inner2 */
    28.7 +
    28.8 +#ifndef _Included_TestClass1_Inner2
    28.9 +#define _Included_TestClass1_Inner2
   28.10 +#ifdef __cplusplus
   28.11 +extern "C" {
   28.12 +#endif
   28.13 +#undef TestClass1_Inner2_bc
   28.14 +#define TestClass1_Inner2_bc 0L
   28.15 +#undef TestClass1_Inner2_sc
   28.16 +#define TestClass1_Inner2_sc 0L
   28.17 +#undef TestClass1_Inner2_ic
   28.18 +#define TestClass1_Inner2_ic 0L
   28.19 +#undef TestClass1_Inner2_lc
   28.20 +#define TestClass1_Inner2_lc 0LL
   28.21 +#undef TestClass1_Inner2_fc
   28.22 +#define TestClass1_Inner2_fc 0.0f
   28.23 +#undef TestClass1_Inner2_dc
   28.24 +#define TestClass1_Inner2_dc 0.0
   28.25 +/*
   28.26 + * Class:     TestClass1_Inner2
   28.27 + * Method:    bmn
   28.28 + * Signature: ()B
   28.29 + */
   28.30 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn
   28.31 +  (JNIEnv *, jobject);
   28.32 +
   28.33 +/*
   28.34 + * Class:     TestClass1_Inner2
   28.35 + * Method:    smn
   28.36 + * Signature: ()S
   28.37 + */
   28.38 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn
   28.39 +  (JNIEnv *, jobject);
   28.40 +
   28.41 +/*
   28.42 + * Class:     TestClass1_Inner2
   28.43 + * Method:    imn
   28.44 + * Signature: ()I
   28.45 + */
   28.46 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn
   28.47 +  (JNIEnv *, jobject);
   28.48 +
   28.49 +/*
   28.50 + * Class:     TestClass1_Inner2
   28.51 + * Method:    lmn
   28.52 + * Signature: ()J
   28.53 + */
   28.54 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn
   28.55 +  (JNIEnv *, jobject);
   28.56 +
   28.57 +/*
   28.58 + * Class:     TestClass1_Inner2
   28.59 + * Method:    fmn
   28.60 + * Signature: ()F
   28.61 + */
   28.62 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn
   28.63 +  (JNIEnv *, jobject);
   28.64 +
   28.65 +/*
   28.66 + * Class:     TestClass1_Inner2
   28.67 + * Method:    dmn
   28.68 + * Signature: ()D
   28.69 + */
   28.70 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn
   28.71 +  (JNIEnv *, jobject);
   28.72 +
   28.73 +/*
   28.74 + * Class:     TestClass1_Inner2
   28.75 + * Method:    omn
   28.76 + * Signature: ()Ljava/lang/Object;
   28.77 + */
   28.78 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn
   28.79 +  (JNIEnv *, jobject);
   28.80 +
   28.81 +/*
   28.82 + * Class:     TestClass1_Inner2
   28.83 + * Method:    tmn
   28.84 + * Signature: ()Ljava/lang/String;
   28.85 + */
   28.86 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn
   28.87 +  (JNIEnv *, jobject);
   28.88 +
   28.89 +/*
   28.90 + * Class:     TestClass1_Inner2
   28.91 + * Method:    gmn
   28.92 + * Signature: ()Ljava/util/List;
   28.93 + */
   28.94 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn
   28.95 +  (JNIEnv *, jobject);
   28.96 +
   28.97 +/*
   28.98 + * Class:     TestClass1_Inner2
   28.99 + * Method:    vmn
  28.100 + * Signature: ()V
  28.101 + */
  28.102 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn
  28.103 +  (JNIEnv *, jobject);
  28.104 +
  28.105 +/*
  28.106 + * Class:     TestClass1_Inner2
  28.107 + * Method:    bmn1
  28.108 + * Signature: ()B
  28.109 + */
  28.110 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn1
  28.111 +  (JNIEnv *, jobject);
  28.112 +
  28.113 +/*
  28.114 + * Class:     TestClass1_Inner2
  28.115 + * Method:    smn1
  28.116 + * Signature: ()S
  28.117 + */
  28.118 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn1
  28.119 +  (JNIEnv *, jobject);
  28.120 +
  28.121 +/*
  28.122 + * Class:     TestClass1_Inner2
  28.123 + * Method:    imn1
  28.124 + * Signature: ()I
  28.125 + */
  28.126 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn1
  28.127 +  (JNIEnv *, jobject);
  28.128 +
  28.129 +/*
  28.130 + * Class:     TestClass1_Inner2
  28.131 + * Method:    lmn1
  28.132 + * Signature: ()J
  28.133 + */
  28.134 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn1
  28.135 +  (JNIEnv *, jobject);
  28.136 +
  28.137 +/*
  28.138 + * Class:     TestClass1_Inner2
  28.139 + * Method:    fmn1
  28.140 + * Signature: ()F
  28.141 + */
  28.142 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn1
  28.143 +  (JNIEnv *, jobject);
  28.144 +
  28.145 +/*
  28.146 + * Class:     TestClass1_Inner2
  28.147 + * Method:    dmn1
  28.148 + * Signature: ()D
  28.149 + */
  28.150 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn1
  28.151 +  (JNIEnv *, jobject);
  28.152 +
  28.153 +/*
  28.154 + * Class:     TestClass1_Inner2
  28.155 + * Method:    omn1
  28.156 + * Signature: ()Ljava/lang/Object;
  28.157 + */
  28.158 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn1
  28.159 +  (JNIEnv *, jobject);
  28.160 +
  28.161 +/*
  28.162 + * Class:     TestClass1_Inner2
  28.163 + * Method:    tmn1
  28.164 + * Signature: ()Ljava/lang/String;
  28.165 + */
  28.166 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn1
  28.167 +  (JNIEnv *, jobject);
  28.168 +
  28.169 +/*
  28.170 + * Class:     TestClass1_Inner2
  28.171 + * Method:    gmn1
  28.172 + * Signature: ()Ljava/util/List;
  28.173 + */
  28.174 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn1
  28.175 +  (JNIEnv *, jobject);
  28.176 +
  28.177 +/*
  28.178 + * Class:     TestClass1_Inner2
  28.179 + * Method:    vmn1
  28.180 + * Signature: ()V
  28.181 + */
  28.182 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn1
  28.183 +  (JNIEnv *, jobject);
  28.184 +
  28.185 +/*
  28.186 + * Class:     TestClass1_Inner2
  28.187 + * Method:    bmn2
  28.188 + * Signature: (I)B
  28.189 + */
  28.190 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn2
  28.191 +  (JNIEnv *, jobject, jint);
  28.192 +
  28.193 +/*
  28.194 + * Class:     TestClass1_Inner2
  28.195 + * Method:    smn2
  28.196 + * Signature: (I)S
  28.197 + */
  28.198 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn2
  28.199 +  (JNIEnv *, jobject, jint);
  28.200 +
  28.201 +/*
  28.202 + * Class:     TestClass1_Inner2
  28.203 + * Method:    imn2
  28.204 + * Signature: (I)I
  28.205 + */
  28.206 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn2
  28.207 +  (JNIEnv *, jobject, jint);
  28.208 +
  28.209 +/*
  28.210 + * Class:     TestClass1_Inner2
  28.211 + * Method:    lmn2
  28.212 + * Signature: (I)J
  28.213 + */
  28.214 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn2
  28.215 +  (JNIEnv *, jobject, jint);
  28.216 +
  28.217 +/*
  28.218 + * Class:     TestClass1_Inner2
  28.219 + * Method:    fmn2
  28.220 + * Signature: (I)F
  28.221 + */
  28.222 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn2
  28.223 +  (JNIEnv *, jobject, jint);
  28.224 +
  28.225 +/*
  28.226 + * Class:     TestClass1_Inner2
  28.227 + * Method:    dmn2
  28.228 + * Signature: (I)D
  28.229 + */
  28.230 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn2
  28.231 +  (JNIEnv *, jobject, jint);
  28.232 +
  28.233 +/*
  28.234 + * Class:     TestClass1_Inner2
  28.235 + * Method:    omn2
  28.236 + * Signature: (I)Ljava/lang/Object;
  28.237 + */
  28.238 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn2
  28.239 +  (JNIEnv *, jobject, jint);
  28.240 +
  28.241 +/*
  28.242 + * Class:     TestClass1_Inner2
  28.243 + * Method:    tmn2
  28.244 + * Signature: (I)Ljava/lang/String;
  28.245 + */
  28.246 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn2
  28.247 +  (JNIEnv *, jobject, jint);
  28.248 +
  28.249 +/*
  28.250 + * Class:     TestClass1_Inner2
  28.251 + * Method:    gmn2
  28.252 + * Signature: (I)Ljava/util/List;
  28.253 + */
  28.254 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn2
  28.255 +  (JNIEnv *, jobject, jint);
  28.256 +
  28.257 +/*
  28.258 + * Class:     TestClass1_Inner2
  28.259 + * Method:    vmn2
  28.260 + * Signature: (I)V
  28.261 + */
  28.262 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn2
  28.263 +  (JNIEnv *, jobject, jint);
  28.264 +
  28.265 +/*
  28.266 + * Class:     TestClass1_Inner2
  28.267 + * Method:    mbn
  28.268 + * Signature: (B)V
  28.269 + */
  28.270 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mbn
  28.271 +  (JNIEnv *, jobject, jbyte);
  28.272 +
  28.273 +/*
  28.274 + * Class:     TestClass1_Inner2
  28.275 + * Method:    msn
  28.276 + * Signature: (S)V
  28.277 + */
  28.278 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_msn
  28.279 +  (JNIEnv *, jobject, jshort);
  28.280 +
  28.281 +/*
  28.282 + * Class:     TestClass1_Inner2
  28.283 + * Method:    min
  28.284 + * Signature: (I)V
  28.285 + */
  28.286 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_min
  28.287 +  (JNIEnv *, jobject, jint);
  28.288 +
  28.289 +/*
  28.290 + * Class:     TestClass1_Inner2
  28.291 + * Method:    mln
  28.292 + * Signature: (J)V
  28.293 + */
  28.294 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mln
  28.295 +  (JNIEnv *, jobject, jlong);
  28.296 +
  28.297 +/*
  28.298 + * Class:     TestClass1_Inner2
  28.299 + * Method:    mfn
  28.300 + * Signature: (F)V
  28.301 + */
  28.302 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mfn
  28.303 +  (JNIEnv *, jobject, jfloat);
  28.304 +
  28.305 +/*
  28.306 + * Class:     TestClass1_Inner2
  28.307 + * Method:    mdn
  28.308 + * Signature: (D)V
  28.309 + */
  28.310 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mdn
  28.311 +  (JNIEnv *, jobject, jdouble);
  28.312 +
  28.313 +/*
  28.314 + * Class:     TestClass1_Inner2
  28.315 + * Method:    mon
  28.316 + * Signature: (Ljava/lang/Object;)V
  28.317 + */
  28.318 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mon
  28.319 +  (JNIEnv *, jobject, jobject);
  28.320 +
  28.321 +/*
  28.322 + * Class:     TestClass1_Inner2
  28.323 + * Method:    mtn
  28.324 + * Signature: (Ljava/lang/String;)V
  28.325 + */
  28.326 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mtn
  28.327 +  (JNIEnv *, jobject, jstring);
  28.328 +
  28.329 +/*
  28.330 + * Class:     TestClass1_Inner2
  28.331 + * Method:    mgn
  28.332 + * Signature: (Ljava/util/List;)V
  28.333 + */
  28.334 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mgn
  28.335 +  (JNIEnv *, jobject, jobject);
  28.336 +
  28.337 +#ifdef __cplusplus
  28.338 +}
  28.339 +#endif
  28.340 +#endif
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/test/tools/javah/6572945/gold/jni.dir.1/TestClass2.h	Wed Sep 23 19:15:04 2009 -0700
    29.3 @@ -0,0 +1,13 @@
    29.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    29.5 +#include <jni.h>
    29.6 +/* Header for class TestClass2 */
    29.7 +
    29.8 +#ifndef _Included_TestClass2
    29.9 +#define _Included_TestClass2
   29.10 +#ifdef __cplusplus
   29.11 +extern "C" {
   29.12 +#endif
   29.13 +#ifdef __cplusplus
   29.14 +}
   29.15 +#endif
   29.16 +#endif
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/test/tools/javah/6572945/gold/jni.file.1	Wed Sep 23 19:15:04 2009 -0700
    30.3 @@ -0,0 +1,1151 @@
    30.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    30.5 +#include <jni.h>
    30.6 +/* Header for class TestClass1 */
    30.7 +
    30.8 +#ifndef _Included_TestClass1
    30.9 +#define _Included_TestClass1
   30.10 +#ifdef __cplusplus
   30.11 +extern "C" {
   30.12 +#endif
   30.13 +#undef TestClass1_bc
   30.14 +#define TestClass1_bc 0L
   30.15 +#undef TestClass1_sc
   30.16 +#define TestClass1_sc 0L
   30.17 +#undef TestClass1_ic
   30.18 +#define TestClass1_ic 0L
   30.19 +#undef TestClass1_lc
   30.20 +#define TestClass1_lc 0LL
   30.21 +#undef TestClass1_fc
   30.22 +#define TestClass1_fc 0.0f
   30.23 +#undef TestClass1_dc
   30.24 +#define TestClass1_dc 0.0
   30.25 +/*
   30.26 + * Class:     TestClass1
   30.27 + * Method:    bmn
   30.28 + * Signature: ()B
   30.29 + */
   30.30 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn
   30.31 +  (JNIEnv *, jobject);
   30.32 +
   30.33 +/*
   30.34 + * Class:     TestClass1
   30.35 + * Method:    smn
   30.36 + * Signature: ()S
   30.37 + */
   30.38 +JNIEXPORT jshort JNICALL Java_TestClass1_smn
   30.39 +  (JNIEnv *, jobject);
   30.40 +
   30.41 +/*
   30.42 + * Class:     TestClass1
   30.43 + * Method:    imn
   30.44 + * Signature: ()I
   30.45 + */
   30.46 +JNIEXPORT jint JNICALL Java_TestClass1_imn
   30.47 +  (JNIEnv *, jobject);
   30.48 +
   30.49 +/*
   30.50 + * Class:     TestClass1
   30.51 + * Method:    lmn
   30.52 + * Signature: ()J
   30.53 + */
   30.54 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn
   30.55 +  (JNIEnv *, jobject);
   30.56 +
   30.57 +/*
   30.58 + * Class:     TestClass1
   30.59 + * Method:    fmn
   30.60 + * Signature: ()F
   30.61 + */
   30.62 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn
   30.63 +  (JNIEnv *, jobject);
   30.64 +
   30.65 +/*
   30.66 + * Class:     TestClass1
   30.67 + * Method:    dmn
   30.68 + * Signature: ()D
   30.69 + */
   30.70 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn
   30.71 +  (JNIEnv *, jobject);
   30.72 +
   30.73 +/*
   30.74 + * Class:     TestClass1
   30.75 + * Method:    omn
   30.76 + * Signature: ()Ljava/lang/Object;
   30.77 + */
   30.78 +JNIEXPORT jobject JNICALL Java_TestClass1_omn
   30.79 +  (JNIEnv *, jobject);
   30.80 +
   30.81 +/*
   30.82 + * Class:     TestClass1
   30.83 + * Method:    tmn
   30.84 + * Signature: ()Ljava/lang/String;
   30.85 + */
   30.86 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn
   30.87 +  (JNIEnv *, jobject);
   30.88 +
   30.89 +/*
   30.90 + * Class:     TestClass1
   30.91 + * Method:    gmn
   30.92 + * Signature: ()Ljava/util/List;
   30.93 + */
   30.94 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn
   30.95 +  (JNIEnv *, jobject);
   30.96 +
   30.97 +/*
   30.98 + * Class:     TestClass1
   30.99 + * Method:    vmn
  30.100 + * Signature: ()V
  30.101 + */
  30.102 +JNIEXPORT void JNICALL Java_TestClass1_vmn
  30.103 +  (JNIEnv *, jobject);
  30.104 +
  30.105 +/*
  30.106 + * Class:     TestClass1
  30.107 + * Method:    bamn
  30.108 + * Signature: ()[B
  30.109 + */
  30.110 +JNIEXPORT jbyteArray JNICALL Java_TestClass1_bamn
  30.111 +  (JNIEnv *, jobject);
  30.112 +
  30.113 +/*
  30.114 + * Class:     TestClass1
  30.115 + * Method:    samn
  30.116 + * Signature: ()[S
  30.117 + */
  30.118 +JNIEXPORT jshortArray JNICALL Java_TestClass1_samn
  30.119 +  (JNIEnv *, jobject);
  30.120 +
  30.121 +/*
  30.122 + * Class:     TestClass1
  30.123 + * Method:    iamn
  30.124 + * Signature: ()[I
  30.125 + */
  30.126 +JNIEXPORT jintArray JNICALL Java_TestClass1_iamn
  30.127 +  (JNIEnv *, jobject);
  30.128 +
  30.129 +/*
  30.130 + * Class:     TestClass1
  30.131 + * Method:    lamn
  30.132 + * Signature: ()[J
  30.133 + */
  30.134 +JNIEXPORT jlongArray JNICALL Java_TestClass1_lamn
  30.135 +  (JNIEnv *, jobject);
  30.136 +
  30.137 +/*
  30.138 + * Class:     TestClass1
  30.139 + * Method:    famn
  30.140 + * Signature: ()[F
  30.141 + */
  30.142 +JNIEXPORT jfloatArray JNICALL Java_TestClass1_famn
  30.143 +  (JNIEnv *, jobject);
  30.144 +
  30.145 +/*
  30.146 + * Class:     TestClass1
  30.147 + * Method:    damn
  30.148 + * Signature: ()[D
  30.149 + */
  30.150 +JNIEXPORT jdoubleArray JNICALL Java_TestClass1_damn
  30.151 +  (JNIEnv *, jobject);
  30.152 +
  30.153 +/*
  30.154 + * Class:     TestClass1
  30.155 + * Method:    oamn
  30.156 + * Signature: ()[Ljava/lang/Object;
  30.157 + */
  30.158 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_oamn
  30.159 +  (JNIEnv *, jobject);
  30.160 +
  30.161 +/*
  30.162 + * Class:     TestClass1
  30.163 + * Method:    tamn
  30.164 + * Signature: ()[Ljava/lang/String;
  30.165 + */
  30.166 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_tamn
  30.167 +  (JNIEnv *, jobject);
  30.168 +
  30.169 +/*
  30.170 + * Class:     TestClass1
  30.171 + * Method:    gamn
  30.172 + * Signature: ()[Ljava/util/List;
  30.173 + */
  30.174 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_gamn
  30.175 +  (JNIEnv *, jobject);
  30.176 +
  30.177 +/*
  30.178 + * Class:     TestClass1
  30.179 + * Method:    baamn
  30.180 + * Signature: ()[[B
  30.181 + */
  30.182 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_baamn
  30.183 +  (JNIEnv *, jobject);
  30.184 +
  30.185 +/*
  30.186 + * Class:     TestClass1
  30.187 + * Method:    saamn
  30.188 + * Signature: ()[[S
  30.189 + */
  30.190 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_saamn
  30.191 +  (JNIEnv *, jobject);
  30.192 +
  30.193 +/*
  30.194 + * Class:     TestClass1
  30.195 + * Method:    iaamn
  30.196 + * Signature: ()[[I
  30.197 + */
  30.198 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_iaamn
  30.199 +  (JNIEnv *, jobject);
  30.200 +
  30.201 +/*
  30.202 + * Class:     TestClass1
  30.203 + * Method:    laamn
  30.204 + * Signature: ()[[J
  30.205 + */
  30.206 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_laamn
  30.207 +  (JNIEnv *, jobject);
  30.208 +
  30.209 +/*
  30.210 + * Class:     TestClass1
  30.211 + * Method:    faamn
  30.212 + * Signature: ()[[F
  30.213 + */
  30.214 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_faamn
  30.215 +  (JNIEnv *, jobject);
  30.216 +
  30.217 +/*
  30.218 + * Class:     TestClass1
  30.219 + * Method:    daamn
  30.220 + * Signature: ()[[D
  30.221 + */
  30.222 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_daamn
  30.223 +  (JNIEnv *, jobject);
  30.224 +
  30.225 +/*
  30.226 + * Class:     TestClass1
  30.227 + * Method:    oaamn
  30.228 + * Signature: ()[[Ljava/lang/Object;
  30.229 + */
  30.230 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_oaamn
  30.231 +  (JNIEnv *, jobject);
  30.232 +
  30.233 +/*
  30.234 + * Class:     TestClass1
  30.235 + * Method:    taamn
  30.236 + * Signature: ()[[Ljava/lang/String;
  30.237 + */
  30.238 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_taamn
  30.239 +  (JNIEnv *, jobject);
  30.240 +
  30.241 +/*
  30.242 + * Class:     TestClass1
  30.243 + * Method:    gaamn
  30.244 + * Signature: ()[Ljava/util/List;
  30.245 + */
  30.246 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_gaamn
  30.247 +  (JNIEnv *, jobject);
  30.248 +
  30.249 +/*
  30.250 + * Class:     TestClass1
  30.251 + * Method:    bmn1
  30.252 + * Signature: ()B
  30.253 + */
  30.254 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn1
  30.255 +  (JNIEnv *, jobject);
  30.256 +
  30.257 +/*
  30.258 + * Class:     TestClass1
  30.259 + * Method:    smn1
  30.260 + * Signature: ()S
  30.261 + */
  30.262 +JNIEXPORT jshort JNICALL Java_TestClass1_smn1
  30.263 +  (JNIEnv *, jobject);
  30.264 +
  30.265 +/*
  30.266 + * Class:     TestClass1
  30.267 + * Method:    imn1
  30.268 + * Signature: ()I
  30.269 + */
  30.270 +JNIEXPORT jint JNICALL Java_TestClass1_imn1
  30.271 +  (JNIEnv *, jobject);
  30.272 +
  30.273 +/*
  30.274 + * Class:     TestClass1
  30.275 + * Method:    lmn1
  30.276 + * Signature: ()J
  30.277 + */
  30.278 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn1
  30.279 +  (JNIEnv *, jobject);
  30.280 +
  30.281 +/*
  30.282 + * Class:     TestClass1
  30.283 + * Method:    fmn1
  30.284 + * Signature: ()F
  30.285 + */
  30.286 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn1
  30.287 +  (JNIEnv *, jobject);
  30.288 +
  30.289 +/*
  30.290 + * Class:     TestClass1
  30.291 + * Method:    dmn1
  30.292 + * Signature: ()D
  30.293 + */
  30.294 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn1
  30.295 +  (JNIEnv *, jobject);
  30.296 +
  30.297 +/*
  30.298 + * Class:     TestClass1
  30.299 + * Method:    omn1
  30.300 + * Signature: ()Ljava/lang/Object;
  30.301 + */
  30.302 +JNIEXPORT jobject JNICALL Java_TestClass1_omn1
  30.303 +  (JNIEnv *, jobject);
  30.304 +
  30.305 +/*
  30.306 + * Class:     TestClass1
  30.307 + * Method:    tmn1
  30.308 + * Signature: ()Ljava/lang/String;
  30.309 + */
  30.310 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn1
  30.311 +  (JNIEnv *, jobject);
  30.312 +
  30.313 +/*
  30.314 + * Class:     TestClass1
  30.315 + * Method:    gmn1
  30.316 + * Signature: ()Ljava/util/List;
  30.317 + */
  30.318 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn1
  30.319 +  (JNIEnv *, jobject);
  30.320 +
  30.321 +/*
  30.322 + * Class:     TestClass1
  30.323 + * Method:    vmn1
  30.324 + * Signature: ()V
  30.325 + */
  30.326 +JNIEXPORT void JNICALL Java_TestClass1_vmn1
  30.327 +  (JNIEnv *, jobject);
  30.328 +
  30.329 +/*
  30.330 + * Class:     TestClass1
  30.331 + * Method:    bmn2
  30.332 + * Signature: (I)B
  30.333 + */
  30.334 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn2
  30.335 +  (JNIEnv *, jobject, jint);
  30.336 +
  30.337 +/*
  30.338 + * Class:     TestClass1
  30.339 + * Method:    smn2
  30.340 + * Signature: (I)S
  30.341 + */
  30.342 +JNIEXPORT jshort JNICALL Java_TestClass1_smn2
  30.343 +  (JNIEnv *, jobject, jint);
  30.344 +
  30.345 +/*
  30.346 + * Class:     TestClass1
  30.347 + * Method:    imn2
  30.348 + * Signature: (I)I
  30.349 + */
  30.350 +JNIEXPORT jint JNICALL Java_TestClass1_imn2
  30.351 +  (JNIEnv *, jobject, jint);
  30.352 +
  30.353 +/*
  30.354 + * Class:     TestClass1
  30.355 + * Method:    lmn2
  30.356 + * Signature: (I)J
  30.357 + */
  30.358 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn2
  30.359 +  (JNIEnv *, jobject, jint);
  30.360 +
  30.361 +/*
  30.362 + * Class:     TestClass1
  30.363 + * Method:    fmn2
  30.364 + * Signature: (I)F
  30.365 + */
  30.366 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn2
  30.367 +  (JNIEnv *, jobject, jint);
  30.368 +
  30.369 +/*
  30.370 + * Class:     TestClass1
  30.371 + * Method:    dmn2
  30.372 + * Signature: (I)D
  30.373 + */
  30.374 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn2
  30.375 +  (JNIEnv *, jobject, jint);
  30.376 +
  30.377 +/*
  30.378 + * Class:     TestClass1
  30.379 + * Method:    omn2
  30.380 + * Signature: (I)Ljava/lang/Object;
  30.381 + */
  30.382 +JNIEXPORT jobject JNICALL Java_TestClass1_omn2
  30.383 +  (JNIEnv *, jobject, jint);
  30.384 +
  30.385 +/*
  30.386 + * Class:     TestClass1
  30.387 + * Method:    tmn2
  30.388 + * Signature: (I)Ljava/lang/String;
  30.389 + */
  30.390 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn2
  30.391 +  (JNIEnv *, jobject, jint);
  30.392 +
  30.393 +/*
  30.394 + * Class:     TestClass1
  30.395 + * Method:    gmn2
  30.396 + * Signature: (I)Ljava/util/List;
  30.397 + */
  30.398 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn2
  30.399 +  (JNIEnv *, jobject, jint);
  30.400 +
  30.401 +/*
  30.402 + * Class:     TestClass1
  30.403 + * Method:    vmn2
  30.404 + * Signature: (I)V
  30.405 + */
  30.406 +JNIEXPORT void JNICALL Java_TestClass1_vmn2
  30.407 +  (JNIEnv *, jobject, jint);
  30.408 +
  30.409 +/*
  30.410 + * Class:     TestClass1
  30.411 + * Method:    mbn
  30.412 + * Signature: (B)V
  30.413 + */
  30.414 +JNIEXPORT void JNICALL Java_TestClass1_mbn
  30.415 +  (JNIEnv *, jobject, jbyte);
  30.416 +
  30.417 +/*
  30.418 + * Class:     TestClass1
  30.419 + * Method:    msn
  30.420 + * Signature: (S)V
  30.421 + */
  30.422 +JNIEXPORT void JNICALL Java_TestClass1_msn
  30.423 +  (JNIEnv *, jobject, jshort);
  30.424 +
  30.425 +/*
  30.426 + * Class:     TestClass1
  30.427 + * Method:    min
  30.428 + * Signature: (I)V
  30.429 + */
  30.430 +JNIEXPORT void JNICALL Java_TestClass1_min
  30.431 +  (JNIEnv *, jobject, jint);
  30.432 +
  30.433 +/*
  30.434 + * Class:     TestClass1
  30.435 + * Method:    mln
  30.436 + * Signature: (J)V
  30.437 + */
  30.438 +JNIEXPORT void JNICALL Java_TestClass1_mln
  30.439 +  (JNIEnv *, jobject, jlong);
  30.440 +
  30.441 +/*
  30.442 + * Class:     TestClass1
  30.443 + * Method:    mfn
  30.444 + * Signature: (F)V
  30.445 + */
  30.446 +JNIEXPORT void JNICALL Java_TestClass1_mfn
  30.447 +  (JNIEnv *, jobject, jfloat);
  30.448 +
  30.449 +/*
  30.450 + * Class:     TestClass1
  30.451 + * Method:    mdn
  30.452 + * Signature: (D)V
  30.453 + */
  30.454 +JNIEXPORT void JNICALL Java_TestClass1_mdn
  30.455 +  (JNIEnv *, jobject, jdouble);
  30.456 +
  30.457 +/*
  30.458 + * Class:     TestClass1
  30.459 + * Method:    mon
  30.460 + * Signature: (Ljava/lang/Object;)V
  30.461 + */
  30.462 +JNIEXPORT void JNICALL Java_TestClass1_mon
  30.463 +  (JNIEnv *, jobject, jobject);
  30.464 +
  30.465 +/*
  30.466 + * Class:     TestClass1
  30.467 + * Method:    mtn
  30.468 + * Signature: (Ljava/lang/String;)V
  30.469 + */
  30.470 +JNIEXPORT void JNICALL Java_TestClass1_mtn
  30.471 +  (JNIEnv *, jobject, jstring);
  30.472 +
  30.473 +/*
  30.474 + * Class:     TestClass1
  30.475 + * Method:    mgn
  30.476 + * Signature: (Ljava/util/List;)V
  30.477 + */
  30.478 +JNIEXPORT void JNICALL Java_TestClass1_mgn
  30.479 +  (JNIEnv *, jobject, jobject);
  30.480 +
  30.481 +#ifdef __cplusplus
  30.482 +}
  30.483 +#endif
  30.484 +#endif
  30.485 +/* Header for class TestClass1_Inner2 */
  30.486 +
  30.487 +#ifndef _Included_TestClass1_Inner2
  30.488 +#define _Included_TestClass1_Inner2
  30.489 +#ifdef __cplusplus
  30.490 +extern "C" {
  30.491 +#endif
  30.492 +#undef TestClass1_Inner2_bc
  30.493 +#define TestClass1_Inner2_bc 0L
  30.494 +#undef TestClass1_Inner2_sc
  30.495 +#define TestClass1_Inner2_sc 0L
  30.496 +#undef TestClass1_Inner2_ic
  30.497 +#define TestClass1_Inner2_ic 0L
  30.498 +#undef TestClass1_Inner2_lc
  30.499 +#define TestClass1_Inner2_lc 0LL
  30.500 +#undef TestClass1_Inner2_fc
  30.501 +#define TestClass1_Inner2_fc 0.0f
  30.502 +#undef TestClass1_Inner2_dc
  30.503 +#define TestClass1_Inner2_dc 0.0
  30.504 +/*
  30.505 + * Class:     TestClass1_Inner2
  30.506 + * Method:    bmn
  30.507 + * Signature: ()B
  30.508 + */
  30.509 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn
  30.510 +  (JNIEnv *, jobject);
  30.511 +
  30.512 +/*
  30.513 + * Class:     TestClass1_Inner2
  30.514 + * Method:    smn
  30.515 + * Signature: ()S
  30.516 + */
  30.517 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn
  30.518 +  (JNIEnv *, jobject);
  30.519 +
  30.520 +/*
  30.521 + * Class:     TestClass1_Inner2
  30.522 + * Method:    imn
  30.523 + * Signature: ()I
  30.524 + */
  30.525 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn
  30.526 +  (JNIEnv *, jobject);
  30.527 +
  30.528 +/*
  30.529 + * Class:     TestClass1_Inner2
  30.530 + * Method:    lmn
  30.531 + * Signature: ()J
  30.532 + */
  30.533 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn
  30.534 +  (JNIEnv *, jobject);
  30.535 +
  30.536 +/*
  30.537 + * Class:     TestClass1_Inner2
  30.538 + * Method:    fmn
  30.539 + * Signature: ()F
  30.540 + */
  30.541 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn
  30.542 +  (JNIEnv *, jobject);
  30.543 +
  30.544 +/*
  30.545 + * Class:     TestClass1_Inner2
  30.546 + * Method:    dmn
  30.547 + * Signature: ()D
  30.548 + */
  30.549 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn
  30.550 +  (JNIEnv *, jobject);
  30.551 +
  30.552 +/*
  30.553 + * Class:     TestClass1_Inner2
  30.554 + * Method:    omn
  30.555 + * Signature: ()Ljava/lang/Object;
  30.556 + */
  30.557 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn
  30.558 +  (JNIEnv *, jobject);
  30.559 +
  30.560 +/*
  30.561 + * Class:     TestClass1_Inner2
  30.562 + * Method:    tmn
  30.563 + * Signature: ()Ljava/lang/String;
  30.564 + */
  30.565 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn
  30.566 +  (JNIEnv *, jobject);
  30.567 +
  30.568 +/*
  30.569 + * Class:     TestClass1_Inner2
  30.570 + * Method:    gmn
  30.571 + * Signature: ()Ljava/util/List;
  30.572 + */
  30.573 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn
  30.574 +  (JNIEnv *, jobject);
  30.575 +
  30.576 +/*
  30.577 + * Class:     TestClass1_Inner2
  30.578 + * Method:    vmn
  30.579 + * Signature: ()V
  30.580 + */
  30.581 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn
  30.582 +  (JNIEnv *, jobject);
  30.583 +
  30.584 +/*
  30.585 + * Class:     TestClass1_Inner2
  30.586 + * Method:    bmn1
  30.587 + * Signature: ()B
  30.588 + */
  30.589 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn1
  30.590 +  (JNIEnv *, jobject);
  30.591 +
  30.592 +/*
  30.593 + * Class:     TestClass1_Inner2
  30.594 + * Method:    smn1
  30.595 + * Signature: ()S
  30.596 + */
  30.597 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn1
  30.598 +  (JNIEnv *, jobject);
  30.599 +
  30.600 +/*
  30.601 + * Class:     TestClass1_Inner2
  30.602 + * Method:    imn1
  30.603 + * Signature: ()I
  30.604 + */
  30.605 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn1
  30.606 +  (JNIEnv *, jobject);
  30.607 +
  30.608 +/*
  30.609 + * Class:     TestClass1_Inner2
  30.610 + * Method:    lmn1
  30.611 + * Signature: ()J
  30.612 + */
  30.613 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn1
  30.614 +  (JNIEnv *, jobject);
  30.615 +
  30.616 +/*
  30.617 + * Class:     TestClass1_Inner2
  30.618 + * Method:    fmn1
  30.619 + * Signature: ()F
  30.620 + */
  30.621 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn1
  30.622 +  (JNIEnv *, jobject);
  30.623 +
  30.624 +/*
  30.625 + * Class:     TestClass1_Inner2
  30.626 + * Method:    dmn1
  30.627 + * Signature: ()D
  30.628 + */
  30.629 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn1
  30.630 +  (JNIEnv *, jobject);
  30.631 +
  30.632 +/*
  30.633 + * Class:     TestClass1_Inner2
  30.634 + * Method:    omn1
  30.635 + * Signature: ()Ljava/lang/Object;
  30.636 + */
  30.637 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn1
  30.638 +  (JNIEnv *, jobject);
  30.639 +
  30.640 +/*
  30.641 + * Class:     TestClass1_Inner2
  30.642 + * Method:    tmn1
  30.643 + * Signature: ()Ljava/lang/String;
  30.644 + */
  30.645 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn1
  30.646 +  (JNIEnv *, jobject);
  30.647 +
  30.648 +/*
  30.649 + * Class:     TestClass1_Inner2
  30.650 + * Method:    gmn1
  30.651 + * Signature: ()Ljava/util/List;
  30.652 + */
  30.653 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn1
  30.654 +  (JNIEnv *, jobject);
  30.655 +
  30.656 +/*
  30.657 + * Class:     TestClass1_Inner2
  30.658 + * Method:    vmn1
  30.659 + * Signature: ()V
  30.660 + */
  30.661 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn1
  30.662 +  (JNIEnv *, jobject);
  30.663 +
  30.664 +/*
  30.665 + * Class:     TestClass1_Inner2
  30.666 + * Method:    bmn2
  30.667 + * Signature: (I)B
  30.668 + */
  30.669 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn2
  30.670 +  (JNIEnv *, jobject, jint);
  30.671 +
  30.672 +/*
  30.673 + * Class:     TestClass1_Inner2
  30.674 + * Method:    smn2
  30.675 + * Signature: (I)S
  30.676 + */
  30.677 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn2
  30.678 +  (JNIEnv *, jobject, jint);
  30.679 +
  30.680 +/*
  30.681 + * Class:     TestClass1_Inner2
  30.682 + * Method:    imn2
  30.683 + * Signature: (I)I
  30.684 + */
  30.685 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn2
  30.686 +  (JNIEnv *, jobject, jint);
  30.687 +
  30.688 +/*
  30.689 + * Class:     TestClass1_Inner2
  30.690 + * Method:    lmn2
  30.691 + * Signature: (I)J
  30.692 + */
  30.693 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn2
  30.694 +  (JNIEnv *, jobject, jint);
  30.695 +
  30.696 +/*
  30.697 + * Class:     TestClass1_Inner2
  30.698 + * Method:    fmn2
  30.699 + * Signature: (I)F
  30.700 + */
  30.701 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn2
  30.702 +  (JNIEnv *, jobject, jint);
  30.703 +
  30.704 +/*
  30.705 + * Class:     TestClass1_Inner2
  30.706 + * Method:    dmn2
  30.707 + * Signature: (I)D
  30.708 + */
  30.709 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn2
  30.710 +  (JNIEnv *, jobject, jint);
  30.711 +
  30.712 +/*
  30.713 + * Class:     TestClass1_Inner2
  30.714 + * Method:    omn2
  30.715 + * Signature: (I)Ljava/lang/Object;
  30.716 + */
  30.717 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn2
  30.718 +  (JNIEnv *, jobject, jint);
  30.719 +
  30.720 +/*
  30.721 + * Class:     TestClass1_Inner2
  30.722 + * Method:    tmn2
  30.723 + * Signature: (I)Ljava/lang/String;
  30.724 + */
  30.725 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn2
  30.726 +  (JNIEnv *, jobject, jint);
  30.727 +
  30.728 +/*
  30.729 + * Class:     TestClass1_Inner2
  30.730 + * Method:    gmn2
  30.731 + * Signature: (I)Ljava/util/List;
  30.732 + */
  30.733 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn2
  30.734 +  (JNIEnv *, jobject, jint);
  30.735 +
  30.736 +/*
  30.737 + * Class:     TestClass1_Inner2
  30.738 + * Method:    vmn2
  30.739 + * Signature: (I)V
  30.740 + */
  30.741 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn2
  30.742 +  (JNIEnv *, jobject, jint);
  30.743 +
  30.744 +/*
  30.745 + * Class:     TestClass1_Inner2
  30.746 + * Method:    mbn
  30.747 + * Signature: (B)V
  30.748 + */
  30.749 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mbn
  30.750 +  (JNIEnv *, jobject, jbyte);
  30.751 +
  30.752 +/*
  30.753 + * Class:     TestClass1_Inner2
  30.754 + * Method:    msn
  30.755 + * Signature: (S)V
  30.756 + */
  30.757 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_msn
  30.758 +  (JNIEnv *, jobject, jshort);
  30.759 +
  30.760 +/*
  30.761 + * Class:     TestClass1_Inner2
  30.762 + * Method:    min
  30.763 + * Signature: (I)V
  30.764 + */
  30.765 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_min
  30.766 +  (JNIEnv *, jobject, jint);
  30.767 +
  30.768 +/*
  30.769 + * Class:     TestClass1_Inner2
  30.770 + * Method:    mln
  30.771 + * Signature: (J)V
  30.772 + */
  30.773 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mln
  30.774 +  (JNIEnv *, jobject, jlong);
  30.775 +
  30.776 +/*
  30.777 + * Class:     TestClass1_Inner2
  30.778 + * Method:    mfn
  30.779 + * Signature: (F)V
  30.780 + */
  30.781 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mfn
  30.782 +  (JNIEnv *, jobject, jfloat);
  30.783 +
  30.784 +/*
  30.785 + * Class:     TestClass1_Inner2
  30.786 + * Method:    mdn
  30.787 + * Signature: (D)V
  30.788 + */
  30.789 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mdn
  30.790 +  (JNIEnv *, jobject, jdouble);
  30.791 +
  30.792 +/*
  30.793 + * Class:     TestClass1_Inner2
  30.794 + * Method:    mon
  30.795 + * Signature: (Ljava/lang/Object;)V
  30.796 + */
  30.797 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mon
  30.798 +  (JNIEnv *, jobject, jobject);
  30.799 +
  30.800 +/*
  30.801 + * Class:     TestClass1_Inner2
  30.802 + * Method:    mtn
  30.803 + * Signature: (Ljava/lang/String;)V
  30.804 + */
  30.805 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mtn
  30.806 +  (JNIEnv *, jobject, jstring);
  30.807 +
  30.808 +/*
  30.809 + * Class:     TestClass1_Inner2
  30.810 + * Method:    mgn
  30.811 + * Signature: (Ljava/util/List;)V
  30.812 + */
  30.813 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mgn
  30.814 +  (JNIEnv *, jobject, jobject);
  30.815 +
  30.816 +#ifdef __cplusplus
  30.817 +}
  30.818 +#endif
  30.819 +#endif
  30.820 +/* Header for class TestClass1_Inner1 */
  30.821 +
  30.822 +#ifndef _Included_TestClass1_Inner1
  30.823 +#define _Included_TestClass1_Inner1
  30.824 +#ifdef __cplusplus
  30.825 +extern "C" {
  30.826 +#endif
  30.827 +#undef TestClass1_Inner1_bc
  30.828 +#define TestClass1_Inner1_bc 0L
  30.829 +#undef TestClass1_Inner1_sc
  30.830 +#define TestClass1_Inner1_sc 0L
  30.831 +#undef TestClass1_Inner1_ic
  30.832 +#define TestClass1_Inner1_ic 0L
  30.833 +#undef TestClass1_Inner1_lc
  30.834 +#define TestClass1_Inner1_lc 0LL
  30.835 +#undef TestClass1_Inner1_fc
  30.836 +#define TestClass1_Inner1_fc 0.0f
  30.837 +#undef TestClass1_Inner1_dc
  30.838 +#define TestClass1_Inner1_dc 0.0
  30.839 +/*
  30.840 + * Class:     TestClass1_Inner1
  30.841 + * Method:    bmn
  30.842 + * Signature: ()B
  30.843 + */
  30.844 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn
  30.845 +  (JNIEnv *, jobject);
  30.846 +
  30.847 +/*
  30.848 + * Class:     TestClass1_Inner1
  30.849 + * Method:    smn
  30.850 + * Signature: ()S
  30.851 + */
  30.852 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn
  30.853 +  (JNIEnv *, jobject);
  30.854 +
  30.855 +/*
  30.856 + * Class:     TestClass1_Inner1
  30.857 + * Method:    imn
  30.858 + * Signature: ()I
  30.859 + */
  30.860 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn
  30.861 +  (JNIEnv *, jobject);
  30.862 +
  30.863 +/*
  30.864 + * Class:     TestClass1_Inner1
  30.865 + * Method:    lmn
  30.866 + * Signature: ()J
  30.867 + */
  30.868 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn
  30.869 +  (JNIEnv *, jobject);
  30.870 +
  30.871 +/*
  30.872 + * Class:     TestClass1_Inner1
  30.873 + * Method:    fmn
  30.874 + * Signature: ()F
  30.875 + */
  30.876 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn
  30.877 +  (JNIEnv *, jobject);
  30.878 +
  30.879 +/*
  30.880 + * Class:     TestClass1_Inner1
  30.881 + * Method:    dmn
  30.882 + * Signature: ()D
  30.883 + */
  30.884 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn
  30.885 +  (JNIEnv *, jobject);
  30.886 +
  30.887 +/*
  30.888 + * Class:     TestClass1_Inner1
  30.889 + * Method:    omn
  30.890 + * Signature: ()Ljava/lang/Object;
  30.891 + */
  30.892 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn
  30.893 +  (JNIEnv *, jobject);
  30.894 +
  30.895 +/*
  30.896 + * Class:     TestClass1_Inner1
  30.897 + * Method:    tmn
  30.898 + * Signature: ()Ljava/lang/String;
  30.899 + */
  30.900 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn
  30.901 +  (JNIEnv *, jobject);
  30.902 +
  30.903 +/*
  30.904 + * Class:     TestClass1_Inner1
  30.905 + * Method:    gmn
  30.906 + * Signature: ()Ljava/util/List;
  30.907 + */
  30.908 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn
  30.909 +  (JNIEnv *, jobject);
  30.910 +
  30.911 +/*
  30.912 + * Class:     TestClass1_Inner1
  30.913 + * Method:    vmn
  30.914 + * Signature: ()V
  30.915 + */
  30.916 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn
  30.917 +  (JNIEnv *, jobject);
  30.918 +
  30.919 +/*
  30.920 + * Class:     TestClass1_Inner1
  30.921 + * Method:    bmn1
  30.922 + * Signature: ()B
  30.923 + */
  30.924 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn1
  30.925 +  (JNIEnv *, jobject);
  30.926 +
  30.927 +/*
  30.928 + * Class:     TestClass1_Inner1
  30.929 + * Method:    smn1
  30.930 + * Signature: ()S
  30.931 + */
  30.932 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn1
  30.933 +  (JNIEnv *, jobject);
  30.934 +
  30.935 +/*
  30.936 + * Class:     TestClass1_Inner1
  30.937 + * Method:    imn1
  30.938 + * Signature: ()I
  30.939 + */
  30.940 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn1
  30.941 +  (JNIEnv *, jobject);
  30.942 +
  30.943 +/*
  30.944 + * Class:     TestClass1_Inner1
  30.945 + * Method:    lmn1
  30.946 + * Signature: ()J
  30.947 + */
  30.948 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn1
  30.949 +  (JNIEnv *, jobject);
  30.950 +
  30.951 +/*
  30.952 + * Class:     TestClass1_Inner1
  30.953 + * Method:    fmn1
  30.954 + * Signature: ()F
  30.955 + */
  30.956 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn1
  30.957 +  (JNIEnv *, jobject);
  30.958 +
  30.959 +/*
  30.960 + * Class:     TestClass1_Inner1
  30.961 + * Method:    dmn1
  30.962 + * Signature: ()D
  30.963 + */
  30.964 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn1
  30.965 +  (JNIEnv *, jobject);
  30.966 +
  30.967 +/*
  30.968 + * Class:     TestClass1_Inner1
  30.969 + * Method:    omn1
  30.970 + * Signature: ()Ljava/lang/Object;
  30.971 + */
  30.972 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn1
  30.973 +  (JNIEnv *, jobject);
  30.974 +
  30.975 +/*
  30.976 + * Class:     TestClass1_Inner1
  30.977 + * Method:    tmn1
  30.978 + * Signature: ()Ljava/lang/String;
  30.979 + */
  30.980 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn1
  30.981 +  (JNIEnv *, jobject);
  30.982 +
  30.983 +/*
  30.984 + * Class:     TestClass1_Inner1
  30.985 + * Method:    gmn1
  30.986 + * Signature: ()Ljava/util/List;
  30.987 + */
  30.988 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn1
  30.989 +  (JNIEnv *, jobject);
  30.990 +
  30.991 +/*
  30.992 + * Class:     TestClass1_Inner1
  30.993 + * Method:    vmn1
  30.994 + * Signature: ()V
  30.995 + */
  30.996 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn1
  30.997 +  (JNIEnv *, jobject);
  30.998 +
  30.999 +/*
 30.1000 + * Class:     TestClass1_Inner1
 30.1001 + * Method:    bmn2
 30.1002 + * Signature: (I)B
 30.1003 + */
 30.1004 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn2
 30.1005 +  (JNIEnv *, jobject, jint);
 30.1006 +
 30.1007 +/*
 30.1008 + * Class:     TestClass1_Inner1
 30.1009 + * Method:    smn2
 30.1010 + * Signature: (I)S
 30.1011 + */
 30.1012 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn2
 30.1013 +  (JNIEnv *, jobject, jint);
 30.1014 +
 30.1015 +/*
 30.1016 + * Class:     TestClass1_Inner1
 30.1017 + * Method:    imn2
 30.1018 + * Signature: (I)I
 30.1019 + */
 30.1020 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn2
 30.1021 +  (JNIEnv *, jobject, jint);
 30.1022 +
 30.1023 +/*
 30.1024 + * Class:     TestClass1_Inner1
 30.1025 + * Method:    lmn2
 30.1026 + * Signature: (I)J
 30.1027 + */
 30.1028 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn2
 30.1029 +  (JNIEnv *, jobject, jint);
 30.1030 +
 30.1031 +/*
 30.1032 + * Class:     TestClass1_Inner1
 30.1033 + * Method:    fmn2
 30.1034 + * Signature: (I)F
 30.1035 + */
 30.1036 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn2
 30.1037 +  (JNIEnv *, jobject, jint);
 30.1038 +
 30.1039 +/*
 30.1040 + * Class:     TestClass1_Inner1
 30.1041 + * Method:    dmn2
 30.1042 + * Signature: (I)D
 30.1043 + */
 30.1044 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn2
 30.1045 +  (JNIEnv *, jobject, jint);
 30.1046 +
 30.1047 +/*
 30.1048 + * Class:     TestClass1_Inner1
 30.1049 + * Method:    omn2
 30.1050 + * Signature: (I)Ljava/lang/Object;
 30.1051 + */
 30.1052 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn2
 30.1053 +  (JNIEnv *, jobject, jint);
 30.1054 +
 30.1055 +/*
 30.1056 + * Class:     TestClass1_Inner1
 30.1057 + * Method:    tmn2
 30.1058 + * Signature: (I)Ljava/lang/String;
 30.1059 + */
 30.1060 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn2
 30.1061 +  (JNIEnv *, jobject, jint);
 30.1062 +
 30.1063 +/*
 30.1064 + * Class:     TestClass1_Inner1
 30.1065 + * Method:    gmn2
 30.1066 + * Signature: (I)Ljava/util/List;
 30.1067 + */
 30.1068 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn2
 30.1069 +  (JNIEnv *, jobject, jint);
 30.1070 +
 30.1071 +/*
 30.1072 + * Class:     TestClass1_Inner1
 30.1073 + * Method:    vmn2
 30.1074 + * Signature: (I)V
 30.1075 + */
 30.1076 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn2
 30.1077 +  (JNIEnv *, jobject, jint);
 30.1078 +
 30.1079 +/*
 30.1080 + * Class:     TestClass1_Inner1
 30.1081 + * Method:    mbn
 30.1082 + * Signature: (B)V
 30.1083 + */
 30.1084 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mbn
 30.1085 +  (JNIEnv *, jobject, jbyte);
 30.1086 +
 30.1087 +/*
 30.1088 + * Class:     TestClass1_Inner1
 30.1089 + * Method:    msn
 30.1090 + * Signature: (S)V
 30.1091 + */
 30.1092 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_msn
 30.1093 +  (JNIEnv *, jobject, jshort);
 30.1094 +
 30.1095 +/*
 30.1096 + * Class:     TestClass1_Inner1
 30.1097 + * Method:    min
 30.1098 + * Signature: (I)V
 30.1099 + */
 30.1100 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_min
 30.1101 +  (JNIEnv *, jobject, jint);
 30.1102 +
 30.1103 +/*
 30.1104 + * Class:     TestClass1_Inner1
 30.1105 + * Method:    mln
 30.1106 + * Signature: (J)V
 30.1107 + */
 30.1108 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mln
 30.1109 +  (JNIEnv *, jobject, jlong);
 30.1110 +
 30.1111 +/*
 30.1112 + * Class:     TestClass1_Inner1
 30.1113 + * Method:    mfn
 30.1114 + * Signature: (F)V
 30.1115 + */
 30.1116 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mfn
 30.1117 +  (JNIEnv *, jobject, jfloat);
 30.1118 +
 30.1119 +/*
 30.1120 + * Class:     TestClass1_Inner1
 30.1121 + * Method:    mdn
 30.1122 + * Signature: (D)V
 30.1123 + */
 30.1124 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mdn
 30.1125 +  (JNIEnv *, jobject, jdouble);
 30.1126 +
 30.1127 +/*
 30.1128 + * Class:     TestClass1_Inner1
 30.1129 + * Method:    mon
 30.1130 + * Signature: (Ljava/lang/Object;)V
 30.1131 + */
 30.1132 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mon
 30.1133 +  (JNIEnv *, jobject, jobject);
 30.1134 +
 30.1135 +/*
 30.1136 + * Class:     TestClass1_Inner1
 30.1137 + * Method:    mtn
 30.1138 + * Signature: (Ljava/lang/String;)V
 30.1139 + */
 30.1140 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mtn
 30.1141 +  (JNIEnv *, jobject, jstring);
 30.1142 +
 30.1143 +/*
 30.1144 + * Class:     TestClass1_Inner1
 30.1145 + * Method:    mgn
 30.1146 + * Signature: (Ljava/util/List;)V
 30.1147 + */
 30.1148 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mgn
 30.1149 +  (JNIEnv *, jobject, jobject);
 30.1150 +
 30.1151 +#ifdef __cplusplus
 30.1152 +}
 30.1153 +#endif
 30.1154 +#endif
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/test/tools/javah/6572945/gold/jni.file.2	Wed Sep 23 19:15:04 2009 -0700
    31.3 @@ -0,0 +1,1162 @@
    31.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    31.5 +#include <jni.h>
    31.6 +/* Header for class TestClass1 */
    31.7 +
    31.8 +#ifndef _Included_TestClass1
    31.9 +#define _Included_TestClass1
   31.10 +#ifdef __cplusplus
   31.11 +extern "C" {
   31.12 +#endif
   31.13 +#undef TestClass1_bc
   31.14 +#define TestClass1_bc 0L
   31.15 +#undef TestClass1_sc
   31.16 +#define TestClass1_sc 0L
   31.17 +#undef TestClass1_ic
   31.18 +#define TestClass1_ic 0L
   31.19 +#undef TestClass1_lc
   31.20 +#define TestClass1_lc 0LL
   31.21 +#undef TestClass1_fc
   31.22 +#define TestClass1_fc 0.0f
   31.23 +#undef TestClass1_dc
   31.24 +#define TestClass1_dc 0.0
   31.25 +/*
   31.26 + * Class:     TestClass1
   31.27 + * Method:    bmn
   31.28 + * Signature: ()B
   31.29 + */
   31.30 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn
   31.31 +  (JNIEnv *, jobject);
   31.32 +
   31.33 +/*
   31.34 + * Class:     TestClass1
   31.35 + * Method:    smn
   31.36 + * Signature: ()S
   31.37 + */
   31.38 +JNIEXPORT jshort JNICALL Java_TestClass1_smn
   31.39 +  (JNIEnv *, jobject);
   31.40 +
   31.41 +/*
   31.42 + * Class:     TestClass1
   31.43 + * Method:    imn
   31.44 + * Signature: ()I
   31.45 + */
   31.46 +JNIEXPORT jint JNICALL Java_TestClass1_imn
   31.47 +  (JNIEnv *, jobject);
   31.48 +
   31.49 +/*
   31.50 + * Class:     TestClass1
   31.51 + * Method:    lmn
   31.52 + * Signature: ()J
   31.53 + */
   31.54 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn
   31.55 +  (JNIEnv *, jobject);
   31.56 +
   31.57 +/*
   31.58 + * Class:     TestClass1
   31.59 + * Method:    fmn
   31.60 + * Signature: ()F
   31.61 + */
   31.62 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn
   31.63 +  (JNIEnv *, jobject);
   31.64 +
   31.65 +/*
   31.66 + * Class:     TestClass1
   31.67 + * Method:    dmn
   31.68 + * Signature: ()D
   31.69 + */
   31.70 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn
   31.71 +  (JNIEnv *, jobject);
   31.72 +
   31.73 +/*
   31.74 + * Class:     TestClass1
   31.75 + * Method:    omn
   31.76 + * Signature: ()Ljava/lang/Object;
   31.77 + */
   31.78 +JNIEXPORT jobject JNICALL Java_TestClass1_omn
   31.79 +  (JNIEnv *, jobject);
   31.80 +
   31.81 +/*
   31.82 + * Class:     TestClass1
   31.83 + * Method:    tmn
   31.84 + * Signature: ()Ljava/lang/String;
   31.85 + */
   31.86 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn
   31.87 +  (JNIEnv *, jobject);
   31.88 +
   31.89 +/*
   31.90 + * Class:     TestClass1
   31.91 + * Method:    gmn
   31.92 + * Signature: ()Ljava/util/List;
   31.93 + */
   31.94 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn
   31.95 +  (JNIEnv *, jobject);
   31.96 +
   31.97 +/*
   31.98 + * Class:     TestClass1
   31.99 + * Method:    vmn
  31.100 + * Signature: ()V
  31.101 + */
  31.102 +JNIEXPORT void JNICALL Java_TestClass1_vmn
  31.103 +  (JNIEnv *, jobject);
  31.104 +
  31.105 +/*
  31.106 + * Class:     TestClass1
  31.107 + * Method:    bamn
  31.108 + * Signature: ()[B
  31.109 + */
  31.110 +JNIEXPORT jbyteArray JNICALL Java_TestClass1_bamn
  31.111 +  (JNIEnv *, jobject);
  31.112 +
  31.113 +/*
  31.114 + * Class:     TestClass1
  31.115 + * Method:    samn
  31.116 + * Signature: ()[S
  31.117 + */
  31.118 +JNIEXPORT jshortArray JNICALL Java_TestClass1_samn
  31.119 +  (JNIEnv *, jobject);
  31.120 +
  31.121 +/*
  31.122 + * Class:     TestClass1
  31.123 + * Method:    iamn
  31.124 + * Signature: ()[I
  31.125 + */
  31.126 +JNIEXPORT jintArray JNICALL Java_TestClass1_iamn
  31.127 +  (JNIEnv *, jobject);
  31.128 +
  31.129 +/*
  31.130 + * Class:     TestClass1
  31.131 + * Method:    lamn
  31.132 + * Signature: ()[J
  31.133 + */
  31.134 +JNIEXPORT jlongArray JNICALL Java_TestClass1_lamn
  31.135 +  (JNIEnv *, jobject);
  31.136 +
  31.137 +/*
  31.138 + * Class:     TestClass1
  31.139 + * Method:    famn
  31.140 + * Signature: ()[F
  31.141 + */
  31.142 +JNIEXPORT jfloatArray JNICALL Java_TestClass1_famn
  31.143 +  (JNIEnv *, jobject);
  31.144 +
  31.145 +/*
  31.146 + * Class:     TestClass1
  31.147 + * Method:    damn
  31.148 + * Signature: ()[D
  31.149 + */
  31.150 +JNIEXPORT jdoubleArray JNICALL Java_TestClass1_damn
  31.151 +  (JNIEnv *, jobject);
  31.152 +
  31.153 +/*
  31.154 + * Class:     TestClass1
  31.155 + * Method:    oamn
  31.156 + * Signature: ()[Ljava/lang/Object;
  31.157 + */
  31.158 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_oamn
  31.159 +  (JNIEnv *, jobject);
  31.160 +
  31.161 +/*
  31.162 + * Class:     TestClass1
  31.163 + * Method:    tamn
  31.164 + * Signature: ()[Ljava/lang/String;
  31.165 + */
  31.166 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_tamn
  31.167 +  (JNIEnv *, jobject);
  31.168 +
  31.169 +/*
  31.170 + * Class:     TestClass1
  31.171 + * Method:    gamn
  31.172 + * Signature: ()[Ljava/util/List;
  31.173 + */
  31.174 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_gamn
  31.175 +  (JNIEnv *, jobject);
  31.176 +
  31.177 +/*
  31.178 + * Class:     TestClass1
  31.179 + * Method:    baamn
  31.180 + * Signature: ()[[B
  31.181 + */
  31.182 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_baamn
  31.183 +  (JNIEnv *, jobject);
  31.184 +
  31.185 +/*
  31.186 + * Class:     TestClass1
  31.187 + * Method:    saamn
  31.188 + * Signature: ()[[S
  31.189 + */
  31.190 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_saamn
  31.191 +  (JNIEnv *, jobject);
  31.192 +
  31.193 +/*
  31.194 + * Class:     TestClass1
  31.195 + * Method:    iaamn
  31.196 + * Signature: ()[[I
  31.197 + */
  31.198 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_iaamn
  31.199 +  (JNIEnv *, jobject);
  31.200 +
  31.201 +/*
  31.202 + * Class:     TestClass1
  31.203 + * Method:    laamn
  31.204 + * Signature: ()[[J
  31.205 + */
  31.206 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_laamn
  31.207 +  (JNIEnv *, jobject);
  31.208 +
  31.209 +/*
  31.210 + * Class:     TestClass1
  31.211 + * Method:    faamn
  31.212 + * Signature: ()[[F
  31.213 + */
  31.214 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_faamn
  31.215 +  (JNIEnv *, jobject);
  31.216 +
  31.217 +/*
  31.218 + * Class:     TestClass1
  31.219 + * Method:    daamn
  31.220 + * Signature: ()[[D
  31.221 + */
  31.222 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_daamn
  31.223 +  (JNIEnv *, jobject);
  31.224 +
  31.225 +/*
  31.226 + * Class:     TestClass1
  31.227 + * Method:    oaamn
  31.228 + * Signature: ()[[Ljava/lang/Object;
  31.229 + */
  31.230 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_oaamn
  31.231 +  (JNIEnv *, jobject);
  31.232 +
  31.233 +/*
  31.234 + * Class:     TestClass1
  31.235 + * Method:    taamn
  31.236 + * Signature: ()[[Ljava/lang/String;
  31.237 + */
  31.238 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_taamn
  31.239 +  (JNIEnv *, jobject);
  31.240 +
  31.241 +/*
  31.242 + * Class:     TestClass1
  31.243 + * Method:    gaamn
  31.244 + * Signature: ()[Ljava/util/List;
  31.245 + */
  31.246 +JNIEXPORT jobjectArray JNICALL Java_TestClass1_gaamn
  31.247 +  (JNIEnv *, jobject);
  31.248 +
  31.249 +/*
  31.250 + * Class:     TestClass1
  31.251 + * Method:    bmn1
  31.252 + * Signature: ()B
  31.253 + */
  31.254 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn1
  31.255 +  (JNIEnv *, jobject);
  31.256 +
  31.257 +/*
  31.258 + * Class:     TestClass1
  31.259 + * Method:    smn1
  31.260 + * Signature: ()S
  31.261 + */
  31.262 +JNIEXPORT jshort JNICALL Java_TestClass1_smn1
  31.263 +  (JNIEnv *, jobject);
  31.264 +
  31.265 +/*
  31.266 + * Class:     TestClass1
  31.267 + * Method:    imn1
  31.268 + * Signature: ()I
  31.269 + */
  31.270 +JNIEXPORT jint JNICALL Java_TestClass1_imn1
  31.271 +  (JNIEnv *, jobject);
  31.272 +
  31.273 +/*
  31.274 + * Class:     TestClass1
  31.275 + * Method:    lmn1
  31.276 + * Signature: ()J
  31.277 + */
  31.278 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn1
  31.279 +  (JNIEnv *, jobject);
  31.280 +
  31.281 +/*
  31.282 + * Class:     TestClass1
  31.283 + * Method:    fmn1
  31.284 + * Signature: ()F
  31.285 + */
  31.286 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn1
  31.287 +  (JNIEnv *, jobject);
  31.288 +
  31.289 +/*
  31.290 + * Class:     TestClass1
  31.291 + * Method:    dmn1
  31.292 + * Signature: ()D
  31.293 + */
  31.294 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn1
  31.295 +  (JNIEnv *, jobject);
  31.296 +
  31.297 +/*
  31.298 + * Class:     TestClass1
  31.299 + * Method:    omn1
  31.300 + * Signature: ()Ljava/lang/Object;
  31.301 + */
  31.302 +JNIEXPORT jobject JNICALL Java_TestClass1_omn1
  31.303 +  (JNIEnv *, jobject);
  31.304 +
  31.305 +/*
  31.306 + * Class:     TestClass1
  31.307 + * Method:    tmn1
  31.308 + * Signature: ()Ljava/lang/String;
  31.309 + */
  31.310 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn1
  31.311 +  (JNIEnv *, jobject);
  31.312 +
  31.313 +/*
  31.314 + * Class:     TestClass1
  31.315 + * Method:    gmn1
  31.316 + * Signature: ()Ljava/util/List;
  31.317 + */
  31.318 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn1
  31.319 +  (JNIEnv *, jobject);
  31.320 +
  31.321 +/*
  31.322 + * Class:     TestClass1
  31.323 + * Method:    vmn1
  31.324 + * Signature: ()V
  31.325 + */
  31.326 +JNIEXPORT void JNICALL Java_TestClass1_vmn1
  31.327 +  (JNIEnv *, jobject);
  31.328 +
  31.329 +/*
  31.330 + * Class:     TestClass1
  31.331 + * Method:    bmn2
  31.332 + * Signature: (I)B
  31.333 + */
  31.334 +JNIEXPORT jbyte JNICALL Java_TestClass1_bmn2
  31.335 +  (JNIEnv *, jobject, jint);
  31.336 +
  31.337 +/*
  31.338 + * Class:     TestClass1
  31.339 + * Method:    smn2
  31.340 + * Signature: (I)S
  31.341 + */
  31.342 +JNIEXPORT jshort JNICALL Java_TestClass1_smn2
  31.343 +  (JNIEnv *, jobject, jint);
  31.344 +
  31.345 +/*
  31.346 + * Class:     TestClass1
  31.347 + * Method:    imn2
  31.348 + * Signature: (I)I
  31.349 + */
  31.350 +JNIEXPORT jint JNICALL Java_TestClass1_imn2
  31.351 +  (JNIEnv *, jobject, jint);
  31.352 +
  31.353 +/*
  31.354 + * Class:     TestClass1
  31.355 + * Method:    lmn2
  31.356 + * Signature: (I)J
  31.357 + */
  31.358 +JNIEXPORT jlong JNICALL Java_TestClass1_lmn2
  31.359 +  (JNIEnv *, jobject, jint);
  31.360 +
  31.361 +/*
  31.362 + * Class:     TestClass1
  31.363 + * Method:    fmn2
  31.364 + * Signature: (I)F
  31.365 + */
  31.366 +JNIEXPORT jfloat JNICALL Java_TestClass1_fmn2
  31.367 +  (JNIEnv *, jobject, jint);
  31.368 +
  31.369 +/*
  31.370 + * Class:     TestClass1
  31.371 + * Method:    dmn2
  31.372 + * Signature: (I)D
  31.373 + */
  31.374 +JNIEXPORT jdouble JNICALL Java_TestClass1_dmn2
  31.375 +  (JNIEnv *, jobject, jint);
  31.376 +
  31.377 +/*
  31.378 + * Class:     TestClass1
  31.379 + * Method:    omn2
  31.380 + * Signature: (I)Ljava/lang/Object;
  31.381 + */
  31.382 +JNIEXPORT jobject JNICALL Java_TestClass1_omn2
  31.383 +  (JNIEnv *, jobject, jint);
  31.384 +
  31.385 +/*
  31.386 + * Class:     TestClass1
  31.387 + * Method:    tmn2
  31.388 + * Signature: (I)Ljava/lang/String;
  31.389 + */
  31.390 +JNIEXPORT jstring JNICALL Java_TestClass1_tmn2
  31.391 +  (JNIEnv *, jobject, jint);
  31.392 +
  31.393 +/*
  31.394 + * Class:     TestClass1
  31.395 + * Method:    gmn2
  31.396 + * Signature: (I)Ljava/util/List;
  31.397 + */
  31.398 +JNIEXPORT jobject JNICALL Java_TestClass1_gmn2
  31.399 +  (JNIEnv *, jobject, jint);
  31.400 +
  31.401 +/*
  31.402 + * Class:     TestClass1
  31.403 + * Method:    vmn2
  31.404 + * Signature: (I)V
  31.405 + */
  31.406 +JNIEXPORT void JNICALL Java_TestClass1_vmn2
  31.407 +  (JNIEnv *, jobject, jint);
  31.408 +
  31.409 +/*
  31.410 + * Class:     TestClass1
  31.411 + * Method:    mbn
  31.412 + * Signature: (B)V
  31.413 + */
  31.414 +JNIEXPORT void JNICALL Java_TestClass1_mbn
  31.415 +  (JNIEnv *, jobject, jbyte);
  31.416 +
  31.417 +/*
  31.418 + * Class:     TestClass1
  31.419 + * Method:    msn
  31.420 + * Signature: (S)V
  31.421 + */
  31.422 +JNIEXPORT void JNICALL Java_TestClass1_msn
  31.423 +  (JNIEnv *, jobject, jshort);
  31.424 +
  31.425 +/*
  31.426 + * Class:     TestClass1
  31.427 + * Method:    min
  31.428 + * Signature: (I)V
  31.429 + */
  31.430 +JNIEXPORT void JNICALL Java_TestClass1_min
  31.431 +  (JNIEnv *, jobject, jint);
  31.432 +
  31.433 +/*
  31.434 + * Class:     TestClass1
  31.435 + * Method:    mln
  31.436 + * Signature: (J)V
  31.437 + */
  31.438 +JNIEXPORT void JNICALL Java_TestClass1_mln
  31.439 +  (JNIEnv *, jobject, jlong);
  31.440 +
  31.441 +/*
  31.442 + * Class:     TestClass1
  31.443 + * Method:    mfn
  31.444 + * Signature: (F)V
  31.445 + */
  31.446 +JNIEXPORT void JNICALL Java_TestClass1_mfn
  31.447 +  (JNIEnv *, jobject, jfloat);
  31.448 +
  31.449 +/*
  31.450 + * Class:     TestClass1
  31.451 + * Method:    mdn
  31.452 + * Signature: (D)V
  31.453 + */
  31.454 +JNIEXPORT void JNICALL Java_TestClass1_mdn
  31.455 +  (JNIEnv *, jobject, jdouble);
  31.456 +
  31.457 +/*
  31.458 + * Class:     TestClass1
  31.459 + * Method:    mon
  31.460 + * Signature: (Ljava/lang/Object;)V
  31.461 + */
  31.462 +JNIEXPORT void JNICALL Java_TestClass1_mon
  31.463 +  (JNIEnv *, jobject, jobject);
  31.464 +
  31.465 +/*
  31.466 + * Class:     TestClass1
  31.467 + * Method:    mtn
  31.468 + * Signature: (Ljava/lang/String;)V
  31.469 + */
  31.470 +JNIEXPORT void JNICALL Java_TestClass1_mtn
  31.471 +  (JNIEnv *, jobject, jstring);
  31.472 +
  31.473 +/*
  31.474 + * Class:     TestClass1
  31.475 + * Method:    mgn
  31.476 + * Signature: (Ljava/util/List;)V
  31.477 + */
  31.478 +JNIEXPORT void JNICALL Java_TestClass1_mgn
  31.479 +  (JNIEnv *, jobject, jobject);
  31.480 +
  31.481 +#ifdef __cplusplus
  31.482 +}
  31.483 +#endif
  31.484 +#endif
  31.485 +/* Header for class TestClass1_Inner2 */
  31.486 +
  31.487 +#ifndef _Included_TestClass1_Inner2
  31.488 +#define _Included_TestClass1_Inner2
  31.489 +#ifdef __cplusplus
  31.490 +extern "C" {
  31.491 +#endif
  31.492 +#undef TestClass1_Inner2_bc
  31.493 +#define TestClass1_Inner2_bc 0L
  31.494 +#undef TestClass1_Inner2_sc
  31.495 +#define TestClass1_Inner2_sc 0L
  31.496 +#undef TestClass1_Inner2_ic
  31.497 +#define TestClass1_Inner2_ic 0L
  31.498 +#undef TestClass1_Inner2_lc
  31.499 +#define TestClass1_Inner2_lc 0LL
  31.500 +#undef TestClass1_Inner2_fc
  31.501 +#define TestClass1_Inner2_fc 0.0f
  31.502 +#undef TestClass1_Inner2_dc
  31.503 +#define TestClass1_Inner2_dc 0.0
  31.504 +/*
  31.505 + * Class:     TestClass1_Inner2
  31.506 + * Method:    bmn
  31.507 + * Signature: ()B
  31.508 + */
  31.509 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn
  31.510 +  (JNIEnv *, jobject);
  31.511 +
  31.512 +/*
  31.513 + * Class:     TestClass1_Inner2
  31.514 + * Method:    smn
  31.515 + * Signature: ()S
  31.516 + */
  31.517 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn
  31.518 +  (JNIEnv *, jobject);
  31.519 +
  31.520 +/*
  31.521 + * Class:     TestClass1_Inner2
  31.522 + * Method:    imn
  31.523 + * Signature: ()I
  31.524 + */
  31.525 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn
  31.526 +  (JNIEnv *, jobject);
  31.527 +
  31.528 +/*
  31.529 + * Class:     TestClass1_Inner2
  31.530 + * Method:    lmn
  31.531 + * Signature: ()J
  31.532 + */
  31.533 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn
  31.534 +  (JNIEnv *, jobject);
  31.535 +
  31.536 +/*
  31.537 + * Class:     TestClass1_Inner2
  31.538 + * Method:    fmn
  31.539 + * Signature: ()F
  31.540 + */
  31.541 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn
  31.542 +  (JNIEnv *, jobject);
  31.543 +
  31.544 +/*
  31.545 + * Class:     TestClass1_Inner2
  31.546 + * Method:    dmn
  31.547 + * Signature: ()D
  31.548 + */
  31.549 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn
  31.550 +  (JNIEnv *, jobject);
  31.551 +
  31.552 +/*
  31.553 + * Class:     TestClass1_Inner2
  31.554 + * Method:    omn
  31.555 + * Signature: ()Ljava/lang/Object;
  31.556 + */
  31.557 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn
  31.558 +  (JNIEnv *, jobject);
  31.559 +
  31.560 +/*
  31.561 + * Class:     TestClass1_Inner2
  31.562 + * Method:    tmn
  31.563 + * Signature: ()Ljava/lang/String;
  31.564 + */
  31.565 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn
  31.566 +  (JNIEnv *, jobject);
  31.567 +
  31.568 +/*
  31.569 + * Class:     TestClass1_Inner2
  31.570 + * Method:    gmn
  31.571 + * Signature: ()Ljava/util/List;
  31.572 + */
  31.573 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn
  31.574 +  (JNIEnv *, jobject);
  31.575 +
  31.576 +/*
  31.577 + * Class:     TestClass1_Inner2
  31.578 + * Method:    vmn
  31.579 + * Signature: ()V
  31.580 + */
  31.581 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn
  31.582 +  (JNIEnv *, jobject);
  31.583 +
  31.584 +/*
  31.585 + * Class:     TestClass1_Inner2
  31.586 + * Method:    bmn1
  31.587 + * Signature: ()B
  31.588 + */
  31.589 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn1
  31.590 +  (JNIEnv *, jobject);
  31.591 +
  31.592 +/*
  31.593 + * Class:     TestClass1_Inner2
  31.594 + * Method:    smn1
  31.595 + * Signature: ()S
  31.596 + */
  31.597 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn1
  31.598 +  (JNIEnv *, jobject);
  31.599 +
  31.600 +/*
  31.601 + * Class:     TestClass1_Inner2
  31.602 + * Method:    imn1
  31.603 + * Signature: ()I
  31.604 + */
  31.605 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn1
  31.606 +  (JNIEnv *, jobject);
  31.607 +
  31.608 +/*
  31.609 + * Class:     TestClass1_Inner2
  31.610 + * Method:    lmn1
  31.611 + * Signature: ()J
  31.612 + */
  31.613 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn1
  31.614 +  (JNIEnv *, jobject);
  31.615 +
  31.616 +/*
  31.617 + * Class:     TestClass1_Inner2
  31.618 + * Method:    fmn1
  31.619 + * Signature: ()F
  31.620 + */
  31.621 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn1
  31.622 +  (JNIEnv *, jobject);
  31.623 +
  31.624 +/*
  31.625 + * Class:     TestClass1_Inner2
  31.626 + * Method:    dmn1
  31.627 + * Signature: ()D
  31.628 + */
  31.629 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn1
  31.630 +  (JNIEnv *, jobject);
  31.631 +
  31.632 +/*
  31.633 + * Class:     TestClass1_Inner2
  31.634 + * Method:    omn1
  31.635 + * Signature: ()Ljava/lang/Object;
  31.636 + */
  31.637 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn1
  31.638 +  (JNIEnv *, jobject);
  31.639 +
  31.640 +/*
  31.641 + * Class:     TestClass1_Inner2
  31.642 + * Method:    tmn1
  31.643 + * Signature: ()Ljava/lang/String;
  31.644 + */
  31.645 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn1
  31.646 +  (JNIEnv *, jobject);
  31.647 +
  31.648 +/*
  31.649 + * Class:     TestClass1_Inner2
  31.650 + * Method:    gmn1
  31.651 + * Signature: ()Ljava/util/List;
  31.652 + */
  31.653 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn1
  31.654 +  (JNIEnv *, jobject);
  31.655 +
  31.656 +/*
  31.657 + * Class:     TestClass1_Inner2
  31.658 + * Method:    vmn1
  31.659 + * Signature: ()V
  31.660 + */
  31.661 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn1
  31.662 +  (JNIEnv *, jobject);
  31.663 +
  31.664 +/*
  31.665 + * Class:     TestClass1_Inner2
  31.666 + * Method:    bmn2
  31.667 + * Signature: (I)B
  31.668 + */
  31.669 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner2_bmn2
  31.670 +  (JNIEnv *, jobject, jint);
  31.671 +
  31.672 +/*
  31.673 + * Class:     TestClass1_Inner2
  31.674 + * Method:    smn2
  31.675 + * Signature: (I)S
  31.676 + */
  31.677 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner2_smn2
  31.678 +  (JNIEnv *, jobject, jint);
  31.679 +
  31.680 +/*
  31.681 + * Class:     TestClass1_Inner2
  31.682 + * Method:    imn2
  31.683 + * Signature: (I)I
  31.684 + */
  31.685 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner2_imn2
  31.686 +  (JNIEnv *, jobject, jint);
  31.687 +
  31.688 +/*
  31.689 + * Class:     TestClass1_Inner2
  31.690 + * Method:    lmn2
  31.691 + * Signature: (I)J
  31.692 + */
  31.693 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner2_lmn2
  31.694 +  (JNIEnv *, jobject, jint);
  31.695 +
  31.696 +/*
  31.697 + * Class:     TestClass1_Inner2
  31.698 + * Method:    fmn2
  31.699 + * Signature: (I)F
  31.700 + */
  31.701 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner2_fmn2
  31.702 +  (JNIEnv *, jobject, jint);
  31.703 +
  31.704 +/*
  31.705 + * Class:     TestClass1_Inner2
  31.706 + * Method:    dmn2
  31.707 + * Signature: (I)D
  31.708 + */
  31.709 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner2_dmn2
  31.710 +  (JNIEnv *, jobject, jint);
  31.711 +
  31.712 +/*
  31.713 + * Class:     TestClass1_Inner2
  31.714 + * Method:    omn2
  31.715 + * Signature: (I)Ljava/lang/Object;
  31.716 + */
  31.717 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_omn2
  31.718 +  (JNIEnv *, jobject, jint);
  31.719 +
  31.720 +/*
  31.721 + * Class:     TestClass1_Inner2
  31.722 + * Method:    tmn2
  31.723 + * Signature: (I)Ljava/lang/String;
  31.724 + */
  31.725 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner2_tmn2
  31.726 +  (JNIEnv *, jobject, jint);
  31.727 +
  31.728 +/*
  31.729 + * Class:     TestClass1_Inner2
  31.730 + * Method:    gmn2
  31.731 + * Signature: (I)Ljava/util/List;
  31.732 + */
  31.733 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner2_gmn2
  31.734 +  (JNIEnv *, jobject, jint);
  31.735 +
  31.736 +/*
  31.737 + * Class:     TestClass1_Inner2
  31.738 + * Method:    vmn2
  31.739 + * Signature: (I)V
  31.740 + */
  31.741 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_vmn2
  31.742 +  (JNIEnv *, jobject, jint);
  31.743 +
  31.744 +/*
  31.745 + * Class:     TestClass1_Inner2
  31.746 + * Method:    mbn
  31.747 + * Signature: (B)V
  31.748 + */
  31.749 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mbn
  31.750 +  (JNIEnv *, jobject, jbyte);
  31.751 +
  31.752 +/*
  31.753 + * Class:     TestClass1_Inner2
  31.754 + * Method:    msn
  31.755 + * Signature: (S)V
  31.756 + */
  31.757 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_msn
  31.758 +  (JNIEnv *, jobject, jshort);
  31.759 +
  31.760 +/*
  31.761 + * Class:     TestClass1_Inner2
  31.762 + * Method:    min
  31.763 + * Signature: (I)V
  31.764 + */
  31.765 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_min
  31.766 +  (JNIEnv *, jobject, jint);
  31.767 +
  31.768 +/*
  31.769 + * Class:     TestClass1_Inner2
  31.770 + * Method:    mln
  31.771 + * Signature: (J)V
  31.772 + */
  31.773 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mln
  31.774 +  (JNIEnv *, jobject, jlong);
  31.775 +
  31.776 +/*
  31.777 + * Class:     TestClass1_Inner2
  31.778 + * Method:    mfn
  31.779 + * Signature: (F)V
  31.780 + */
  31.781 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mfn
  31.782 +  (JNIEnv *, jobject, jfloat);
  31.783 +
  31.784 +/*
  31.785 + * Class:     TestClass1_Inner2
  31.786 + * Method:    mdn
  31.787 + * Signature: (D)V
  31.788 + */
  31.789 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mdn
  31.790 +  (JNIEnv *, jobject, jdouble);
  31.791 +
  31.792 +/*
  31.793 + * Class:     TestClass1_Inner2
  31.794 + * Method:    mon
  31.795 + * Signature: (Ljava/lang/Object;)V
  31.796 + */
  31.797 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mon
  31.798 +  (JNIEnv *, jobject, jobject);
  31.799 +
  31.800 +/*
  31.801 + * Class:     TestClass1_Inner2
  31.802 + * Method:    mtn
  31.803 + * Signature: (Ljava/lang/String;)V
  31.804 + */
  31.805 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mtn
  31.806 +  (JNIEnv *, jobject, jstring);
  31.807 +
  31.808 +/*
  31.809 + * Class:     TestClass1_Inner2
  31.810 + * Method:    mgn
  31.811 + * Signature: (Ljava/util/List;)V
  31.812 + */
  31.813 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner2_mgn
  31.814 +  (JNIEnv *, jobject, jobject);
  31.815 +
  31.816 +#ifdef __cplusplus
  31.817 +}
  31.818 +#endif
  31.819 +#endif
  31.820 +/* Header for class TestClass1_Inner1 */
  31.821 +
  31.822 +#ifndef _Included_TestClass1_Inner1
  31.823 +#define _Included_TestClass1_Inner1
  31.824 +#ifdef __cplusplus
  31.825 +extern "C" {
  31.826 +#endif
  31.827 +#undef TestClass1_Inner1_bc
  31.828 +#define TestClass1_Inner1_bc 0L
  31.829 +#undef TestClass1_Inner1_sc
  31.830 +#define TestClass1_Inner1_sc 0L
  31.831 +#undef TestClass1_Inner1_ic
  31.832 +#define TestClass1_Inner1_ic 0L
  31.833 +#undef TestClass1_Inner1_lc
  31.834 +#define TestClass1_Inner1_lc 0LL
  31.835 +#undef TestClass1_Inner1_fc
  31.836 +#define TestClass1_Inner1_fc 0.0f
  31.837 +#undef TestClass1_Inner1_dc
  31.838 +#define TestClass1_Inner1_dc 0.0
  31.839 +/*
  31.840 + * Class:     TestClass1_Inner1
  31.841 + * Method:    bmn
  31.842 + * Signature: ()B
  31.843 + */
  31.844 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn
  31.845 +  (JNIEnv *, jobject);
  31.846 +
  31.847 +/*
  31.848 + * Class:     TestClass1_Inner1
  31.849 + * Method:    smn
  31.850 + * Signature: ()S
  31.851 + */
  31.852 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn
  31.853 +  (JNIEnv *, jobject);
  31.854 +
  31.855 +/*
  31.856 + * Class:     TestClass1_Inner1
  31.857 + * Method:    imn
  31.858 + * Signature: ()I
  31.859 + */
  31.860 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn
  31.861 +  (JNIEnv *, jobject);
  31.862 +
  31.863 +/*
  31.864 + * Class:     TestClass1_Inner1
  31.865 + * Method:    lmn
  31.866 + * Signature: ()J
  31.867 + */
  31.868 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn
  31.869 +  (JNIEnv *, jobject);
  31.870 +
  31.871 +/*
  31.872 + * Class:     TestClass1_Inner1
  31.873 + * Method:    fmn
  31.874 + * Signature: ()F
  31.875 + */
  31.876 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn
  31.877 +  (JNIEnv *, jobject);
  31.878 +
  31.879 +/*
  31.880 + * Class:     TestClass1_Inner1
  31.881 + * Method:    dmn
  31.882 + * Signature: ()D
  31.883 + */
  31.884 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn
  31.885 +  (JNIEnv *, jobject);
  31.886 +
  31.887 +/*
  31.888 + * Class:     TestClass1_Inner1
  31.889 + * Method:    omn
  31.890 + * Signature: ()Ljava/lang/Object;
  31.891 + */
  31.892 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn
  31.893 +  (JNIEnv *, jobject);
  31.894 +
  31.895 +/*
  31.896 + * Class:     TestClass1_Inner1
  31.897 + * Method:    tmn
  31.898 + * Signature: ()Ljava/lang/String;
  31.899 + */
  31.900 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn
  31.901 +  (JNIEnv *, jobject);
  31.902 +
  31.903 +/*
  31.904 + * Class:     TestClass1_Inner1
  31.905 + * Method:    gmn
  31.906 + * Signature: ()Ljava/util/List;
  31.907 + */
  31.908 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn
  31.909 +  (JNIEnv *, jobject);
  31.910 +
  31.911 +/*
  31.912 + * Class:     TestClass1_Inner1
  31.913 + * Method:    vmn
  31.914 + * Signature: ()V
  31.915 + */
  31.916 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn
  31.917 +  (JNIEnv *, jobject);
  31.918 +
  31.919 +/*
  31.920 + * Class:     TestClass1_Inner1
  31.921 + * Method:    bmn1
  31.922 + * Signature: ()B
  31.923 + */
  31.924 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn1
  31.925 +  (JNIEnv *, jobject);
  31.926 +
  31.927 +/*
  31.928 + * Class:     TestClass1_Inner1
  31.929 + * Method:    smn1
  31.930 + * Signature: ()S
  31.931 + */
  31.932 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn1
  31.933 +  (JNIEnv *, jobject);
  31.934 +
  31.935 +/*
  31.936 + * Class:     TestClass1_Inner1
  31.937 + * Method:    imn1
  31.938 + * Signature: ()I
  31.939 + */
  31.940 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn1
  31.941 +  (JNIEnv *, jobject);
  31.942 +
  31.943 +/*
  31.944 + * Class:     TestClass1_Inner1
  31.945 + * Method:    lmn1
  31.946 + * Signature: ()J
  31.947 + */
  31.948 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn1
  31.949 +  (JNIEnv *, jobject);
  31.950 +
  31.951 +/*
  31.952 + * Class:     TestClass1_Inner1
  31.953 + * Method:    fmn1
  31.954 + * Signature: ()F
  31.955 + */
  31.956 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn1
  31.957 +  (JNIEnv *, jobject);
  31.958 +
  31.959 +/*
  31.960 + * Class:     TestClass1_Inner1
  31.961 + * Method:    dmn1
  31.962 + * Signature: ()D
  31.963 + */
  31.964 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn1
  31.965 +  (JNIEnv *, jobject);
  31.966 +
  31.967 +/*
  31.968 + * Class:     TestClass1_Inner1
  31.969 + * Method:    omn1
  31.970 + * Signature: ()Ljava/lang/Object;
  31.971 + */
  31.972 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn1
  31.973 +  (JNIEnv *, jobject);
  31.974 +
  31.975 +/*
  31.976 + * Class:     TestClass1_Inner1
  31.977 + * Method:    tmn1
  31.978 + * Signature: ()Ljava/lang/String;
  31.979 + */
  31.980 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn1
  31.981 +  (JNIEnv *, jobject);
  31.982 +
  31.983 +/*
  31.984 + * Class:     TestClass1_Inner1
  31.985 + * Method:    gmn1
  31.986 + * Signature: ()Ljava/util/List;
  31.987 + */
  31.988 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn1
  31.989 +  (JNIEnv *, jobject);
  31.990 +
  31.991 +/*
  31.992 + * Class:     TestClass1_Inner1
  31.993 + * Method:    vmn1
  31.994 + * Signature: ()V
  31.995 + */
  31.996 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn1
  31.997 +  (JNIEnv *, jobject);
  31.998 +
  31.999 +/*
 31.1000 + * Class:     TestClass1_Inner1
 31.1001 + * Method:    bmn2
 31.1002 + * Signature: (I)B
 31.1003 + */
 31.1004 +JNIEXPORT jbyte JNICALL Java_TestClass1_00024Inner1_bmn2
 31.1005 +  (JNIEnv *, jobject, jint);
 31.1006 +
 31.1007 +/*
 31.1008 + * Class:     TestClass1_Inner1
 31.1009 + * Method:    smn2
 31.1010 + * Signature: (I)S
 31.1011 + */
 31.1012 +JNIEXPORT jshort JNICALL Java_TestClass1_00024Inner1_smn2
 31.1013 +  (JNIEnv *, jobject, jint);
 31.1014 +
 31.1015 +/*
 31.1016 + * Class:     TestClass1_Inner1
 31.1017 + * Method:    imn2
 31.1018 + * Signature: (I)I
 31.1019 + */
 31.1020 +JNIEXPORT jint JNICALL Java_TestClass1_00024Inner1_imn2
 31.1021 +  (JNIEnv *, jobject, jint);
 31.1022 +
 31.1023 +/*
 31.1024 + * Class:     TestClass1_Inner1
 31.1025 + * Method:    lmn2
 31.1026 + * Signature: (I)J
 31.1027 + */
 31.1028 +JNIEXPORT jlong JNICALL Java_TestClass1_00024Inner1_lmn2
 31.1029 +  (JNIEnv *, jobject, jint);
 31.1030 +
 31.1031 +/*
 31.1032 + * Class:     TestClass1_Inner1
 31.1033 + * Method:    fmn2
 31.1034 + * Signature: (I)F
 31.1035 + */
 31.1036 +JNIEXPORT jfloat JNICALL Java_TestClass1_00024Inner1_fmn2
 31.1037 +  (JNIEnv *, jobject, jint);
 31.1038 +
 31.1039 +/*
 31.1040 + * Class:     TestClass1_Inner1
 31.1041 + * Method:    dmn2
 31.1042 + * Signature: (I)D
 31.1043 + */
 31.1044 +JNIEXPORT jdouble JNICALL Java_TestClass1_00024Inner1_dmn2
 31.1045 +  (JNIEnv *, jobject, jint);
 31.1046 +
 31.1047 +/*
 31.1048 + * Class:     TestClass1_Inner1
 31.1049 + * Method:    omn2
 31.1050 + * Signature: (I)Ljava/lang/Object;
 31.1051 + */
 31.1052 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_omn2
 31.1053 +  (JNIEnv *, jobject, jint);
 31.1054 +
 31.1055 +/*
 31.1056 + * Class:     TestClass1_Inner1
 31.1057 + * Method:    tmn2
 31.1058 + * Signature: (I)Ljava/lang/String;
 31.1059 + */
 31.1060 +JNIEXPORT jstring JNICALL Java_TestClass1_00024Inner1_tmn2
 31.1061 +  (JNIEnv *, jobject, jint);
 31.1062 +
 31.1063 +/*
 31.1064 + * Class:     TestClass1_Inner1
 31.1065 + * Method:    gmn2
 31.1066 + * Signature: (I)Ljava/util/List;
 31.1067 + */
 31.1068 +JNIEXPORT jobject JNICALL Java_TestClass1_00024Inner1_gmn2
 31.1069 +  (JNIEnv *, jobject, jint);
 31.1070 +
 31.1071 +/*
 31.1072 + * Class:     TestClass1_Inner1
 31.1073 + * Method:    vmn2
 31.1074 + * Signature: (I)V
 31.1075 + */
 31.1076 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_vmn2
 31.1077 +  (JNIEnv *, jobject, jint);
 31.1078 +
 31.1079 +/*
 31.1080 + * Class:     TestClass1_Inner1
 31.1081 + * Method:    mbn
 31.1082 + * Signature: (B)V
 31.1083 + */
 31.1084 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mbn
 31.1085 +  (JNIEnv *, jobject, jbyte);
 31.1086 +
 31.1087 +/*
 31.1088 + * Class:     TestClass1_Inner1
 31.1089 + * Method:    msn
 31.1090 + * Signature: (S)V
 31.1091 + */
 31.1092 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_msn
 31.1093 +  (JNIEnv *, jobject, jshort);
 31.1094 +
 31.1095 +/*
 31.1096 + * Class:     TestClass1_Inner1
 31.1097 + * Method:    min
 31.1098 + * Signature: (I)V
 31.1099 + */
 31.1100 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_min
 31.1101 +  (JNIEnv *, jobject, jint);
 31.1102 +
 31.1103 +/*
 31.1104 + * Class:     TestClass1_Inner1
 31.1105 + * Method:    mln
 31.1106 + * Signature: (J)V
 31.1107 + */
 31.1108 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mln
 31.1109 +  (JNIEnv *, jobject, jlong);
 31.1110 +
 31.1111 +/*
 31.1112 + * Class:     TestClass1_Inner1
 31.1113 + * Method:    mfn
 31.1114 + * Signature: (F)V
 31.1115 + */
 31.1116 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mfn
 31.1117 +  (JNIEnv *, jobject, jfloat);
 31.1118 +
 31.1119 +/*
 31.1120 + * Class:     TestClass1_Inner1
 31.1121 + * Method:    mdn
 31.1122 + * Signature: (D)V
 31.1123 + */
 31.1124 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mdn
 31.1125 +  (JNIEnv *, jobject, jdouble);
 31.1126 +
 31.1127 +/*
 31.1128 + * Class:     TestClass1_Inner1
 31.1129 + * Method:    mon
 31.1130 + * Signature: (Ljava/lang/Object;)V
 31.1131 + */
 31.1132 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mon
 31.1133 +  (JNIEnv *, jobject, jobject);
 31.1134 +
 31.1135 +/*
 31.1136 + * Class:     TestClass1_Inner1
 31.1137 + * Method:    mtn
 31.1138 + * Signature: (Ljava/lang/String;)V
 31.1139 + */
 31.1140 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mtn
 31.1141 +  (JNIEnv *, jobject, jstring);
 31.1142 +
 31.1143 +/*
 31.1144 + * Class:     TestClass1_Inner1
 31.1145 + * Method:    mgn
 31.1146 + * Signature: (Ljava/util/List;)V
 31.1147 + */
 31.1148 +JNIEXPORT void JNICALL Java_TestClass1_00024Inner1_mgn
 31.1149 +  (JNIEnv *, jobject, jobject);
 31.1150 +
 31.1151 +#ifdef __cplusplus
 31.1152 +}
 31.1153 +#endif
 31.1154 +#endif
 31.1155 +/* Header for class TestClass2 */
 31.1156 +
 31.1157 +#ifndef _Included_TestClass2
 31.1158 +#define _Included_TestClass2
 31.1159 +#ifdef __cplusplus
 31.1160 +extern "C" {
 31.1161 +#endif
 31.1162 +#ifdef __cplusplus
 31.1163 +}
 31.1164 +#endif
 31.1165 +#endif
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/test/tools/javah/6572945/gold/jni.file.3	Wed Sep 23 19:15:04 2009 -0700
    32.3 @@ -0,0 +1,79 @@
    32.4 +/* DO NOT EDIT THIS FILE - it is machine generated */
    32.5 +#include <jni.h>
    32.6 +/* Header for class TestClass3 */
    32.7 +
    32.8 +#ifndef _Included_TestClass3
    32.9 +#define _Included_TestClass3
   32.10 +#ifdef __cplusplus
   32.11 +extern "C" {
   32.12 +#endif
   32.13 +#ifdef __cplusplus
   32.14 +}
   32.15 +#endif
   32.16 +#endif
   32.17 +/* Header for class TestClass3_Inner2 */
   32.18 +
   32.19 +#ifndef _Included_TestClass3_Inner2
   32.20 +#define _Included_TestClass3_Inner2
   32.21 +#ifdef __cplusplus
   32.22 +extern "C" {
   32.23 +#endif
   32.24 +#ifdef __cplusplus
   32.25 +}
   32.26 +#endif
   32.27 +#endif
   32.28 +/* Header for class TestClass3_Inner2_Inner2B */
   32.29 +
   32.30 +#ifndef _Included_TestClass3_Inner2_Inner2B
   32.31 +#define _Included_TestClass3_Inner2_Inner2B
   32.32 +#ifdef __cplusplus
   32.33 +extern "C" {
   32.34 +#endif
   32.35 +#ifdef __cplusplus
   32.36 +}
   32.37 +#endif
   32.38 +#endif
   32.39 +/* Header for class TestClass3_Inner2_Inner2A */
   32.40 +
   32.41 +#ifndef _Included_TestClass3_Inner2_Inner2A
   32.42 +#define _Included_TestClass3_Inner2_Inner2A
   32.43 +#ifdef __cplusplus
   32.44 +extern "C" {
   32.45 +#endif
   32.46 +#ifdef __cplusplus
   32.47 +}
   32.48 +#endif
   32.49 +#endif
   32.50 +/* Header for class TestClass3_Inner1 */
   32.51 +
   32.52 +#ifndef _Included_TestClass3_Inner1
   32.53 +#define _Included_TestClass3_Inner1
   32.54 +#ifdef __cplusplus
   32.55 +extern "C" {
   32.56 +#endif
   32.57 +#ifdef __cplusplus
   32.58 +}
   32.59 +#endif
   32.60 +#endif
   32.61 +/* Header for class TestClass3_Inner1_Inner1B */
   32.62 +
   32.63 +#ifndef _Included_TestClass3_Inner1_Inner1B
   32.64 +#define _Included_TestClass3_Inner1_Inner1B
   32.65 +#ifdef __cplusplus
   32.66 +extern "C" {
   32.67 +#endif
   32.68 +#ifdef __cplusplus
   32.69 +}
   32.70 +#endif
   32.71 +#endif
   32.72 +/* Header for class TestClass3_Inner1_Inner1A */
   32.73 +
   32.74 +#ifndef _Included_TestClass3_Inner1_Inner1A
   32.75 +#define _Included_TestClass3_Inner1_Inner1A
   32.76 +#ifdef __cplusplus
   32.77 +extern "C" {
   32.78 +#endif
   32.79 +#ifdef __cplusplus
   32.80 +}
   32.81 +#endif
   32.82 +#endif
    33.1 --- a/test/tools/javah/MissingParamClassTest.sh	Wed Sep 23 18:48:13 2009 -0700
    33.2 +++ b/test/tools/javah/MissingParamClassTest.sh	Wed Sep 23 19:15:04 2009 -0700
    33.3 @@ -77,10 +77,7 @@
    33.4  rm -f ParamClassTest.class MissingParamClassException.class ParamClassTest.h
    33.5  rm -f ${TMP1}
    33.6  
    33.7 -cp ${TESTSRC}${FS}ParamClassTest.java .
    33.8 -cp ${TESTSRC}${FS}MissingParamClassException.java .
    33.9 -
   33.10 -"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . "${TESTSRC}${FS}ParamClassTest.java"
   33.11 +"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . "${TESTSRC}${FS}ParamClassTest.java" "${TESTSRC}${FS}MissingParamClassException.java"
   33.12  
   33.13  # Before running javah remove dependent class file
   33.14  rm -f MissingParamClassException.class 
   33.15 @@ -88,15 +85,12 @@
   33.16  "${TESTJAVA}${FS}bin${FS}javah" ${TESTTOOLVMOPTS} ParamClassTest 2>${TMP1}
   33.17  
   33.18  if [ -f $GENERATED_HEADER_FILE ]; then
   33.19 -     echo "Failed"
   33.20 -     exit 1
   33.21 +     echo "1-- Failed: $GENERATED_HEADER_FILE found"
   33.22 +     rc=1
   33.23  fi
   33.24 -if [ ! -f ${TMP1} ]; then
   33.25 -     echo "Failed"
   33.26 -     exit 1
   33.27 -else
   33.28 -     echo "Passed"
   33.29 -     exit 0
   33.30 +if [ ! -s ${TMP1} ]; then
   33.31 +     echo "1-- Failed: ${TMP1} is empty"
   33.32 +     rc=1
   33.33  fi
   33.34  
   33.35  # Clean out work dir
   33.36 @@ -104,7 +98,9 @@
   33.37  rm -f $GENERATED_HEADER_FILE $TMP1 
   33.38  
   33.39  # Re-compile everything
   33.40 -"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS}  -d . ${TESTSRC}${FS}ParamClassTest.java
   33.41 +
   33.42 +"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . "${TESTSRC}${FS}ParamClassTest.java" "${TESTSRC}${FS}MissingParamClassException.java"
   33.43 +
   33.44  
   33.45  # Before re-run of javah remove dependent class file Param.class 
   33.46  rm -f Param.class
   33.47 @@ -112,13 +108,17 @@
   33.48  "${TESTJAVA}${FS}bin${FS}javah" ${TESTTOOLVMOPTS} ParamClassTest 2>${TMP1}
   33.49  
   33.50  if [ -f $GENERATED_HEADER_FILE ]; then
   33.51 -     echo "Failed"
   33.52 -     exit 1
   33.53 +     echo "2-- Failed: $GENERATED_HEADER_FILE found"
   33.54 +     rc=1
   33.55  fi
   33.56 -if [ ! -f ${TMP1} ]; then
   33.57 -     echo "Failed"
   33.58 -     exit 1
   33.59 +if [ ! -s ${TMP1} ]; then
   33.60 +     echo "2-- Failed: ${TMP1} is empty"
   33.61 +     rc=1
   33.62 +fi
   33.63 +
   33.64 +if [ "$rc" = "" ]; then
   33.65 +    echo Passed
   33.66  else
   33.67 -     echo "Passed"
   33.68 -     exit 0
   33.69 +    echo Failed
   33.70 +    exit 1
   33.71  fi
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/test/tools/javah/compareTest/CompareTest.java	Wed Sep 23 19:15:04 2009 -0700
    34.3 @@ -0,0 +1,265 @@
    34.4 +/*
    34.5 + * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    34.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    34.7 + *
    34.8 + * This code is free software; you can redistribute it and/or modify it
    34.9 + * under the terms of the GNU General Public License version 2 only, as
   34.10 + * published by the Free Software Foundation.
   34.11 + *
   34.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   34.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   34.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   34.15 + * version 2 for more details (a copy is included in the LICENSE file that
   34.16 + * accompanied this code).
   34.17 + *
   34.18 + * You should have received a copy of the GNU General Public License version
   34.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   34.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   34.21 + *
   34.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   34.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
   34.24 + * have any questions.
   34.25 + */
   34.26 +
   34.27 +import java.io.DataInputStream;
   34.28 +import java.io.File;
   34.29 +import java.io.IOException;
   34.30 +import java.io.InputStream;
   34.31 +import java.io.PrintWriter;
   34.32 +import java.io.StringWriter;
   34.33 +import java.util.ArrayList;
   34.34 +import java.util.Arrays;
   34.35 +import java.util.Enumeration;
   34.36 +import java.util.List;
   34.37 +import java.util.Set;
   34.38 +import java.util.TreeSet;
   34.39 +import java.util.jar.JarEntry;
   34.40 +import java.util.jar.JarFile;
   34.41 +
   34.42 +import com.sun.tools.classfile.AccessFlags;
   34.43 +import com.sun.tools.classfile.ClassFile;
   34.44 +import com.sun.tools.classfile.ConstantPoolException;
   34.45 +import com.sun.tools.classfile.Method;
   34.46 +import java.io.BufferedReader;
   34.47 +import java.io.FileInputStream;
   34.48 +import java.io.InputStreamReader;
   34.49 +import java.util.LinkedHashSet;
   34.50 +
   34.51 +public class CompareTest {
   34.52 +    String[][] testCases = {
   34.53 +        { },
   34.54 +        { "-jni" },
   34.55 +//        { "-llni" },
   34.56 +    };
   34.57 +
   34.58 +    public static void main(String... args) throws Exception {
   34.59 +        new CompareTest().run(args);
   34.60 +    }
   34.61 +
   34.62 +    public void run(String... args) throws Exception {
   34.63 +        old_javah_cmd = new File(args[0]);
   34.64 +        rt_jar = new File(args[1]);
   34.65 +
   34.66 +        Set<String> testClasses;
   34.67 +        if (args.length > 2) {
   34.68 +            testClasses = new LinkedHashSet<String>(Arrays.asList(Arrays.copyOfRange(args, 2, args.length)));
   34.69 +        } else
   34.70 +            testClasses = getNativeClasses(new JarFile(rt_jar));
   34.71 +
   34.72 +        for (String[] options: testCases) {
   34.73 +            for (String name: testClasses) {
   34.74 +                test(Arrays.asList(options), rt_jar, name);
   34.75 +            }
   34.76 +        }
   34.77 +
   34.78 +        if (errors == 0)
   34.79 +            System.out.println(count + " tests passed");
   34.80 +        else
   34.81 +            throw new Exception(errors + "/" + count + " tests failed");
   34.82 +    }
   34.83 +
   34.84 +    public void test(List<String> options, File bootclasspath, String className)
   34.85 +            throws IOException, InterruptedException {
   34.86 +        System.err.println("test: " + options + " " + className);
   34.87 +        count++;
   34.88 +
   34.89 +        testOptions = options;
   34.90 +        testClassName = className;
   34.91 +
   34.92 +        File oldOutDir = initDir(file(new File("old"), className));
   34.93 +        int old_rc = old_javah(options, oldOutDir, bootclasspath, className);
   34.94 +
   34.95 +        File newOutDir = initDir(file(new File("new"), className));
   34.96 +        int new_rc = new_javah(options, newOutDir, bootclasspath, className);
   34.97 +
   34.98 +        if (old_rc != new_rc)
   34.99 +            error("return codes differ; old: " + old_rc + ", new: " + new_rc);
  34.100 +
  34.101 +        compare(oldOutDir, newOutDir);
  34.102 +    }
  34.103 +
  34.104 +    int old_javah(List<String> options, File outDir, File bootclasspath, String className)
  34.105 +            throws IOException, InterruptedException {
  34.106 +        List<String> cmd = new ArrayList<String>();
  34.107 +        cmd.add(old_javah_cmd.getPath());
  34.108 +        cmd.addAll(options);
  34.109 +        cmd.add("-d");
  34.110 +        cmd.add(outDir.getPath());
  34.111 +        cmd.add("-bootclasspath");
  34.112 +        cmd.add(bootclasspath.getPath());
  34.113 +        cmd.add(className);
  34.114 +        System.err.println("old_javah: " + cmd);
  34.115 +        ProcessBuilder pb = new ProcessBuilder(cmd);
  34.116 +        pb.redirectErrorStream(true);
  34.117 +        Process p = pb.start();
  34.118 +        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
  34.119 +        String line;
  34.120 +        StringBuilder sb = new StringBuilder();
  34.121 +        while ((line = in.readLine()) != null) {
  34.122 +            sb.append(line);
  34.123 +            sb.append("\n");
  34.124 +        }
  34.125 +        System.err.println("old javah out: " + sb.toString());
  34.126 +        return p.waitFor();
  34.127 +    }
  34.128 +
  34.129 +    int new_javah(List<String> options, File outDir, File bootclasspath, String className) {
  34.130 +        List<String> args = new ArrayList<String>();
  34.131 +        args.addAll(options);
  34.132 +        args.add("-d");
  34.133 +        args.add(outDir.getPath());
  34.134 +        args.add("-bootclasspath");
  34.135 +        args.add(bootclasspath.getPath());
  34.136 +        args.add(className);
  34.137 +        StringWriter sw = new StringWriter();
  34.138 +        PrintWriter pw = new PrintWriter(sw);
  34.139 +        int rc = com.sun.tools.javah.Main.run(args.toArray(new String[args.size()]), pw);
  34.140 +        pw.close();
  34.141 +        System.err.println("new javah out: " + sw.toString());
  34.142 +        return rc;
  34.143 +    }
  34.144 +
  34.145 +    Set<String> getNativeClasses(JarFile jar) throws IOException, ConstantPoolException {
  34.146 +        System.err.println("getNativeClasses: " + jar.getName());
  34.147 +        Set<String> results = new TreeSet<String>();
  34.148 +        Enumeration<JarEntry> e = jar.entries();
  34.149 +        while (e.hasMoreElements()) {
  34.150 +            JarEntry je = e.nextElement();
  34.151 +            if (isNativeClass(jar, je)) {
  34.152 +                String name = je.getName();
  34.153 +                results.add(name.substring(0, name.length() - 6).replace("/", "."));
  34.154 +            }
  34.155 +        }
  34.156 +        return results;
  34.157 +    }
  34.158 +
  34.159 +    boolean isNativeClass(JarFile jar, JarEntry entry) throws IOException, ConstantPoolException {
  34.160 +        String name = entry.getName();
  34.161 +        if (name.startsWith("META-INF") || !name.endsWith(".class"))
  34.162 +            return false;
  34.163 +        //String className = name.substring(0, name.length() - 6).replace("/", ".");
  34.164 +        //System.err.println("check " + className);
  34.165 +        InputStream in = jar.getInputStream(entry);
  34.166 +        ClassFile cf = ClassFile.read(in);
  34.167 +        for (int i = 0; i < cf.methods.length; i++) {
  34.168 +            Method m = cf.methods[i];
  34.169 +            if (m.access_flags.is(AccessFlags.ACC_NATIVE)) {
  34.170 +                // System.err.println(className);
  34.171 +                return true;
  34.172 +            }
  34.173 +        }
  34.174 +        return false;
  34.175 +    }
  34.176 +
  34.177 +    void compare(File f1, File f2) throws IOException {
  34.178 +        if (f1.isFile() && f2.isFile())
  34.179 +            compareFiles(f1, f2);
  34.180 +        else if (f1.isDirectory() && f2.isDirectory())
  34.181 +            compareDirectories(f1, f2);
  34.182 +        else
  34.183 +            error("files differ: "
  34.184 +                + f1 + " (" + getFileType(f1) + "), "
  34.185 +                + f2 + " (" + getFileType(f2) + ")");
  34.186 +    }
  34.187 +
  34.188 +    void compareDirectories(File d1, File d2) throws IOException {
  34.189 +        Set<String> list = new TreeSet<String>();
  34.190 +        list.addAll(Arrays.asList(d1.list()));
  34.191 +        list.addAll(Arrays.asList(d2.list()));
  34.192 +        for (String c: list)
  34.193 +            compare(new File(d1, c), new File(d2, c));
  34.194 +    }
  34.195 +
  34.196 +    void compareFiles(File f1, File f2) throws IOException {
  34.197 +        byte[] c1 = readFile(f1);
  34.198 +        byte[] c2 = readFile(f2);
  34.199 +        if (!Arrays.equals(c1, c2))
  34.200 +            error("files differ: " + f1 + ", " + f2);
  34.201 +    }
  34.202 +
  34.203 +    byte[] readFile(File file) throws IOException {
  34.204 +        int size = (int) file.length();
  34.205 +        byte[] data = new byte[size];
  34.206 +        DataInputStream in = new DataInputStream(new FileInputStream(file));
  34.207 +        try {
  34.208 +            in.readFully(data);
  34.209 +        } finally {
  34.210 +            in.close();
  34.211 +        }
  34.212 +        return data;
  34.213 +    }
  34.214 +
  34.215 +    String getFileType(File f) {
  34.216 +        return f.isDirectory() ? "directory"
  34.217 +                : f.isFile() ? "file"
  34.218 +                : f.exists() ? "other"
  34.219 +                : "not found";
  34.220 +    }
  34.221 +
  34.222 +    /**
  34.223 +     * Set up an empty directory.
  34.224 +     */
  34.225 +    public File initDir(File dir) {
  34.226 +        if (dir.exists())
  34.227 +            deleteAll(dir);
  34.228 +        dir.mkdirs();
  34.229 +        return dir;
  34.230 +    }
  34.231 +
  34.232 +    /**
  34.233 +     * Delete a file or a directory (including all its contents).
  34.234 +     */
  34.235 +    boolean deleteAll(File file) {
  34.236 +        if (file.isDirectory()) {
  34.237 +            for (File f: file.listFiles())
  34.238 +                deleteAll(f);
  34.239 +        }
  34.240 +        return file.delete();
  34.241 +    }
  34.242 +
  34.243 +    File file(File dir, String... path) {
  34.244 +        File f = dir;
  34.245 +        for (String p: path)
  34.246 +            f = new File(f, p);
  34.247 +        return f;
  34.248 +    }
  34.249 +
  34.250 +    /**
  34.251 +     * Report an error.
  34.252 +     */
  34.253 +    void error(String msg, String... more) {
  34.254 +        System.err.println("test: " + testOptions + " " + testClassName);
  34.255 +        System.err.println("error: " + msg);
  34.256 +        for (String s: more)
  34.257 +            System.err.println(s);
  34.258 +        errors++;
  34.259 +        System.exit(1);
  34.260 +    }
  34.261 +
  34.262 +    File old_javah_cmd;
  34.263 +    File rt_jar;
  34.264 +    List<String> testOptions;
  34.265 +    String testClassName;
  34.266 +    int count;
  34.267 +    int errors;
  34.268 +}
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/test/tools/javah/compareTest/CompareTest.sh	Wed Sep 23 19:15:04 2009 -0700
    35.3 @@ -0,0 +1,43 @@
    35.4 +#!/bin/sh
    35.5 +#
    35.6 +# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    35.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    35.8 +#
    35.9 +# This code is free software; you can redistribute it and/or modify it
   35.10 +# under the terms of the GNU General Public License version 2 only, as
   35.11 +# published by the Free Software Foundation.
   35.12 +#
   35.13 +# This code is distributed in the hope that it will be useful, but WITHOUT
   35.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   35.15 +# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   35.16 +# version 2 for more details (a copy is included in the LICENSE file that
   35.17 +# accompanied this code).
   35.18 +#
   35.19 +# You should have received a copy of the GNU General Public License version
   35.20 +# 2 along with this work; if not, write to the Free Software Foundation,
   35.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   35.22 +#
   35.23 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   35.24 +# CA 95054 USA or visit www.sun.com if you need additional information or
   35.25 +# have any questions.
   35.26 +#
   35.27 +
   35.28 +jdk=${1:-/opt/jdk/1.6.0}
   35.29 +javah=${jdk}/bin/javah
   35.30 +rtjar=${jdk}/jre/lib/rt.jar
   35.31 +
   35.32 +# compile test
   35.33 +mkdir -p build/compareTest
   35.34 +/opt/jdk/1.7.0/bin/javac -classpath build/classes -d build/compareTest test/tools/javah/compareTest/*.java
   35.35 +
   35.36 +# run test
   35.37 +/opt/jdk/1.7.0/bin/java -classpath build/compareTest:build/classes CompareTest $javah $rtjar 2>&1 | tee CompareTest.out
   35.38 +
   35.39 +# show diffs for tests that failed
   35.40 +grep 'error:' CompareTest.out | sed -e 's|.*new/||' -e 's/\.h$//' -e 's|_|.|g' > CompareTest.classes.fail
   35.41 +
   35.42 +for i in $(cat CompareTest.classes.fail) ; do 
   35.43 +	/opt/jdk/1.7.0/bin/java -classpath compareTest:build/classes CompareTest $javah $rtjar $i 
   35.44 +	diff -r old new 
   35.45 +done 
   35.46 +
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/test/tools/javah/compareTest/FindNativeFiles.java	Wed Sep 23 19:15:04 2009 -0700
    36.3 @@ -0,0 +1,86 @@
    36.4 +/*
    36.5 + * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
    36.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    36.7 + *
    36.8 + * This code is free software; you can redistribute it and/or modify it
    36.9 + * under the terms of the GNU General Public License version 2 only, as
   36.10 + * published by the Free Software Foundation.
   36.11 + *
   36.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   36.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   36.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   36.15 + * version 2 for more details (a copy is included in the LICENSE file that
   36.16 + * accompanied this code).
   36.17 + *
   36.18 + * You should have received a copy of the GNU General Public License version
   36.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   36.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   36.21 + *
   36.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
   36.23 + * CA 95054 USA or visit www.sun.com if you need additional information or
   36.24 + * have any questions.
   36.25 + */
   36.26 +
   36.27 +import java.io.IOException;
   36.28 +import java.io.InputStream;
   36.29 +import java.util.Enumeration;
   36.30 +import java.util.jar.JarEntry;
   36.31 +import java.util.jar.JarFile;
   36.32 +
   36.33 +import com.sun.tools.classfile.AccessFlags;
   36.34 +import com.sun.tools.classfile.ClassFile;
   36.35 +import com.sun.tools.classfile.ConstantPoolException;
   36.36 +import com.sun.tools.classfile.Method;
   36.37 +import java.util.Comparator;
   36.38 +import java.util.Set;
   36.39 +import java.util.TreeSet;
   36.40 +
   36.41 +public class FindNativeFiles {
   36.42 +    public static void main(String[] args) throws IOException, ConstantPoolException {
   36.43 +        new FindNativeFiles().run(args);
   36.44 +    }
   36.45 +
   36.46 +    public void run(String[] args) throws IOException, ConstantPoolException {
   36.47 +        JarFile jar = new JarFile(args[0]);
   36.48 +        Set<JarEntry> entries = getNativeClasses(jar);
   36.49 +        for (JarEntry e: entries) {
   36.50 +            String name = e.getName();
   36.51 +            String className = name.substring(0, name.length() - 6).replace("/", ".");
   36.52 +            System.out.println(className);
   36.53 +        }
   36.54 +    }
   36.55 +
   36.56 +    Set<JarEntry> getNativeClasses(JarFile jar) throws IOException, ConstantPoolException {
   36.57 +        Set<JarEntry> results = new TreeSet<JarEntry>(new Comparator<JarEntry>() {
   36.58 +            public int compare(JarEntry o1, JarEntry o2) {
   36.59 +                return o1.getName().compareTo(o2.getName());
   36.60 +            }
   36.61 +        });
   36.62 +        Enumeration<JarEntry> e = jar.entries();
   36.63 +        while (e.hasMoreElements()) {
   36.64 +            JarEntry je = e.nextElement();
   36.65 +            if (isNativeClass(jar, je))
   36.66 +                results.add(je);
   36.67 +        }
   36.68 +        return results;
   36.69 +    }
   36.70 +
   36.71 +    boolean isNativeClass(JarFile jar, JarEntry entry) throws IOException, ConstantPoolException {
   36.72 +        String name = entry.getName();
   36.73 +        if (name.startsWith("META-INF") || !name.endsWith(".class"))
   36.74 +            return false;
   36.75 +        //String className = name.substring(0, name.length() - 6).replace("/", ".");
   36.76 +        //System.err.println("check " + className);
   36.77 +        InputStream in = jar.getInputStream(entry);
   36.78 +        ClassFile cf = ClassFile.read(in);
   36.79 +        in.close();
   36.80 +        for (int i = 0; i < cf.methods.length; i++) {
   36.81 +            Method m = cf.methods[i];
   36.82 +            if (m.access_flags.is(AccessFlags.ACC_NATIVE)) {
   36.83 +                // System.err.println(className);
   36.84 +                return true;
   36.85 +            }
   36.86 +        }
   36.87 +        return false;
   36.88 +    }
   36.89 +}
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/test/tools/javah/compareTest/README	Wed Sep 23 19:15:04 2009 -0700
    37.3 @@ -0,0 +1,16 @@
    37.4 +test/tools/javah/compareTest/README
    37.5 +
    37.6 +This directory contains a program for comparing the output of new javah against the
    37.7 +output of JDK 6 or other older versions of javah.
    37.8 +
    37.9 +It cannot be run automatically because of the need for the older version of javah
   37.10 +to compare against.
   37.11 +
   37.12 +The test works by scanning a jar file, such as rt.jar, looking for all files with
   37.13 +native methods.  It then runs both the old and new versions of javah on those
   37.14 +classes with native methods, and verifies that the results are character-for-character
   37.15 +identical.
   37.16 +
   37.17 +To run the test, build langtools, then execute the script in the root langtools 
   37.18 +directory, providing the location of the JDK to be tested. The default is
   37.19 +/opt/jdk/1.6.0.

mercurial