Package: org.codehaus.groovy.util

## [Java] Enum ReferenceType

- org.codehaus.groovy.util.ReferenceType

-     public enum ReferenceType
      extends Enum

  Supported reference implementations for managed references.

- - ### Enum Constants Summary

    Enum constants classes
    Enum constant | Description
    --- | ---
    `HARD` | Stores referents strongly until cleared explicitly.
    `PHANTOM` | Stores referents as phantom references for post-mortem cleanup only.
    `SOFT` | Stores referents as softly reachable values that may be cleared under memory pressure.
    `WEAK` | Stores referents as weakly reachable values that may be cleared once weakly reachable.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `<T, V extends Finalizable>` | `protected abstract Reference<T, V>` | `createReference(T value, V handler, ReferenceQueue queue)` Creates a reference of this type for the supplied referent and handler.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Enum` | `compareTo, compareTo, describeConstable, equals, getClass, getDeclaringClass, hashCode, name, notify, notifyAll, ordinal, toString, valueOf, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ReferenceType HARD

      Stores referents strongly until cleared explicitly.

    - #### ReferenceType PHANTOM

      Stores referents as phantom references for post-mortem cleanup only.

    - #### ReferenceType SOFT

      Stores referents as softly reachable values that may be cleared under memory pressure.

    - #### ReferenceType WEAK

      Stores referents as weakly reachable values that may be cleared once weakly reachable.

  - ### Method Detail

    - #### <T, V extends Finalizable> protected abstract Reference<T, V> createReference(T value, V handler, ReferenceQueue queue)

      Creates a reference of this type for the supplied referent and handler.

      Parameters:
        `value` - the referent to wrap
        `handler` - the cleanup handler associated with the reference
        `queue` - the queue to notify for queue-backed references
      Type Parameters:
        `T` - the referent type
        `V` - the handler type
      Returns:
        the created reference