Package: org.codehaus.groovy.classgen.asm

## [Java] Class MethodCallerMultiAdapter

- org.codehaus.groovy.classgen.asm.MethodCallerMultiAdapter

-     public class MethodCallerMultiAdapter
      extends Object

  Multi-adapter for method callers that handles different argument counts and safe/spread-safe variants.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static int` | `MAX_ARGS` | Maximum number of direct (non-N-arg) argument slots; variants above this use the N-arg method.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `call(org.objectweb.asm.MethodVisitor methodVisitor, int numberOfArguments, boolean safe, boolean spreadSafe)` Invokes the appropriate method based on argument count and safety flags.
    `` | `public static MethodCallerMultiAdapter` | `newStatic(Class theClass, String baseName, boolean createNArgs, boolean skipSpreadSafeAndSafe)` Creates a multi-adapter for static methods with optional safe and spread-safe variants.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### public static final int MAX_ARGS

      Maximum number of direct (non-N-arg) argument slots; variants above this use the N-arg method.

  - ### Method Detail

    - #### public void call(org.objectweb.asm.MethodVisitor methodVisitor, int numberOfArguments, boolean safe, boolean spreadSafe)

      Invokes the appropriate method based on argument count and safety flags.

      Parameters:
        `methodVisitor` - the method visitor to write to
        `numberOfArguments` - a value > 0 describing how many arguments are additionally used for the method call
        `safe` - whether to use the safe variant
        `spreadSafe` - whether to use the spread-safe variant

    - #### public static MethodCallerMultiAdapter newStatic(Class theClass, String baseName, boolean createNArgs, boolean skipSpreadSafeAndSafe)

      Creates a multi-adapter for static methods with optional safe and spread-safe variants.

      Parameters:
        `theClass` - the class containing the methods
        `baseName` - the base method name
        `createNArgs` - whether to create numbered argument variants
        `skipSpreadSafeAndSafe` - whether to skip safe and spread-safe variants
      Returns:
        a new MethodCallerMultiAdapter