SPeCS Packages Documentation
    Preparing search index...
    • Prepares a given method call by:

      • Extracting a functional interface.
      • Creating a field of that type.
      • Initializing the field with the called method.
      • Replacing the call with invocation of the field method.

      Parameters

      • call: Call | null | undefined

        The method call join point.

      • Optionalmethod: Method

        The method join point (optional).

      • OptionalfieldLocation: Class

        The location to insert the field (optional).

      • newFile: boolean = true

        Whether to create the interface in a new file (default: true).

      • funcInterface: InterfaceType | null | undefined = null

        The functional interface join point (optional).

      Returns {
          $field: Field | null | undefined;
          $interface: InterfaceType | null;
          $interfaceMethod: Method | undefined;
          defaultMethod: string | undefined;
      }

      An object containing the extracted field, interface, and related information.