Package-level declarations

Types

Link copied to clipboard
sealed class AbstractMapFactory<K : Any, V, V2> : Factory<Map<K, V2>>

An abstract Factory implementation used to implement Map bindings.

Link copied to clipboard
abstract class BaseDoubleCheck<T>(provider: Provider<T>) : SynchronizedObject, Provider<T> , Lazy<T>

A Lazy and Provider implementation that memoizes the value returned from a provider. The provider instance is released after it's called.

Link copied to clipboard

A DelegateFactory that is used to stitch Provider/Lazy indirection based dependency cycles.

Link copied to clipboard
Link copied to clipboard
fun interface Factory<T> : Provider<T>
Link copied to clipboard

Marker for generated factories indicating their invoke function.

Link copied to clipboard
annotation class InjectedFunctionClass(val callableName: String)

Marker for generated class wrappers for injected top level functions.

Link copied to clipboard

A Factory implementation that returns a single instance for all invocations of invoke.

Link copied to clipboard

A Factory implementation used to implement Map bindings. This factory returns a Map<K, V> when calling invoke (as specified by Factory).

Link copied to clipboard

A Factory implementation used to implement Map bindings. This factory returns a Map<K, Provider<V>> when calling invoke (as specified by Factory).

Link copied to clipboard

Basic MembersInjector implementations used by the framework.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class MetroContribution(val scope: KClass<*>)

Marker for generated nested classes for top-level declarations annotated with @Contributes_.

Link copied to clipboard
annotation class MultibindingElement(val bindingId: String, val elementId: String)

Disambiguates between multiple elements of the same type in a set. Inspired by Guice.

Link copied to clipboard

A Provider of Lazy instances that each delegate to a given Provider.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ProvidesCallableId(val callableName: String, val isPropertyAccessor: Boolean)

Marker for generated factories indicating their source callable ID.

Link copied to clipboard
class SetFactory<T : Any> : Factory<Set<T>>

A Factory implementation used to implement Set bindings. This factory always returns a new Set instance for each call to invoke (as required by Factory) whose elements are populated by subsequent calls to their Provider.invoke methods.

Functions

Link copied to clipboard

Returns true if at least one pair of items in this are equal.

Link copied to clipboard

Creates a LinkedHashMap instance, with a high enough "initial capacity" that it should hold expectedSize elements without growth.

Link copied to clipboard
fun <T : Any> presizedList(size: Int): MutableList<T>

Returns a new list that is pre-sized to size, or emptyList if empty. The list returned is never intended to grow beyond size, so adding to a list when the size is 0 is an error.