Package org.codehaus.groovy.util

# Interface Reference<T,V extends Finalizable>

Type Parameters:
  `T` - the referent type
  `V` - the handler type

public interface Reference<T,V extends Finalizable>
Abstraction over reference implementations that keep a cleanup handler alongside the referent.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Clears the current referent.
  `T`
  `get()`
  Returns the current referent.
  `V`
  `getHandler()`
  Returns the handler that should be notified when the reference is processed.

- ## Method Details

  - ### get

    T get()
    Returns the current referent.
    Returns:
      the referent, or `null` if it is no longer available

  - ### clear

    void clear()
    Clears the current referent.

  - ### getHandler

    V getHandler()
    Returns the handler that should be notified when the reference is processed.
    Returns:
      the associated handler