Deprecated
| Modifier and Type | Class and Description |
|---|---|
| private static class | Selector.CastSelector
Deprecated
as a consequence of
Selector.MethodSelector being deprecated.
|
| private static class | Selector.InitSelector
Deprecated
as a consequence of
Selector.MethodSelector being deprecated.
|
| private static class | Selector.MethodSelector
Deprecated
as a consequence of Method invocation based Selector being deprecated.
Selector.
|
| private static class | Selector.PropertySelector
Deprecated
as a consequence of
Selector.MethodSelector being deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
| public Object[] | |
| public boolean | |
| private static final IndyInterface. | CALL_TYPE_VALUES
Cache values for read-only access |
| public MutableCallSite | |
| public IndyInterface. | |
| public boolean | |
| public MethodType | |
| public MethodHandle | |
| public boolean | |
| public MetaMethod | |
| public String | |
| public Object[] | |
| public boolean | |
| public boolean | |
| public Class | |
| public Class | |
| public boolean | |
| public boolean | |
| public MethodType | |
| public boolean | |
| public boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| private static MetaClassImpl | getMetaClassImpl(MetaClass mc, boolean includeEMC)
Returns the MetaClassImpl if the given MetaClass is one of MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. |
| public static Selector | getSelector(MutableCallSite callSite, Class<?> sender, String methodName, int callID, boolean safeNavigation, boolean thisCall, boolean spreadCall, Object[] arguments)
Deprecated
as a consequence of
Returns the Selector
Selector being deprecated.
|
| private static boolean | |
| private static Object[] | removeRealReceiver(Object[] args)
Helper method to remove the receiver from the argument array by producing a new array. |
| pack-priv abstract void | |
| private static Object[] | |
| private static Object |
| args | back to summary |
|---|---|
| public Object[] args | |
| cache | back to summary |
|---|---|
| public boolean cache | |
| CALL_TYPE_VALUES | back to summary |
|---|---|
| private static final IndyInterface. Cache values for read-only access | |
| callSite | back to summary |
|---|---|
| public MutableCallSite callSite | |
| callType | back to summary |
|---|---|
| public IndyInterface. | |
| catchException | back to summary |
|---|---|
| public boolean catchException | |
| currentType | back to summary |
|---|---|
| public MethodType currentType | |
| handle | back to summary |
|---|---|
| public MethodHandle handle | |
| isVargs | back to summary |
|---|---|
| public boolean isVargs | |
| method | back to summary |
|---|---|
| public MetaMethod method | |
| name | back to summary |
|---|---|
| public String name | |
| originalArguments | back to summary |
|---|---|
| public Object[] originalArguments | |
| safeNavigation | back to summary |
|---|---|
| public boolean safeNavigation | |
| safeNavigationOrig | back to summary |
|---|---|
| public boolean safeNavigationOrig | |
| selectionBase | back to summary |
|---|---|
| public Class<?> selectionBase | |
| sender | back to summary |
|---|---|
| public Class<?> sender | |
| skipSpreadCollector | back to summary |
|---|---|
| public boolean skipSpreadCollector | |
| spread | back to summary |
|---|---|
| public boolean spread | |
| targetType | back to summary |
|---|---|
| public MethodType targetType | |
| thisCall | back to summary |
|---|---|
| public boolean thisCall | |
| useMetaClass | back to summary |
|---|---|
| public boolean useMetaClass | |
| Selector | back to summary |
|---|---|
| public Selector() | |
| getCorrectedReceiver | back to summary |
|---|---|
| public Object getCorrectedReceiver() Returns | |
| getMetaClassImpl | back to summary |
|---|---|
| private static MetaClassImpl getMetaClassImpl(MetaClass mc, boolean includeEMC) Returns the MetaClassImpl if the given MetaClass is one of MetaClassImpl, AdaptingMetaClass or ClosureMetaClass. If none of these cases matches, this method returns null. | |
| getSelector | back to summary |
|---|---|
| public static Selector getSelector(MutableCallSite callSite, Class<?> sender, String methodName, int callID, boolean safeNavigation, boolean thisCall, boolean spreadCall, Object[] arguments)
Deprecated as a consequence of Returns the Selector | |
| isStatic | back to summary |
|---|---|
| private static boolean isStatic(Method m) Returns if a method is static | |
| removeRealReceiver | back to summary |
|---|---|
| private static Object[] removeRealReceiver(Object[] args) Helper method to remove the receiver from the argument array by producing a new array. | |
| setCallSiteTarget | back to summary |
|---|---|
| pack-priv abstract void setCallSiteTarget() | |
| spread | back to summary |
|---|---|
| private static Object[] spread(Object[] args, boolean spreadCall) Helper method to transform the given arguments, consisting of the receiver and the actual arguments in an Object[], into a new Object[] consisting of the receiver and the arguments directly. Before the size of args was always 2, the returned Object[] will have a size of 1+n, where n is the number arguments. | |
| unwrapIfWrapped | back to summary |
|---|---|
| private static Object unwrapIfWrapped(Object object) Unwraps the given object from a | |
Deprecated
as a consequence of Selector.MethodSelector being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private final Class | |
| private final Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private static boolean | |
| public void | setCallSiteTarget()
Overrides org. |
| staticSourceType | back to summary |
|---|---|
| private final Class<?> staticSourceType | |
| staticTargetType | back to summary |
|---|---|
| private final Class<?> staticTargetType | |
| CastSelector | back to summary |
|---|---|
| public CastSelector(MutableCallSite callSite, Object[] arguments) | |
| castAndSetGuards | back to summary |
|---|---|
| private void castAndSetGuards() | |
| castToTypeFallBack | back to summary |
|---|---|
| private void castToTypeFallBack() | |
| handleBoolean | back to summary |
|---|---|
| private void handleBoolean() | |
| handleCollections | back to summary |
|---|---|
| private void handleCollections() | |
| handleInstanceCase | back to summary |
|---|---|
| private void handleInstanceCase() | |
| handleNullWithoutBoolean | back to summary |
|---|---|
| private void handleNullWithoutBoolean() | |
| handleSAM | back to summary |
|---|---|
| private void handleSAM() | |
| isAbstractClassOf | back to summary |
|---|---|
| private static boolean isAbstractClassOf(Class<?> toTest, Class<?> givenOnCallSite) | |
| setCallSiteTarget | back to summary |
|---|---|
| public void setCallSiteTarget() Overrides org. Doc from org. setting a call site target consists of the following steps: # get the meta class # select a method/constructor/property from it, if it is a MetaClassImpl # make a handle out of the selection # if nothing could be selected select a path through the given MetaClass or the GroovyObject # apply transformations for vargs, implicit null argument, coercion, wrapping, null receiver and spreading
| |
Deprecated
as a consequence of Selector.MethodSelector being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | InitSelector(MutableCallSite callSite, Class<?> sender, String methodName, IndyInterface.
|
| beanConstructor | back to summary |
|---|---|
| private boolean beanConstructor | |
| InitSelector | back to summary |
|---|---|
| public InitSelector(MutableCallSite callSite, Class<?> sender, String methodName, IndyInterface. | |
| chooseMeta | back to summary |
|---|---|
| public void chooseMeta(MetaClassImpl mci) Overrides org. This method chooses a constructor from the meta class.
| |
| correctCoerce | back to summary |
|---|---|
| public void correctCoerce() Overrides org. In case of a bean constructor we don't do any coercion, otherwise
we do the same as for
| |
| correctParameterLength | back to summary |
|---|---|
| public void correctParameterLength() Overrides org. In case of a bean constructor we don't do any varags or implicit null argument
transformations. Otherwise we do the same as for
| |
| getMetaClass | back to summary |
|---|---|
| public MetaClass getMetaClass() Overrides org. For a constructor call we always use the static meta class from the registry
| |
| setHandleForMetaMethod | back to summary |
|---|---|
| public void setHandleForMetaMethod() Overrides org. Adds
| |
| setInterceptor | back to summary |
|---|---|
| public boolean setInterceptor() Overrides org. Constructor calls are not intercepted, thus always returns false.
| |
| setMetaClassCallHandleIfNeeded | back to summary |
|---|---|
| public void setMetaClassCallHandleIfNeeded(boolean standardMetaClass) Overrides org. Set MOP based constructor invocation path.
| |
Deprecated
as a consequence of Selector being deprecated. See corresponding docs for further information.
Selector.
This Selector is called for method invocations and is base for cosntructor
calls as well as getProperty calls.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| protected MetaClass | |
| private static final Object[] |
| Access | Constructor and Description |
|---|---|
| public | MethodSelector(MutableCallSite callSite, Class<?> sender, String methodName, IndyInterface.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| private MethodHandle | |
| public void | |
| public void | |
| public void | correctParameterLength()
Handles cases in which we have to correct the length of arguments using the parameters. |
| public void | |
| public void | |
| public void | |
| public MetaClass | |
| private MethodType | removeWrapper(MethodType targetType)
Helper method to manipulate the given type to replace Wrapper with Object. |
| public void | setCallSiteTarget()
Implements abstract org. |
| public void | |
| public void | |
| public boolean | |
| public void | setMetaClassCallHandleIfNeeded(boolean standardMetaClass)
Creates a MethodHandle, which will use the meta class path. |
| public boolean | |
| public void |
| isCategoryMethod | back to summary |
|---|---|
| private boolean isCategoryMethod | |
| mc | back to summary |
|---|---|
| protected MetaClass mc | |
| SINGLE_NULL_ARRAY | back to summary |
|---|---|
| private static final Object[] SINGLE_NULL_ARRAY | |
| MethodSelector | back to summary |
|---|---|
| public MethodSelector(MutableCallSite callSite, Class<?> sender, String methodName, IndyInterface. | |
| addExceptionHandler | back to summary |
|---|---|
| public void addExceptionHandler() Adds the standard exception handler. | |
| chooseMeta | back to summary |
|---|---|
| public void chooseMeta(MetaClassImpl mci) Uses the meta class to get a meta method for a method call. There will be no meta method selected, if the meta class is no MetaClassImpl or the meta class is an AdaptingMetaClass. | |
| correctClassForNameAndUnReflectOtherwise | back to summary |
|---|---|
| private MethodHandle correctClassForNameAndUnReflectOtherwise(Method m) throws IllegalAccessException | |
| correctCoerce | back to summary |
|---|---|
| public void correctCoerce() There are some conversions we have to do explicitly. These are GString to String, Number to Byte and Number to BigInteger conversions. | |
| correctNullReceiver | back to summary |
|---|---|
| public void correctNullReceiver() Gives a replacement receiver for null. In case of the receiver being null we want to do the method invocation on NullObject instead. | |
| correctParameterLength | back to summary |
|---|---|
| public void correctParameterLength() Handles cases in which we have to correct the length of arguments using the parameters. This might be needed for vargs and for one parameter calls without arguments (null is used then). | |
| correctSpreading | back to summary |
|---|---|
| public void correctSpreading() | |
| correctWrapping | back to summary |
|---|---|
| public void correctWrapping() Corrects method argument wrapping. In cases in which we want to force a certain method selection we use Wrapper classes to transport the static type information. This method will be used to undo the wrapping. | |
| doCallSiteTargetSet | back to summary |
|---|---|
| public void doCallSiteTargetSet() do the actual call site target set, if the call is supposed to be cached | |
| getMetaClass | back to summary |
|---|---|
| public MetaClass getMetaClass() Gives the meta class to an Object. | |
| removeWrapper | back to summary |
|---|---|
| private MethodType removeWrapper(MethodType targetType) Helper method to manipulate the given type to replace Wrapper with Object. | |
| setCallSiteTarget | back to summary |
|---|---|
| public void setCallSiteTarget() Implements abstract org. setting a call site target consists of the following steps: # get the meta class # select a method/constructor/property from it, if it is a MetaClassImpl # make a handle out of the selection # if nothing could be selected select a path through the given MetaClass or the GroovyObject # apply transformations for vargs, implicit null argument, coercion, wrapping, null receiver and spreading
| |
| setGuards | back to summary |
|---|---|
| public void setGuards(Object receiver) Sets all argument and receiver guards. | |
| setHandleForMetaMethod | back to summary |
|---|---|
| public void setHandleForMetaMethod() Creates a MethodHandle using a before selected MetaMethod. If the MetaMethod has reflective information available, then we will use that information to create the target MethodHandle. If that is not the case we will produce a handle, which will use the MetaMethod itself for invocation. | |
| setInterceptor | back to summary |
|---|---|
| public boolean setInterceptor() Sets a handle to call | |
| setMetaClassCallHandleIfNeeded | back to summary |
|---|---|
| public void setMetaClassCallHandleIfNeeded(boolean standardMetaClass) Creates a MethodHandle, which will use the meta class path. This method is called only if no handle has been created before. This is usually the case if the method selection failed. | |
| setNullForSafeNavigation | back to summary |
|---|---|
| public boolean setNullForSafeNavigation() Sets the null constant for safe navigation. In case of foo?.bar() and foo being null, we don't call the method, instead we simply return null. This produces a handle, which will return the constant. | |
| setSelectionBase | back to summary |
|---|---|
| public void setSelectionBase() Sets the selection base. | |
Deprecated
as a consequence of Selector.MethodSelector being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | PropertySelector(MutableCallSite callSite, Class<?> sender, String methodName, IndyInterface.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | chooseMeta(MetaClassImpl mci)
Overrides org. |
| private boolean | |
| public void | setHandleForMetaMethod()
Overrides org. MethodSelector#setHandleForMetaMethod()
task we have to also take care of generic getter methods, that depend
one the name.
|
| public boolean | setInterceptor()
Overrides org. |
| public void | setMetaClassCallHandleIfNeeded(boolean standardMetaClass)
Overrides org. GroovyObject#getProperty(String).
|
| insertName | back to summary |
|---|---|
| private boolean insertName | |
| PropertySelector | back to summary |
|---|---|
| public PropertySelector(MutableCallSite callSite, Class<?> sender, String methodName, IndyInterface. | |
| chooseMeta | back to summary |
|---|---|
| public void chooseMeta(MetaClassImpl mci) Overrides org. this method chooses a property from the meta class.
| |
| isMarkedInternal | back to summary |
|---|---|
| private boolean isMarkedInternal(Method reflectionMethod) | |
| setHandleForMetaMethod | back to summary |
|---|---|
| public void setHandleForMetaMethod() Overrides org. Additionally to the normal
| |
| setInterceptor | back to summary |
|---|---|
| public boolean setInterceptor() Overrides org. We never got the interceptor path with a property get
| |
| setMetaClassCallHandleIfNeeded | back to summary |
|---|---|
| public void setMetaClassCallHandleIfNeeded(boolean standardMetaClass) Overrides org. The MOP requires all get property operations to go through
| |