jodd-proxetta/src/main/java/jodd/asm7/Type.java
private static Type getTypeInternal(
      final String descriptorBuffer, final int descriptorBegin, final int descriptorEnd) {
    switch (descriptorBuffer.charAt(descriptorBegin)) {
      case 'V':
        return VOID_TYPE;
      case 'Z':
        return BOOLEAN_TYPE;
      case 'C':
        return CHAR_TYPE;
      case 'B':
        return BYTE_TYPE;
      case 'S':
        return SHORT_TYPE;
      case 'I':
        return INT_TYPE;
      case 'F':
        return FLOAT_TYPE;
      case 'J':
        return LONG_TYPE;
      case 'D':
        return DOUBLE_TYPE;
      case '[':
        return new Type(ARRAY, descriptorBuffer, descriptorBegin, descriptorEnd);
      case 'L':
        return new Type(OBJECT, descriptorBuffer, descriptorBegin + 1, descriptorEnd - 1);
      case '(':
        return new Type(METHOD, descriptorBuffer, descriptorBegin, descriptorEnd);
      default:
        throw new IllegalArgumentException();
    }
  }
private static Type getTypeInternal(
      final String descriptorBuffer, final int descriptorBegin, final int descriptorEnd) {
    switch (descriptorBuffer.charAt(descriptorBegin)) {
      case 'V':
        return VOID_TYPE;
      case 'Z':
        return BOOLEAN_TYPE;
      case 'C':
        return CHAR_TYPE;
      case 'B':
        return BYTE_TYPE;
      case 'S':
        return SHORT_TYPE;
      case 'I':
        return INT_TYPE;
      case 'F':
        return FLOAT_TYPE;
      case 'J':
        return LONG_TYPE;
      case 'D':
        return DOUBLE_TYPE;
      case '[':
        return new Type(ARRAY, descriptorBuffer, descriptorBegin, descriptorEnd);
      case 'L':
        return new Type(OBJECT, descriptorBuffer, descriptorBegin + 1, descriptorEnd - 1);
      case '(':
        return new Type(METHOD, descriptorBuffer, descriptorBegin, descriptorEnd);
      default:
        throw new IllegalArgumentException();
    }
  }
private static Type getTypeInternal ( final String descriptorBuffer , final int descriptorBegin , final int descriptorEnd ) { switch ( descriptorBuffer . charAt ( descriptorBegin ) ) { case ' ' : return VOID_TYPE ; case ' ' : return BOOLEAN_TYPE ; case ' ' : return CHAR_TYPE ; case ' ' : return BYTE_TYPE ; case ' ' : return SHORT_TYPE ; case ' ' : return INT_TYPE ; case ' ' : return FLOAT_TYPE ; case ' ' : return LONG_TYPE ; case ' ' : return DOUBLE_TYPE ; case ' ' : return new Type ( ARRAY , descriptorBuffer , descriptorBegin , descriptorEnd ) ; case ' ' : return new Type ( OBJECT , descriptorBuffer , descriptorBegin + 1 , descriptorEnd - 1 ) ; case ' ' : return new Type ( METHOD , descriptorBuffer , descriptorBegin , descriptorEnd ) ; default : throw new IllegalArgumentException ( ) ; } }
Returns the {@link Type} corresponding to the given field or method descriptor.

@param descriptorBuffer a buffer containing the field or method descriptor.
@param descriptorBegin the beginning index, inclusive, of the field or method descriptor in
descriptorBuffer.
@param descriptorEnd the end index, exclusive, of the field or method descriptor in
descriptorBuffer.
@return the {@link Type} corresponding to the given type descriptor.
Returns the { @link Type } corresponding to the given field or method descriptor .