code: private static MethodUsage instantiationSetToMethodUsage(ResolvedMethodDeclaration methodDeclaration, InstantiationSet instantiationSet) {
          if (instantiationSet.isEmpty()) {
              return new MethodUsage(methodDeclaration);
          }
          List<ResolvedType> paramTypes = new LinkedList<>();
          for (int i=0;i<methodDeclaration.getNumberOfParams();i++) {
              paramTypes.add(instantiationSet.apply(methodDeclaration.getParam(i).getType()));
          }
          ResolvedType returnType = instantiationSet.apply(methodDeclaration.getReturnType());
          return new MethodUsage(methodDeclaration, paramTypes, returnType);
      }
docs: /