Proxy (Groovy 5.0.7)

Package: groovy.util

## [Java] Class Proxy

- groovy.util.Proxy

-     public class Proxy
      extends GroovyObjectSupport

  Dynamic groovy proxy for another object. All method invocations get forwarded to actual object, unless the proxy overrides it. See groovy/util/ProxyTest.groovy for usage details.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Object` | `getAdaptee()`
    `` | `public Object` | `invokeMethod(String name, Object args)`
    `` | `public Iterator` | `iterator()`
    `` | `public void` | `setAdaptee(Object adaptee)`
    `` | `public Proxy` | `wrap(Object adaptee)` This method is for convenience.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyObjectSupport` | `getMetaClass, setMetaClass`

- - ### Method Detail

    - #### public Object getAdaptee()

    - #### @Override
      public Object invokeMethod(String name, Object args)

    - #### public Iterator iterator()

    - #### public void setAdaptee(Object adaptee)

    - #### public Proxy wrap(Object adaptee)

      This method is for convenience. It allows to get around the need for defining dump ctors in subclasses. See unit tests for details.