Package org.codehaus.groovy.transform.stc

# Class Receiver<T>

java.lang.Object
org.codehaus.groovy.transform.stc.Receiver<T>

public class Receiver<T> extends Object
Describes a method-call receiver together with optional auxiliary data.

- ## Constructor Summary

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

- ## Method Summary

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

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Receiver

    public Receiver(ClassNode type)
    Creates an object receiver without auxiliary data.

  - ### Receiver

    public Receiver(ClassNode type, T data)
    Creates an object receiver with auxiliary data.

  - ### Receiver

    public Receiver(ClassNode type, boolean object, T data)
    Creates a receiver descriptor.

- ## Method Details

  - ### make

    public static <T> Receiver<T> make(ClassNode type)
    Creates an object receiver for the supplied type or `Object` when null.

  - ### getData

    public T getData()
    Returns the auxiliary data associated with this receiver.

  - ### isObject

    public boolean isObject()
    Indicates if receiver is an object instance or a class (static) reference.
    Since:
      5.0.0

  - ### getType

    public ClassNode getType()
    Returns the receiver type.

  - ### toString

    public final String toString()
    Returns a diagnostic representation of this receiver.
    Overrides:
      `toString` in class `Object`