MultibinderBinding<Set<Boolean>>
Although Multibinders may be injected through a variety of generic types (Set<V>,
Collection<Provider<V>>, and Set<? extends V> ), a MultibinderBinding exists only
on the Binding associated with the Set<V> key. Injectable types can be discovered using
getSetKey (which will return the Set<V> key), or getAlternateSetKeys
(which will return the other keys that can inject this data). Other bindings can be validated to
be derived from this MultibinderBinding using containsElement(Element).
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Set | |
| public List | |
| public TypeLiteral | |
| public Key | |
| public boolean |
| containsElement | back to summary |
|---|---|
| public boolean containsElement(Element element) Returns true if this Multibinder uses the given Element. This will be true for bindings that
derive the elements of the set and other bindings that Multibinder uses internally. This will
work for MultibinderBindings retrieved from an injector and If you need to introspect the details of the set, such as the values or if it permits
duplicates, it is necessary to pass the elements through an Injector and use | |
| getAlternateSetKeys | back to summary |
|---|---|
| public Set Returns the keys of other bindings that represent this set. This will return an entry for
| |
| getElements | back to summary |
|---|---|
| public List Returns all bindings that make up the set. This is only supported on bindings returned from an
injector. This will throw The elements will always match the type Set's generic type. For example, if getSetKey
returns a key of | |
| getElementTypeLiteral | back to summary |
|---|---|
| public TypeLiteral Returns the TypeLiteral that describes the type of elements in the set. The elements will always match the type Set's generic type. For example, if getSetKey
returns a key of | |
| getSetKey | back to summary |
|---|---|
| public Key Returns the key for the set. | |
| permitsDuplicates | back to summary |
|---|---|
| public boolean permitsDuplicates() Returns true if the multibinder permits duplicates. This is only supported on bindings returned
from an injector. This will throw | |