public final class NullCallSite
extends AbstractCallSite
Call site that sends a null receiver to NullObject
before the default call or property read. A non-null receiver is passed through unchanged.
| Fields inherited from class | Fields |
|---|---|
class AbstractCallSite |
array, index, name |
| Constructor and description |
|---|
NullCallSite(CallSite callSite)Copies the call metadata from callSite. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
call(Object receiver, Object[] args)When receiver is null, dispatches through
NullObject.getNullObject. |
|
public Object |
getProperty(Object receiver)When receiver is null, reads name from
NullObject.getNullObject through
InvokerHelper.getProperty. |
| Methods inherited from class | Name |
|---|---|
class AbstractCallSite |
acceptGetProperty, acceptGroovyObjectGetProperty, call, call, call, call, call, call, callConstructor, callConstructor, callConstructor, callConstructor, callConstructor, callConstructor, callCurrent, callCurrent, callCurrent, callCurrent, callCurrent, callCurrent, callGetProperty, callGetPropertySafe, callGroovyObjectGetProperty, callGroovyObjectGetPropertySafe, callSafe, callSafe, callSafe, callSafe, callSafe, callSafe, callStatic, callStatic, callStatic, callStatic, callStatic, callStatic, createGetPropertySite, createGroovyObjectGetPropertySite, getArray, getIndex, getName, getProperty |
Copies the call metadata from callSite.
callSite - the site whose name and index are reused When receiver is null, dispatches through
NullObject.getNullObject. Otherwise forwards receiver
unchanged. A GroovyRuntimeException from the null path is
rethrown via ScriptBytecodeAdapter.unwrap.
receiver - the call receiver, possibly nullargs - the call arguments When receiver is null, reads name from
NullObject.getNullObject through
InvokerHelper.getProperty. Otherwise selects
a property site with acceptGetProperty(Object) and reads
from receiver. A GroovyRuntimeException from the null
path is rethrown via
ScriptBytecodeAdapter.unwrap.
receiver - the property owner, possibly nullCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.