public final class CallSiteArray
extends Object
Array of classic (non-invokedynamic) call sites for a compiled class.
Prefer invokedynamic call sites for new code. Planned for deprecation/removal in a future Groovy version.
| Constructor and description |
|---|
CallSiteArray(Class owner, String[] names)Builds one AbstractCallSite per entry of names, in order. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static Object |
defaultCall(CallSite callSite, Object receiver, Object[] args)Selects a site for receiver (null, a Class, a
GroovyObject, or a plain object) and invokes it with args.
|
|
public static Object |
defaultCallConstructor(CallSite callSite, Object receiver, Object[] args)Treats receiver as the class to construct, selects a constructor
site, and invokes it with args. |
|
public static Object |
defaultCallCurrent(CallSite callSite, GroovyObject receiver, Object[] args)Selects a callCurrent site for receiver, using the
call-site array's owner as the sender, and invokes it with args.
|
|
public static Object |
defaultCallStatic(CallSite callSite, Class receiver, Object[] args)Forces receiver's static initializer to run, ignoring a failure
to load the class, then selects a static site and invokes it with
args. |
Empty argument array shared by sites that pass no arguments.
Class whose compiled call sites this array holds.
Builds one AbstractCallSite per entry of names, in order.
Selects a site for receiver (null, a Class, a
GroovyObject, or a plain object) and invokes it with args.
A null receiver is not cached. Any other site is installed when the
receiver's meta-class version stays unchanged while the site is created.
Treats receiver as the class to construct, selects a constructor
site, and invokes it with args. The site is installed when the
meta-class version stays unchanged while the site is created.
Selects a callCurrent site for receiver, using the
call-site array's owner as the sender, and invokes it with args.
The site is installed when the receiver's meta-class version stays
unchanged while the site is created.
Forces receiver's static initializer to run, ignoring a failure
to load the class, then selects a static site and invokes it with
args. The site is installed when the meta-class version stays
unchanged while the site is created.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.