private static int getMethodHandleTypeForKind(int kind) {
    switch (kind) {
      case MethodHandleKind.REF_getField:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INSTANCE_GET;
      case MethodHandleKind.REF_getStatic:
        return CstMethodHandle.METHOD_HANDLE_TYPE_STATIC_GET;
      case MethodHandleKind.REF_putField:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INSTANCE_PUT;
      case MethodHandleKind.REF_putStatic:
        return CstMethodHandle.METHOD_HANDLE_TYPE_STATIC_PUT;
      case MethodHandleKind.REF_invokeVirtual:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INVOKE_INSTANCE;
      case MethodHandleKind.REF_invokeStatic:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INVOKE_STATIC;
      case MethodHandleKind.REF_invokeSpecial:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INVOKE_DIRECT;
      case MethodHandleKind.REF_newInvokeSpecial:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INVOKE_CONSTRUCTOR;
      case MethodHandleKind.REF_invokeInterface:
        return CstMethodHandle.METHOD_HANDLE_TYPE_INVOKE_INTERFACE;
    }
    throw new IllegalArgumentException("invalid kind: " + kind);
  }
Constructs an instance.

@param bytes {@code non-null;} the bytes of the file
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/cst/ConstantPoolParser.java