Package org.codehaus.groovy.classgen.asm

# Class MethodCallerMultiAdapter

java.lang.Object
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
  Modifier and Type
  Field
  Description
  `static final int`
  `MAX_ARGS`
  Maximum number of direct (non-N-arg) argument slots; variants above this use the N-arg method.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MethodCallerMultiAdapter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `call(org.objectweb.asm.MethodVisitor methodVisitor, int numberOfArguments, boolean safe, boolean spreadSafe)`
  Invokes the appropriate method based on argument count and safety flags.
  `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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MAX_ARGS

    public static final int MAX_ARGS
    Maximum number of direct (non-N-arg) argument slots; variants above this use the N-arg method.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### MethodCallerMultiAdapter

    public MethodCallerMultiAdapter()

- ## Method Details

  - ### newStatic

    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

  - ### call

    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