Java Code Examples for com.sun.tools.javac.code.Type.MethodType#getParameterTypes()

The following examples show how to use com.sun.tools.javac.code.Type.MethodType#getParameterTypes() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LambdaToMethod.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 2
Source File: LambdaToMethod.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 3
Source File: LambdaToMethod.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 4
Source File: Infer.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
public PartiallyInferredMethodType(MethodType mtype, InferenceContext inferenceContext, Env<AttrContext> env, Warner warn) {
    super(mtype.getParameterTypes(), mtype.getReturnType(), mtype.getThrownTypes(), mtype.tsym);
    this.inferenceContext = inferenceContext;
    this.env = env;
    this.warn = warn;
}
 
Example 5
Source File: LambdaToMethod.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 6
Source File: LambdaToMethod.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 7
Source File: LambdaToMethod.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 8
Source File: LambdaToMethod.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 9
Source File: LambdaToMethod.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}
 
Example 10
Source File: LambdaToMethod.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void addDeserializationCase(int implMethodKind, Symbol refSym, Type targetType, MethodSymbol samSym,
        DiagnosticPosition pos, List<Object> staticArgs, MethodType indyType) {
    String functionalInterfaceClass = classSig(targetType);
    String functionalInterfaceMethodName = samSym.getSimpleName().toString();
    String functionalInterfaceMethodSignature = typeSig(types.erasure(samSym.type));
    String implClass = classSig(types.erasure(refSym.owner.type));
    String implMethodName = refSym.getQualifiedName().toString();
    String implMethodSignature = typeSig(types.erasure(refSym.type));

    JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
    ListBuffer<JCExpression> serArgs = new ListBuffer<>();
    int i = 0;
    for (Type t : indyType.getParameterTypes()) {
        List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
        List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
        serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
        ++i;
    }
    JCStatement stmt = make.If(
            deserTest(deserTest(deserTest(deserTest(deserTest(
                kindTest,
                "getFunctionalInterfaceClass", functionalInterfaceClass),
                "getFunctionalInterfaceMethodName", functionalInterfaceMethodName),
                "getFunctionalInterfaceMethodSignature", functionalInterfaceMethodSignature),
                "getImplClass", implClass),
                "getImplMethodSignature", implMethodSignature),
            make.Return(makeIndyCall(
                pos,
                syms.lambdaMetafactory,
                names.altMetafactory,
                staticArgs, indyType, serArgs.toList(), samSym.name)),
            null);
    ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
    if (stmts == null) {
        stmts = new ListBuffer<>();
        kInfo.deserializeCases.put(implMethodName, stmts);
    }
    /****
    System.err.printf("+++++++++++++++++\n");
    System.err.printf("*functionalInterfaceClass: '%s'\n", functionalInterfaceClass);
    System.err.printf("*functionalInterfaceMethodName: '%s'\n", functionalInterfaceMethodName);
    System.err.printf("*functionalInterfaceMethodSignature: '%s'\n", functionalInterfaceMethodSignature);
    System.err.printf("*implMethodKind: %d\n", implMethodKind);
    System.err.printf("*implClass: '%s'\n", implClass);
    System.err.printf("*implMethodName: '%s'\n", implMethodName);
    System.err.printf("*implMethodSignature: '%s'\n", implMethodSignature);
    ****/
    stmts.append(stmt);
}