Class PerInstancePojoMetaClassSite

java.lang.Object
org.codehaus.groovy.runtime.callsite.AbstractCallSite
org.codehaus.groovy.runtime.callsite.PerInstancePojoMetaClassSite
All Implemented Interfaces:
CallSite

public class PerInstancePojoMetaClassSite extends AbstractCallSite
Call site that dispatches through a receiver's per-instance meta class while ClassInfo reports that such meta classes are in use.
  • Constructor Details

    • PerInstancePojoMetaClassSite

      public PerInstancePojoMetaClassSite(CallSite site, ClassInfo info)
      Copies the parent site and remembers where per-instance meta classes are tracked.
      Parameters:
      site - the site whose name and index are copied
      info - class information used to detect per-instance meta classes
  • Method Details

    • call

      public Object call(Object receiver, Object[] args) throws Throwable
      Invokes this site's method on the receiver's meta class when the receiver is non-null and per-instance meta classes are in use. A GroovyRuntimeException is unwrapped. Otherwise uses the default call.
      Specified by:
      call in interface CallSite
      Overrides:
      call in class AbstractCallSite
      Parameters:
      receiver - the target of the call
      args - the arguments, in order
      Returns:
      the value returned by the method
      Throws:
      Throwable - when the call fails