Stdlib index
- Captured-borrow migration worklist (3.3.3)
- Owned-bind migration worklist (8.2.7)
- Return-side title audit — the ride-through enumeration
- stdlib ownership audit
- stdlib ownership dispositions (plan 1.3.1 / 4.3.1)
aot
codec
codec / csv
codec / json
collection
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
error
- Exception
- NoOptionalValueException
- NotProvidedException
- RecoverableException
- ScopedBuildFailedException
- ScopeNotActiveException
- Throwable
- UnrecoverableException
gfx
hash
ifx
io
io / file
io / net
io / net / dns
io / net / uri
lang
lang / stream
math
math / fft
math / linalg
math / npio
math / poly
math / random
math / stats
nucleo
- Columns — the Arrow-laid-out substrate
- Fused tensor expressions — Fuse
- Table — the lazy, typed dataframe
- Tape — define-by-run autograd
- Transform intrinsics — Grad, Vmap, Jit
process
reflect
search / distance
search / fuzzy
search / ngram
session
time
- Clock
- DateTimeFormatter
- Duration
- Instant
- LocalDate
- LocalDateTime
- LocalTime
- Period
- ZonedDateTime
- ZoneId
- ZoneOffset
wire
xpu
xpu / mesh
Components
cajeta.aot.Components places values produced at run time into the DI
graph’s scopes. A scoped component with no no-argument constructor is only
ever provided this way.
import cajeta.aot.Components;
@Component(scope = "Login")
public class User {
public int32 id;
public User(int32 id) { this.id = id; return; }
}
public final class Gate {
@Scope("Login")
public static int32 enter(int32 id) {
User u = heap User(id);
Components.provide(#u);
User again = User.__cajeta_inject();
return again.id;
}
}
Methods
| Signature | |
|---|---|
static void provide<T>(#T value) | Place value in the active scope T declares |
The scope owns a transferred value and frees it at its end. A second provide
in one scope throws ScopedBuildFailedException
and frees the refused value. Outside every activation of the scope it throws
ScopeNotActiveException. Injecting a
provided-only type before it is provided throws
NotProvidedException.