Top Description Inners Fields Constructors Methods
org.codehaus.groovy.vmplugin.v7

public Class IndyInterface

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
groovy.lang.GroovySystem, java.lang.invoke.*, java.util.Arrays

Deprecated

Legacy class containing methods called by Groovy 2.5 Indy compiled bytecode. Includes the interfacing methods with bytecode for invokedynamic and some helper methods and classes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
IndyInterface.CallType

Enum for easy differentiation between call types.

Field Summary

Modifier and TypeField and Description
public static final int
GROOVY_OBJECT

Flags for method and property calls.

public static final int
IMPLICIT_THIS

Flags for method and property calls.

protected static Logger
protected static final boolean
public static final MethodHandles.Lookup
LOOKUP

LOOKUP constant used for example in unreflect calls.

public static final int
SAFE_NAVIGATION

Flags for method and property calls.

public static final int
SPREAD_CALL

Flags for method and property calls.

protected static SwitchPoint
public static final int
THIS_CALL

Flags for method and property calls.

public static final int
UNCACHED_CALL

Flags for method and property calls.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static CallSite

Returns:

the produced CallSite
bootstrap
(MethodHandles.Lookup
- the caller
caller
,
String
- the type of the call
callType
,
MethodType
- the call site type
type
,
String
- the real method name
name
,
int
- call flags
flags
)

Bootstrap method for method calls from Groovy compiled code with indy enabled.

public static Object
fromCache(MutableCallSite callSite, Class<?> sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments)

Get the cached methodhandle.

protected static void
invalidateSwitchPoints()

Callback for constant meta class update change.

public static Object
selectMethod(MutableCallSite 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
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GROOVY_OBJECTback to summary
public static final int GROOVY_OBJECT

Flags for method and property calls.

IMPLICIT_THISback to summary
public static final int IMPLICIT_THIS

Flags for method and property calls.

LOGback to summary
protected static Logger LOG
LOG_ENABLEDback to summary
protected static final boolean LOG_ENABLED
LOOKUPback to summary
public static final MethodHandles.Lookup LOOKUP

LOOKUP constant used for example in unreflect calls.

SAFE_NAVIGATIONback to summary
public static final int SAFE_NAVIGATION

Flags for method and property calls.

SPREAD_CALLback to summary
public static final int SPREAD_CALL

Flags for method and property calls.

switchPointback to summary
protected static SwitchPoint switchPoint
THIS_CALLback to summary
public static final int THIS_CALL

Flags for method and property calls.

UNCACHED_CALLback to summary
public static final int UNCACHED_CALL

Flags for method and property calls.

Constructor Detail

IndyInterfaceback to summary
public IndyInterface()

Method Detail

bootstrapback to summary
public static CallSite bootstrap(MethodHandles.Lookup caller, String callType, MethodType type, String name, int flags)

Bootstrap method for method calls from Groovy compiled code with indy enabled. This method gets a flags parameter which uses the following encoding:

Parameters
caller:MethodHandles.Lookup

- the caller

callType:String

- the type of the call

type:MethodType

- the call site type

name:String

- the real method name

flags:int

- call flags

Returns:CallSite

the produced CallSite

Since
2.1.0
fromCacheback to summary
public static Object fromCache(MutableCallSite callSite, Class<?> sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments) throws Throwable

Get the cached methodhandle. if the related methodhandle is not found in the inline cache, cache and return it.

invalidateSwitchPointsback to summary
protected static void invalidateSwitchPoints()

Callback for constant meta class update change.

selectMethodback to summary
public static Object selectMethod(MutableCallSite callSite, Class<?> sender, String methodName, int callID, Boolean safeNavigation, Boolean thisCall, Boolean spreadCall, Object dummyReceiver, Object[] arguments) throws Throwable

Core method for indy method selection using runtime types.

staticArrayAccessback to summary
public static CallSite staticArrayAccess(MethodHandles.Lookup lookup, String name, MethodType type)
Since
2.5.0
org.codehaus.groovy.vmplugin.v7 back to summary

public final Enum IndyInterface.CallType

extends Enum<IndyInterface.CallType>
Class Inheritance

Enum for easy differentiation between call types.

Field Summary

Modifier and TypeField and Description
public static final IndyInterface.CallType
CAST

Cast invocation type

public static final IndyInterface.CallType
GET

Get property invocation type

public static final IndyInterface.CallType
INIT

Constructor invocation type

public static final IndyInterface.CallType
METHOD

Method invocation type

private final String
name

Hides java.lang.Enum.name.

The name of the call site type.
public static final IndyInterface.CallType
SET

Set property invocation type

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static IndyInterface.CallType
fromCallSiteName(String callSiteName)

public String
getCallSiteName()

Returns the name of the call site type.

public static IndyInterface.CallType
public static IndyInterface.CallType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CASTback to summary
public static final IndyInterface.CallType CAST

Cast invocation type

GETback to summary
public static final IndyInterface.CallType GET

Get property invocation type

INITback to summary
public static final IndyInterface.CallType INIT

Constructor invocation type

METHODback to summary
public static final IndyInterface.CallType METHOD

Method invocation type

nameback to summary
private final String name

Hides java.lang.Enum.name.

The name of the call site type.

SETback to summary
public static final IndyInterface.CallType SET

Set property invocation type

Constructor Detail

CallTypeback to summary
private CallType(String name)

Method Detail

fromCallSiteNameback to summary
public static IndyInterface.CallType fromCallSiteName(String callSiteName)
getCallSiteNameback to summary
public String getCallSiteName()

Returns the name of the call site type.

valueOfback to summary
public static IndyInterface.CallType valueOf(String name)
valuesback to summary
public static IndyInterface.CallType[] values()