docs: public JavaConstant withType(TypeDescription typeDescription) {
              if (typeDescription.represents(void.class)) {
                  throw new IllegalArgumentException("Constant value cannot represent void");
              } else if (value.getBootstrapMethod().getName().equals(MethodDescription.CONSTRUCTOR_INTERNAL_NAME)
                      ? !this.typeDescription.isAssignableTo(typeDescription)
                      : (!typeDescription.asBoxed().isInHierarchyWith(this.typeDescription.asBoxed()))) {
                  throw new IllegalArgumentException(typeDescription + " is not compatible with bootstrapped type " + this.typeDescription);
              }
              Object[] bootstrapMethodArgument = new Object[value.getBootstrapMethodArgumentCount()];
              for (int index = 0; index < value.getBootstrapMethodArgumentCount(); index++) {
                  bootstrapMethodArgument[index] = value.getBootstrapMethodArgument(index);
              }
              return new Dynamic(new ConstantDynamic(value.getName(),
                      typeDescription.getDescriptor(),
                      value.getBootstrapMethod(),
                      bootstrapMethodArgument), typeDescription);
          }