public static byte typeOfSignature()

in src/main/java/org/apache/bcel/classfile/Utility.java [1253:1289]


    public static byte typeOfSignature(final String signature) throws ClassFormatException {
        try {
            switch (signature.charAt(0)) {
            case 'B':
                return Const.T_BYTE;
            case 'C':
                return Const.T_CHAR;
            case 'D':
                return Const.T_DOUBLE;
            case 'F':
                return Const.T_FLOAT;
            case 'I':
                return Const.T_INT;
            case 'J':
                return Const.T_LONG;
            case 'L':
            case 'T':
                return Const.T_REFERENCE;
            case '[':
                return Const.T_ARRAY;
            case 'V':
                return Const.T_VOID;
            case 'Z':
                return Const.T_BOOLEAN;
            case 'S':
                return Const.T_SHORT;
            case '!':
            case '+':
            case '*':
                return typeOfSignature(signature.substring(1));
            default:
                throw new InvalidMethodSignatureException(signature);
            }
        } catch (final StringIndexOutOfBoundsException e) {
            throw new InvalidMethodSignatureException(signature, e);
        }
    }