Package: org.codehaus.groovy.transform.stc

## [Java] Class Receiver<T>

- org.codehaus.groovy.transform.stc.Receiver

-     public class Receiver<T>
      extends Object

  Describes a method-call receiver together with optional auxiliary data.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `Receiver(ClassNode type)` Creates an object receiver without auxiliary data.
    `Receiver(ClassNode type, T data)` Creates an object receiver with auxiliary data.
    `Receiver(ClassNode type, boolean object, T data)` Creates a receiver descriptor.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public T` | `getData()` Returns the auxiliary data associated with this receiver.
    `` | `public ClassNode` | `getType()` Returns the receiver type.
    `` | `public boolean` | `isObject()` Indicates if receiver is an object instance or a class (static) reference.
    `<T>` | `public static Receiver<T>` | `make(ClassNode type)` Creates an object receiver for the supplied type or `Object` when null.
    `` | `public final String` | `toString()` Returns a diagnostic representation of this receiver.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public Receiver(ClassNode type)

      Creates an object receiver without auxiliary data.

    - #### public Receiver(ClassNode type, T data)

      Creates an object receiver with auxiliary data.

    - #### public Receiver(ClassNode type, boolean object, T data)

      Creates a receiver descriptor.

  - ### Method Detail

    - #### public T getData()

      Returns the auxiliary data associated with this receiver.

    - #### public ClassNode getType()

      Returns the receiver type.

    - #### public boolean isObject()

      Indicates if receiver is an object instance or a class (static) reference.

      Since:
        5.0.0

    - #### <T> public static Receiver<T> make(ClassNode type)

      Creates an object receiver for the supplied type or `Object` when null.

    - #### public final String toString()

      Returns a diagnostic representation of this receiver.