예제 #1
0
  @NotNull
  public Parameters addAllParameters(@NotNull FieldRemapper remapper) {
    Method asmMethod = typeMapper.mapAsmMethod(getFunctionDescriptor());
    ParametersBuilder builder =
        ParametersBuilder.initializeBuilderFrom(
            AsmTypes.OBJECT_TYPE, asmMethod.getDescriptor(), this);

    for (CapturedParamDesc info : getCapturedVars()) {
      CapturedParamInfo field =
          remapper.findField(
              new FieldInsnNode(0, info.getContainingLambdaName(), info.getFieldName(), ""));
      assert field != null
          : "Captured field not found: "
              + info.getContainingLambdaName()
              + "."
              + info.getFieldName();
      builder.addCapturedParam(field, info.getFieldName());
    }

    return builder.buildParameters();
  }
예제 #2
0
 @NotNull
 public List<Type> getInvokeParamsWithoutCaptured() {
   return Arrays.asList(typeMapper.mapAsmMethod(functionDescriptor).getArgumentTypes());
 }