private String getLambdaAccessMethodDesc(Handle implMethod) { if (implMethod.getTag() == H_INVOKESTATIC) { // static method call -> keep as-is return implMethod.getDesc(); } else if (implMethod.getTag() == H_NEWINVOKESPECIAL) { // constructor call -> change to a a factory method return Types.changeReturnType( Type.getObjectType(implMethod.getOwner()), implMethod.getDesc()); } else { // instance method call -> change to a static method return Types.prependArgumentType(Type.getObjectType(className), implMethod.getDesc()); } }