private readonly String LambdaClassName; // Generated name for the generated class "X$$Lambda$1" /// <summary> /// General meta-factory constructor, supporting both standard cases and /// allowing for uncommon options such as serialization or bridging. /// </summary> /// <param name="caller"> Stacked automatically by VM; represents a lookup context /// with the accessibility privileges of the caller. </param> /// <param name="invokedType"> Stacked automatically by VM; the signature of the /// invoked method, which includes the expected static /// type of the returned lambda object, and the static /// types of the captured arguments for the lambda. In /// the event that the implementation method is an /// instance method, the first argument in the invocation /// signature will correspond to the receiver. </param> /// <param name="samMethodName"> Name of the method in the functional interface to /// which the lambda or method reference is being /// converted, represented as a String. </param> /// <param name="samMethodType"> Type of the method in the functional interface to /// which the lambda or method reference is being /// converted, represented as a MethodType. </param> /// <param name="implMethod"> The implementation method which should be called (with /// suitable adaptation of argument types, return types, /// and adjustment for captured arguments) when methods of /// the resulting functional interface instance are invoked. </param> /// <param name="instantiatedMethodType"> The signature of the primary functional /// interface method after type variables are /// substituted with their instantiation from /// the capture site </param> /// <param name="isSerializable"> Should the lambda be made serializable? If set, /// either the target type or one of the additional SAM /// types must extend {@code Serializable}. </param> /// <param name="markerInterfaces"> Additional interfaces which the lambda object /// should implement. </param> /// <param name="additionalBridges"> Method types for additional signatures to be /// bridged to the implementation method </param> /// <exception cref="LambdaConversionException"> If any of the meta-factory protocol /// invariants are violated </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public InnerClassLambdaMetafactory(MethodHandles.Lookup caller, MethodType invokedType, String samMethodName, MethodType samMethodType, MethodHandle implMethod, MethodType instantiatedMethodType, boolean isSerializable, Class[] markerInterfaces, MethodType[] additionalBridges) throws LambdaConversionException public InnerClassLambdaMetafactory(MethodHandles.Lookup caller, MethodType invokedType, String samMethodName, MethodType samMethodType, MethodHandle implMethod, MethodType instantiatedMethodType, bool isSerializable, Class[] markerInterfaces, MethodType[] additionalBridges) : base(caller, invokedType, samMethodName, samMethodType, implMethod, instantiatedMethodType, isSerializable, markerInterfaces, additionalBridges) { ImplMethodClassName = ImplDefiningClass.Name.Replace('.', '/'); ImplMethodName = ImplInfo.Name; ImplMethodDesc = ImplMethodType.ToMethodDescriptorString(); ImplMethodReturnClass = (ImplKind == MethodHandleInfo.REF_newInvokeSpecial) ? ImplDefiningClass : ImplMethodType.ReturnType(); ConstructorType = invokedType.ChangeReturnType(Void.TYPE); LambdaClassName = TargetClass.Name.Replace('.', '/') + "$$Lambda$" + Counter.IncrementAndGet(); Cw = new ClassWriter(ClassWriter.COMPUTE_MAXS); int parameterCount = invokedType.ParameterCount(); if (parameterCount > 0) { ArgNames = new String[parameterCount]; ArgDescs = new String[parameterCount]; for (int i = 0; i < parameterCount; i++) { ArgNames[i] = "arg$" + (i + 1); ArgDescs[i] = BytecodeDescriptor.unparse(invokedType.ParameterType(i)); } } else { ArgNames = ArgDescs = EMPTY_STRING_ARRAY; } }