src/jdk.jdi/share/classes/com/sun/tools/jdi/JNITypeParser.java
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 45714 jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/JNITypeParser.java@1820d351198d
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
45714
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
     2
 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 715
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.jdi;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
45714
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
    28
import java.util.ArrayList;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.util.List;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
public class JNITypeParser {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
    static final char SIGNATURE_ENDCLASS = ';';
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
    static final char SIGNATURE_FUNC = '(';
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
    static final char SIGNATURE_ENDFUNC = ')';
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    private String signature;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    private List<String> typeNameList;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
    private List<String> signatureList;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    private int currentIndex;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    JNITypeParser(String signature) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
        this.signature = signature;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    static String typeNameToSignature(String signature) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    47
        StringBuilder sb = new StringBuilder();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        int firstIndex = signature.indexOf('[');
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        int index = firstIndex;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        while (index != -1) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    51
            sb.append('[');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
            index = signature.indexOf('[', index + 1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
        if (firstIndex != -1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
            signature = signature.substring(0, firstIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
        if (signature.equals("boolean")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    60
            sb.append('Z');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
        } else if (signature.equals("byte")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    62
            sb.append('B');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        } else if (signature.equals("char")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    64
            sb.append('C');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        } else if (signature.equals("short")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    66
            sb.append('S');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
        } else if (signature.equals("int")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    68
            sb.append('I');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        } else if (signature.equals("long")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    70
            sb.append('J');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        } else if (signature.equals("float")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    72
            sb.append('F');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        } else if (signature.equals("double")) {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    74
            sb.append('D');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        } else {
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    76
            sb.append('L');
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    77
            sb.append(signature.replace('.', '/'));
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    78
            sb.append(';');
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
24969
afa6934dd8e8 8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents: 5506
diff changeset
    81
        return sb.toString();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    String typeName() {
51
6fe31bc95bbc 6600143: Remove another 450 unnecessary casts
martin
parents: 2
diff changeset
    85
        return typeNameList().get(typeNameList().size()-1);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    List<String> argumentTypeNames() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        return typeNameList().subList(0, typeNameList().size() - 1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    String signature() {
51
6fe31bc95bbc 6600143: Remove another 450 unnecessary casts
martin
parents: 2
diff changeset
    93
        return signatureList().get(signatureList().size()-1);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    List<String> argumentSignatures() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
        return signatureList().subList(0, signatureList().size() - 1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    int dimensionCount() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        int count = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        String signature = signature();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        while (signature.charAt(count) == '[') {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
            count++;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
        return count;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    String componentSignature(int level) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
        return signature().substring(level);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    private synchronized List<String> signatureList() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        if (signatureList == null) {
45714
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
   115
            signatureList = new ArrayList<>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
            String elem;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
            currentIndex = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            while(currentIndex < signature.length()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                elem = nextSignature();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
                signatureList.add(elem);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            if (signatureList.size() == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                throw new IllegalArgumentException("Invalid JNI signature '" +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                                                   signature + "'");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        return signatureList;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    private synchronized List<String> typeNameList() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        if (typeNameList == null) {
45714
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
   134
            typeNameList = new ArrayList<>(10);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            String elem;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            currentIndex = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            while(currentIndex < signature.length()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
                elem = nextTypeName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                typeNameList.add(elem);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            if (typeNameList.size() == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                throw new IllegalArgumentException("Invalid JNI signature '" +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
                                                   signature + "'");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        return typeNameList;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    private String nextSignature() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        char key = signature.charAt(currentIndex++);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        switch(key) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            case (JDWP.Tag.ARRAY):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
                return  key + nextSignature();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
            case (JDWP.Tag.OBJECT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
                int endClass = signature.indexOf(SIGNATURE_ENDCLASS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
                                                 currentIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
                String retVal = signature.substring(currentIndex - 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                                                    endClass + 1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                currentIndex = endClass + 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
                return retVal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            case (JDWP.Tag.VOID):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
            case (JDWP.Tag.BOOLEAN):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            case (JDWP.Tag.BYTE):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
            case (JDWP.Tag.CHAR):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
            case (JDWP.Tag.SHORT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            case (JDWP.Tag.INT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            case (JDWP.Tag.LONG):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
            case (JDWP.Tag.FLOAT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            case (JDWP.Tag.DOUBLE):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
                return String.valueOf(key);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
            case SIGNATURE_ENDFUNC:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
            case SIGNATURE_FUNC:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
                return nextSignature();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                throw new IllegalArgumentException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                    "Invalid JNI signature character '" + key + "'");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    private String nextTypeName() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
        char key = signature.charAt(currentIndex++);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
        switch(key) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
            case (JDWP.Tag.ARRAY):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                return  nextTypeName() + "[]";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
            case (JDWP.Tag.BYTE):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                return "byte";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
            case (JDWP.Tag.CHAR):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                return "char";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
            case (JDWP.Tag.OBJECT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
                int endClass = signature.indexOf(SIGNATURE_ENDCLASS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                                                 currentIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                String retVal = signature.substring(currentIndex,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                                                    endClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
                retVal = retVal.replace('/','.');
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
                currentIndex = endClass + 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
                return retVal;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
            case (JDWP.Tag.FLOAT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
                return "float";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
            case (JDWP.Tag.DOUBLE):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
                return "double";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
            case (JDWP.Tag.INT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
                return "int";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            case (JDWP.Tag.LONG):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                return "long";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
            case (JDWP.Tag.SHORT):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
                return "short";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
            case (JDWP.Tag.VOID):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
                return "void";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
            case (JDWP.Tag.BOOLEAN):
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
                return "boolean";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
            case SIGNATURE_ENDFUNC:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
            case SIGNATURE_FUNC:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
                return nextTypeName();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
            default:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
                throw new IllegalArgumentException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
                    "Invalid JNI signature character '" + key + "'");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
}