Package org.codehaus.groovy.vmplugin.v8
Class IndyGuardsFiltersAndSignatures
java.lang.Object
org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures
public class IndyGuardsFiltersAndSignatures
extends java.lang.Object
This class contains guards, runtime filters and
MethodType signatures used by indy.
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.invoke.MethodHandleARRAYLIST_CONSTRUCTORprotected static java.lang.invoke.MethodHandleBEAN_CONSTRUCTOR_PROPERTY_SETTERprotected static java.lang.invoke.MethodHandleBOOLEAN_IDENTITYprotected static java.lang.invoke.MethodHandleCLASS_FOR_NAMEprotected static java.lang.invoke.MethodHandleDTT_CAST_TO_TYPEprotected static java.lang.invoke.MethodHandleEQUALSprotected static java.lang.invoke.MethodHandleGROOVY_CAST_EXCEPTIONprotected static java.lang.invoke.MethodHandleGROOVY_OBJECT_GET_PROPERTYprotected static java.lang.invoke.MethodHandleGROOVY_OBJECT_INVOKERprotected static java.lang.invoke.MethodHandleHAS_CATEGORY_IN_CURRENT_THREAD_GUARDprotected static java.lang.invoke.MethodHandleHASHSET_CONSTRUCTORprotected static java.lang.invoke.MethodHandleINTERCEPTABLE_INVOKERprotected static java.lang.invoke.MethodHandleIS_NULLprotected static java.lang.invoke.MethodHandleMETA_CLASS_INVOKE_STATIC_METHODprotected static java.lang.invoke.MethodHandleMETA_METHOD_INVOKERprotected static java.lang.invoke.MethodHandleMETA_PROPERTY_GETTERprotected static java.lang.invoke.MethodHandleMOP_GETprotected static java.lang.invoke.MethodHandleMOP_INVOKE_CONSTRUCTORprotected static java.lang.invoke.MethodHandleMOP_INVOKE_METHODprotected static java.lang.invoke.MethodHandleNULL_REFprotected static java.lang.invoke.MethodHandleSAM_CONVERSIONprotected static java.lang.invoke.MethodHandleSAME_CLASSprotected static java.lang.invoke.MethodHandleSAME_MCprotected static java.lang.invoke.MethodHandleSLOW_META_CLASS_FINDprotected static java.lang.invoke.MethodHandleUNWRAP_EXCEPTIONprotected static java.lang.invoke.MethodHandleUNWRAP_METHOD -
Constructor Summary
Constructors Constructor Description IndyGuardsFiltersAndSignatures() -
Method Summary
Modifier and Type Method Description static java.lang.ObjectinvokeGroovyObjectInvoker(MissingMethodException e, java.lang.Object receiver, java.lang.String name, java.lang.Object[] args)GroovyObject.invokeMethod(String, Object)path as fallback.static booleanisNull(java.lang.Object o)Guard to check if the argument is null.static booleanisSameMetaClass(MetaClass mc, java.lang.Object receiver)called by handlestatic booleansameClass(java.lang.Class<?> c, java.lang.Object o)Guard to check if the provided Object has the same class as the provided Class.static java.lang.ObjectsetBeanProperties(MetaClass mc, java.lang.Object bean, java.util.Map properties)This method is called by the handle to realize the bean constructor with property map.static java.lang.Objectunwrap(GroovyRuntimeException gre)Unwraps aGroovyRuntimeException.static java.lang.Objectunwrap(java.lang.Object o)Unwraps aWrapper.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
SAME_CLASS
protected static final java.lang.invoke.MethodHandle SAME_CLASS -
SAME_MC
protected static final java.lang.invoke.MethodHandle SAME_MC -
IS_NULL
protected static final java.lang.invoke.MethodHandle IS_NULL -
UNWRAP_METHOD
protected static final java.lang.invoke.MethodHandle UNWRAP_METHOD -
UNWRAP_EXCEPTION
protected static final java.lang.invoke.MethodHandle UNWRAP_EXCEPTION -
HAS_CATEGORY_IN_CURRENT_THREAD_GUARD
protected static final java.lang.invoke.MethodHandle HAS_CATEGORY_IN_CURRENT_THREAD_GUARD -
META_METHOD_INVOKER
protected static final java.lang.invoke.MethodHandle META_METHOD_INVOKER -
GROOVY_OBJECT_INVOKER
protected static final java.lang.invoke.MethodHandle GROOVY_OBJECT_INVOKER -
GROOVY_OBJECT_GET_PROPERTY
protected static final java.lang.invoke.MethodHandle GROOVY_OBJECT_GET_PROPERTY -
META_CLASS_INVOKE_STATIC_METHOD
protected static final java.lang.invoke.MethodHandle META_CLASS_INVOKE_STATIC_METHOD -
BEAN_CONSTRUCTOR_PROPERTY_SETTER
protected static final java.lang.invoke.MethodHandle BEAN_CONSTRUCTOR_PROPERTY_SETTER -
META_PROPERTY_GETTER
protected static final java.lang.invoke.MethodHandle META_PROPERTY_GETTER -
SLOW_META_CLASS_FIND
protected static final java.lang.invoke.MethodHandle SLOW_META_CLASS_FIND -
MOP_GET
protected static final java.lang.invoke.MethodHandle MOP_GET -
MOP_INVOKE_CONSTRUCTOR
protected static final java.lang.invoke.MethodHandle MOP_INVOKE_CONSTRUCTOR -
MOP_INVOKE_METHOD
protected static final java.lang.invoke.MethodHandle MOP_INVOKE_METHOD -
INTERCEPTABLE_INVOKER
protected static final java.lang.invoke.MethodHandle INTERCEPTABLE_INVOKER -
BOOLEAN_IDENTITY
protected static final java.lang.invoke.MethodHandle BOOLEAN_IDENTITY -
CLASS_FOR_NAME
protected static final java.lang.invoke.MethodHandle CLASS_FOR_NAME -
DTT_CAST_TO_TYPE
protected static final java.lang.invoke.MethodHandle DTT_CAST_TO_TYPE -
SAM_CONVERSION
protected static final java.lang.invoke.MethodHandle SAM_CONVERSION -
HASHSET_CONSTRUCTOR
protected static final java.lang.invoke.MethodHandle HASHSET_CONSTRUCTOR -
ARRAYLIST_CONSTRUCTOR
protected static final java.lang.invoke.MethodHandle ARRAYLIST_CONSTRUCTOR -
GROOVY_CAST_EXCEPTION
protected static final java.lang.invoke.MethodHandle GROOVY_CAST_EXCEPTION -
EQUALS
protected static final java.lang.invoke.MethodHandle EQUALS -
NULL_REF
protected static final java.lang.invoke.MethodHandle NULL_REF
-
-
Constructor Details
-
IndyGuardsFiltersAndSignatures
public IndyGuardsFiltersAndSignatures()
-
-
Method Details
-
setBeanProperties
public static java.lang.Object setBeanProperties(MetaClass mc, java.lang.Object bean, java.util.Map properties)This method is called by the handle to realize the bean constructor with property map. -
invokeGroovyObjectInvoker
public static java.lang.Object invokeGroovyObjectInvoker(MissingMethodException e, java.lang.Object receiver, java.lang.String name, java.lang.Object[] args)GroovyObject.invokeMethod(String, Object)path as fallback. This method is called by the handle as exception handler in case the selected method causes a MissingMethodExecutionFailed, where we will just give through the exception, and a normal MissingMethodException where we callGroovyObject.invokeMethod(String, Object)if receiver class, the type transported by the exception and the name for the method stored in the exception and our current method name are equal. Should those conditions not apply we just rethrow the exception. -
unwrap
Unwraps aGroovyRuntimeException. This method is called by the handle to unwrap internal exceptions of the runtime.- Throws:
java.lang.Throwable
-
isSameMetaClass
called by handle -
unwrap
public static java.lang.Object unwrap(java.lang.Object o)Unwraps aWrapper. This method is called by the handle to unwrap a Wrapper, which we use to force method selection. -
isNull
public static boolean isNull(java.lang.Object o)Guard to check if the argument is null. This method is called by the handle to check if the provided argument is null. -
sameClass
public static boolean sameClass(java.lang.Class<?> c, java.lang.Object o)Guard to check if the provided Object has the same class as the provided Class. This method will return false if the Object is null.
-