Package org.codehaus.groovy.runtime.callsite

# Class CachedMethodCallSites

java.lang.Object
org.codehaus.groovy.runtime.callsite.CachedMethodCallSites

public final class CachedMethodCallSites extends Object
Creates optimized call sites for `CachedMethod` instances. Logic formerly lived on `CachedMethod` in groovy-core.

Per-method compile state is held in a side map (not on `CachedMethod`) so groovy-core reflection metadata stays free of classic call-site concerns. State mutations for a given method are synchronized on that method's state object.

Prefer invokedynamic call sites for new code. Planned for deprecation/removal in a future Groovy version.

Since:
  6.0.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CallSite`
  `createPogoMetaMethodSite(CachedMethod method, CallSite site, MetaClassImpl metaClass, Class[] params)`
  Creates an optimized POGO call site, compiling a specialized site class when possible.
  `static CallSite`
  `createPojoMetaMethodSite(CachedMethod method, CallSite site, MetaClassImpl metaClass, Class[] params)`
  Creates an optimized POJO call site, compiling a specialized site class when possible.
  `static CallSite`
  `createStaticMetaMethodSite(CachedMethod method, CallSite site, MetaClassImpl metaClass, Class[] params)`
  Creates an optimized static call site, compiling a specialized site class when possible.

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

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

- ## Method Details

  - ### createPogoMetaMethodSite

    public static CallSite createPogoMetaMethodSite(CachedMethod method, CallSite site, MetaClassImpl metaClass, Class[] params)
    Creates an optimized POGO call site, compiling a specialized site class when possible.

  - ### createPojoMetaMethodSite

    public static CallSite createPojoMetaMethodSite(CachedMethod method, CallSite site, MetaClassImpl metaClass, Class[] params)
    Creates an optimized POJO call site, compiling a specialized site class when possible.

  - ### createStaticMetaMethodSite

    public static CallSite createStaticMetaMethodSite(CachedMethod method, CallSite site, MetaClassImpl metaClass, Class[] params)
    Creates an optimized static call site, compiling a specialized site class when possible.