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

public Class Java7

extends Java6
Class Inheritance
Annotations
@Deprecated
Imports
org.codehaus.groovy.GroovyBugError, org.codehaus.groovy.reflection.ReflectionUtils, org.codehaus.groovy.vmplugin.v6.Java6, java.lang.invoke.MethodHandle, .MethodHandles, java.lang.reflect.Constructor, .Method, java.security.AccessController, .PrivilegedAction

Deprecated

Java 7 based functions.

For crude customization, you can add your own methods to your own version and place it on the classpath ahead of this one.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
getInvokeSpecialHandle(final Method method, final Object receiver)

Overrides org.codehaus.groovy.vmplugin.v5.Java5.getInvokeSpecialHandle.

Implements org.codehaus.groovy.vmplugin.VMPlugin.getInvokeSpecialHandle.

Returns a handle with bound receiver to invokeSpecial the given method.
private static Constructor<MethodHandles.Lookup>
public int
public void
public Object
invokeHandle(Object
the handle
handle
,
Object[]
arguments for the method call, can be empty but not null
args
)

Overrides org.codehaus.groovy.vmplugin.v5.Java5.invokeHandle.

Implements org.codehaus.groovy.vmplugin.VMPlugin.invokeHandle.

Invokes a handle produced by #getInvokeSpecialdHandle

Constructor Detail

Java7back to summary
public Java7()

Method Detail

getInvokeSpecialHandleback to summary
public Object getInvokeSpecialHandle(final Method method, final Object receiver)

Overrides org.codehaus.groovy.vmplugin.v5.Java5.getInvokeSpecialHandle.

Implements org.codehaus.groovy.vmplugin.VMPlugin.getInvokeSpecialHandle.

Doc from org.codehaus.groovy.vmplugin.VMPlugin.getInvokeSpecialHandle.

Returns a handle with bound receiver to invokeSpecial the given method. This method will require at least Java 7, but since the source has to compile on older Java versions as well it is not marked to return a MethodHandle and uses Object instead

Returns:Object

null in case of jdk<7, otherwise a handle that takes the method call arguments for the invokespecial call

Annotations
@Override
getLookupConstructorback to summary
private static Constructor<MethodHandles.Lookup> getLookupConstructor()
getVersionback to summary
public int getVersion()

Overrides org.codehaus.groovy.vmplugin.v6.Java6.getVersion.

Implements org.codehaus.groovy.vmplugin.VMPlugin.getVersion.

Doc from org.codehaus.groovy.vmplugin.VMPlugin.getVersion.

Gives the version the plugin is made for

Returns:int

7 for jdk7, 8 for jdk8, 9 for jdk9 or higher

Annotations
@Override
invalidateCallSitesback to summary
public void invalidateCallSites()

Overrides org.codehaus.groovy.vmplugin.v5.Java5.invalidateCallSites.

Implements org.codehaus.groovy.vmplugin.VMPlugin.invalidateCallSites.

Annotations
@Override
invokeHandleback to summary
public Object invokeHandle(Object handle, Object[] args) throws Throwable

Overrides org.codehaus.groovy.vmplugin.v5.Java5.invokeHandle.

Implements org.codehaus.groovy.vmplugin.VMPlugin.invokeHandle.

Doc from org.codehaus.groovy.vmplugin.VMPlugin.invokeHandle.

Invokes a handle produced by #getInvokeSpecialdHandle

Parameters
handle:Object

the handle

args:Object[]

arguments for the method call, can be empty but not null

Returns:Object

the result of the method call

Annotations
@Override
org.codehaus.groovy.vmplugin.v7 back to summary

private Class Java7.LookupHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Constructor<MethodHandles.Lookup>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOOKUP_Constructorback to summary
private static final Constructor<MethodHandles.Lookup> LOOKUP_Constructor

Constructor Detail

LookupHolderback to summary
private LookupHolder()