private byte[] translatePath(@Nullable TypePath path) {
    TypeInfo curType = myTypeInfo;
    int depth = curType.innerDepth(myFirstPassData);
    if (path == null) {
      if (depth == 0) {
        return ArrayUtil.EMPTY_BYTE_ARRAY;
      }
      byte[] result = new byte[depth];
      Arrays.fill(result, ENCLOSING_CLASS);
      return result;
    }
    ByteArrayOutputStream result = new ByteArrayOutputStream();
    int length = path.getLength();
    for (int i = 0; i < length; i++) {
      byte step = (byte)path.getStep(i);
      if (step == TypePath.INNER_TYPE) {
        if (depth == 0) return null;
        depth--;
        continue;
      }
      while (depth-- > 0) {
        result.write(ENCLOSING_CLASS);
        if (!(curType instanceof TypeInfo.RefTypeInfo)) return null;
        curType = ((TypeInfo.RefTypeInfo)curType).outerType();
      }
      switch (step) {
        case TypePath.ARRAY_ELEMENT:
          if (!(curType instanceof TypeInfo.DerivedTypeInfo) ||
              (curType.getKind() != TypeInfo.TypeKind.ARRAY && curType.getKind() != TypeInfo.TypeKind.ELLIPSIS)) {
            return null;
          }
          curType = ((TypeInfo.DerivedTypeInfo)curType).child();
          result.write(ARRAY_ELEMENT);
          break;
        case TypePath.WILDCARD_BOUND:
          if (!(curType instanceof TypeInfo.DerivedTypeInfo) ||
              (curType.getKind() != TypeInfo.TypeKind.EXTENDS && curType.getKind() != TypeInfo.TypeKind.SUPER)) {
            return null;
          }
          curType = ((TypeInfo.DerivedTypeInfo)curType).child();
          result.write(WILDCARD_BOUND);
          break;
        case TypePath.TYPE_ARGUMENT:
          int argumentIndex = path.getStepArgument(i);
          if (!(curType instanceof TypeInfo.RefTypeInfo)) return null;
          curType = ((TypeInfo.RefTypeInfo)curType).genericComponent(argumentIndex);
          result.write(TYPE_ARGUMENT);
          result.write(argumentIndex);
          break;
        default:
          return null;
      }
      if (curType == null) return null;
      depth = curType.innerDepth(myFirstPassData);
    }
    while (depth-- > 0) {
      result.write(ENCLOSING_CLASS);
    }
    return result.toByteArray();
  }
private byte[] translatePath(@Nullable TypePath path)