Class Selector

java.lang.Object
org.codehaus.groovy.vmplugin.v8.Selector

public abstract class Selector extends Object
Base state holder for invokedynamic method, property, constructor, and cast selection.
  • Field Details

    • args

      public Object[] args
      Effective invocation arguments, possibly after spread-call normalization.
    • originalArguments

      public Object[] originalArguments
      Effective invocation arguments, possibly after spread-call normalization.
    • method

      public MetaMethod method
      Selected meta method, when method dispatch resolves through the metaclass.
    • targetType

      public MethodType targetType
      Call-site target type and the currently adapted working type.
    • currentType

      public MethodType currentType
      Call-site target type and the currently adapted working type.
    • name

      public String name
      Name of the method or property being resolved.
    • handle

      public MethodHandle handle
      Method handle assembled for the current dispatch path.
    • useMetaClass

      public boolean useMetaClass
      Flags controlling metaclass fallback usage and call-site caching.
    • cache

      public boolean cache
      Flags controlling metaclass fallback usage and call-site caching.
    • callSite

      public CacheableCallSite callSite
      Call site being linked.
    • sender

      public Class<?> sender
      Sending class used for visibility and MOP decisions.
    • isVargs

      public boolean isVargs
      Indicates whether the selected target accepts varargs.
    • safeNavigation

      public boolean safeNavigation
      Flags tracking safe navigation and spread-call semantics.
    • safeNavigationOrig

      public boolean safeNavigationOrig
      Flags tracking safe navigation and spread-call semantics.
    • spread

      public boolean spread
      Flags tracking safe navigation and spread-call semantics.
    • skipSpreadCollector

      public boolean skipSpreadCollector
      Indicates whether spread-collector adaptation should be skipped.
    • thisCall

      public boolean thisCall
      Indicates whether the invocation is a this call.
    • selectionBase

      public Class<?> selectionBase
      Class used as the selection base for metaclass lookups.
    • catchException

      public boolean catchException
      Controls whether Groovy runtime exceptions are unwrapped around the target.
    • callType

      public IndyInterface.CallType callType
      Call-site category associated with this selector.
  • Constructor Details

    • Selector

      public Selector()
  • Method Details

    • getSelector

      public static Selector getSelector(CacheableCallSite callSite, Class<?> sender, String methodName, int callID, boolean safeNavigation, boolean thisCall, boolean spreadCall, Object[] arguments)
      Returns a Selector or throws a GroovyBugError.
    • getCorrectedReceiver

      public Object getCorrectedReceiver()
      Returns NullObject.getNullObject() if the receiver (args[0]) is null. If it is not null, the receiver itself is returned.