Holder (Grails 6.0.0)

Package: grails.util

## [Java] Class Holder<T>

- grails.util.Holder

-     public class Holder<T>
      extends java.lang.Object

  Authors:
    Burt Beckwith
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.util.Map<java.lang.Integer, T>` | `instances` |
    `private java.lang.String` | `name` |
    `private T` | `singleton` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `Holder (java.lang.String name)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public T` | `get()`
    `` | `public T` | `get(boolean mappedOnly)`
    `` | `private int` | `getClassLoaderId()`
    `` | `protected T` | `lookupSecondary()`
    `` | `public void` | `set(T t)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private java.util.Map<java.lang.Integer, T> instances

    - #### private java.lang.String name

    - #### private T singleton

  - ### Constructor Detail

    - #### public Holder(java.lang.String name)

  - ### Method Detail

    - #### public T get()

    - #### public T get(boolean mappedOnly)

    - #### private int getClassLoaderId()

    - #### protected T lookupSecondary()

    - #### public void set(T t)