public class IndyInterface
extends Object
Bytecode level interface for bootstrap methods used by invokedynamic. This class provides a logging ability by using the boolean system property groovy.indy.logging. Other than that this class contains the interfacing methods with bytecode for invokedynamic as well as some helper methods and classes.
| Modifiers | Name | Description |
|---|---|---|
enum |
IndyInterface.CallType |
Enum for easy differentiation between call types. |
| Modifiers | Name | Description |
|---|---|---|
protected static Logger |
LOG |
Logger. |
protected static boolean |
LOG_ENABLED |
Indicates if indy logging is enabled. |
static Lookup |
LOOKUP |
LOOKUP constant used for example in unreflect calls |
static int |
SAFE_NAVIGATION |
Flags for method and property calls. |
protected static SwitchPoint |
switchPoint |
Shared switch point invalidated when metaclass state changes. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static CallSite |
bootstrap(Lookup caller, String callType, MethodType type, String name, int flags)Bootstrap method for method calls from Groovy-compiled code with indy. |
|
public static Object |
fromCache(CacheableCallSite callSite, Class<?> sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments)Get the cached methodHandle. if the related methodHandle is not found in the inline cache, cache and return it. |
|
protected static void |
invalidateSwitchPoints()Callback for constant metaclass update change |
|
protected static MethodHandle |
makeFallBack(MutableCallSite mc, Class<?> sender, String name, int callID, MethodType type, boolean safeNavigation, boolean thisCall, boolean spreadCall)Makes a fallback method for an invalidated method selection. |
|
public static Object |
selectMethod(CacheableCallSite callSite, Class<?> sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments)Core method for indy method selection using runtime types. |
|
public static CallSite |
staticArrayAccess(Lookup lookup, String name, MethodType type)
|
Logger.
Indicates if indy logging is enabled.
LOOKUP constant used for example in unreflect calls
Flags for method and property calls.
Shared switch point invalidated when metaclass state changes.
Bootstrap method for method calls from Groovy-compiled code with indy.
caller - - the callercallType - - the type of calltype - - the parameter(s) and return type specificationname - - the real method nameflags - - call flags Get the cached methodHandle. if the related methodHandle is not found in the inline cache, cache and return it.
Callback for constant metaclass update change
Makes a fallback method for an invalidated method selection.
Core method for indy method selection using runtime types.