| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private final Cache | evictionCache
Tracks child injector lifetimes and evicts banned keys/sources after the child injector is garbage collected. |
| private final Object | lock
This is already locked externally on add and getSources but we need it to handle clean up in the evictionCache's RemovalListener. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private void | cleanupOnRemoval(RemovalNotification<InjectorBindingData, Set<WeakKeySet.
|
| public boolean | |
| public Set |
| backingMap | back to summary |
|---|---|
| private Map<Key<?>, Multiset<Object>> backingMap | |
| evictionCache | back to summary |
|---|---|
| private final Cache<InjectorBindingData, Set<WeakKeySet. Tracks child injector lifetimes and evicts banned keys/sources after the child injector is garbage collected. | |
| lock | back to summary |
|---|---|
| private final Object lock This is already locked externally on add and getSources but we need it to handle clean up in the evictionCache's RemovalListener. | |
| WeakKeySet | back to summary |
|---|---|
| pack-priv WeakKeySet(Object lock) | |
| add | back to summary |
|---|---|
| public void add(Key<?> key, InjectorBindingData state, Object source) | |
| cleanupOnRemoval | back to summary |
|---|---|
| private void cleanupOnRemoval(RemovalNotification<InjectorBindingData, Set<WeakKeySet. | |
| contains | back to summary |
|---|---|
| public boolean contains(Key<?> key) | |
| getSources | back to summary |
|---|---|
| public Set | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public int |
| key | back to summary |
|---|---|
| pack-priv final Key<?> key | |
| source | back to summary |
|---|---|
| pack-priv final Object source | |
| KeyAndSource | back to summary |
|---|---|
| pack-priv KeyAndSource(Key<?> key, Object source) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |